public void CreateObjectInfoNode(ProfilerNode objectInfoNode, float nodeRefPosX = 0, float nodeRefPosY = 0, bool bCreateInGrid = true) { if (nodes.Count > 0) { float instancingPosX = nodes[nodes.Count - 1].windowRect.x; float instancingPosY = nodes[nodes.Count - 1].windowRect.y; if (bCreateInGrid) { if (nodes.Count % 4 == 0) { instancingPosX = nodes[0].windowRect.x; instancingPosY = nodes[nodes.Count - 1].windowRect.y + 460; } } else { instancingPosX = nodeRefPosX - 60; instancingPosY = nodeRefPosY - 100; } objectInfoNode.windowRect = new Rect(instancingPosX + 460, instancingPosY, 360, 360); objectInfoNode.originalPosX = instancingPosX + 460; objectInfoNode.originalPosY = instancingPosY; } else { objectInfoNode.windowRect = new Rect(460, 360, 360, 360); objectInfoNode.originalPosX = 460; objectInfoNode.originalPosY = 360; } nodes.Add(objectInfoNode); }
public void CreateChildNodes(ThingInMemory thingInMemories, Color elementColor, bool bCreateInGrid = true) { ProfilerNodeObjectInfo info = new ProfilerNodeObjectInfo(); info.id = 0; info.text = thingInMemories.caption; info.memObject = thingInMemories; ProfilerNode objectInfoNode = new ProfilerNode(info, _unpackedCrawl, parent, false, this); objectInfoNode.linkColor = elementColor; parent.CreateObjectInfoNode(objectInfoNode, windowRect.x, windowRect.y, bCreateInGrid); }
public void CreateNode(ThingInMemory memData, CrawledMemorySnapshot unpackedCrawl) { if (_unpackedCrawl == null) { _unpackedCrawl = unpackedCrawl; } ProfilerNodeObjectInfo info = new ProfilerNodeObjectInfo(); info.memObject = memData; ProfilerNode objectInfoNode = new ProfilerNode(info, _unpackedCrawl, this, true, null); CreateObjectInfoNode(objectInfoNode); }
public ProfilerNode(ProfilerNodeObjectInfo info, CrawledMemorySnapshot newUnpackedCrawl, ProfilerNodeView newParent, bool createChildNodes, ProfilerNode newPrevNode) { myInfo = info; nodeTitle = myInfo.memObject.caption; _unpackedCrawl = newUnpackedCrawl; parent = newParent; bCreateChildNodes = createChildNodes; prevNode = newPrevNode; _shortestPathToRootFinder = new ShortestPathToRootFinder(_unpackedCrawl); _primitiveValueReader = new PrimitiveValueReader(_unpackedCrawl.virtualMachineInformation, _unpackedCrawl.managedHeap); _shortestPath = _shortestPathToRootFinder.FindFor(info.memObject); }