MCPcopy Create free account
hub / github.com/baldurk/renderdoc / on_apiEvents_itemSelectionChanged

Method on_apiEvents_itemSelectionChanged

qrenderdoc/Windows/APIInspector.cpp:163–207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

161}
162
163void APIInspector::on_apiEvents_itemSelectionChanged()
164{
165 RDTreeWidgetItem *node = ui->apiEvents->selectedItem();
166
167 SDChunk *chunk = NULL;
168 // search up the tree to find the next parent with a chunk tag
169 while(node)
170 {
171 chunk = (SDChunk *)node->tag().value<quintptr>();
172
173 // if we found one, break
174 if(chunk)
175 break;
176
177 // move to the parent
178 node = node->parent();
179 }
180
181 if(chunk && !chunk->metadata.callstack.isEmpty())
182 {
183 if(m_Ctx.Replay().GetCaptureAccess())
184 {
185 m_Ctx.Replay().AsyncInvoke([this, chunk](IReplayController *) {
186 rdcarray<rdcstr> stack =
187 m_Ctx.Replay().GetCaptureAccess()->GetResolve(chunk->metadata.callstack);
188
189 GUIInvoke::call(this, [this, stack]() { addCallstack(stack); });
190 });
191 }
192 else
193 {
194 ui->callstack->setUpdatesEnabled(false);
195 ui->callstack->clear();
196 ui->callstack->addItem(tr("Callstack resolution not available."));
197 ui->callstack->setUpdatesEnabled(true);
198 }
199 }
200 else
201 {
202 ui->callstack->setUpdatesEnabled(false);
203 ui->callstack->clear();
204 ui->callstack->addItem(tr("No Callstack available."));
205 ui->callstack->setUpdatesEnabled(true);
206 }
207}
208
209void APIInspector::fillAPIView()
210{

Callers

nothing calls this directly

Calls 10

selectedItemMethod · 0.80
GetCaptureAccessMethod · 0.80
trFunction · 0.50
tagMethod · 0.45
parentMethod · 0.45
isEmptyMethod · 0.45
AsyncInvokeMethod · 0.45
GetResolveMethod · 0.45
clearMethod · 0.45
addItemMethod · 0.45

Tested by

no test coverage detected