Add GrDDLTask::dump method

Change-Id: I763db23e200a359b8eae3514c9cd244f358ea3c2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/350605
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This commit is contained in:
Robert Phillips 2021-01-06 12:13:34 -05:00 committed by Skia Commit-Bot
parent 9ead3df423
commit 14357849e4
2 changed files with 12 additions and 1 deletions

View File

@ -20,7 +20,7 @@ GrDDLTask::GrDDLTask(GrDrawingManager* drawingMgr,
, fOffset(offset) {
(void) fOffset; // fOffset will be used shortly
for (const sk_sp<GrRenderTask>& task : fDDL->priv().renderTasks()) {
for (auto& task : fDDL->priv().renderTasks()) {
SkASSERT(task->isClosed());
for (int i = 0; i < task->numTargets(); ++i) {
@ -104,3 +104,13 @@ bool GrDDLTask::onExecute(GrOpFlushState* flushState) {
return anyCommandsIssued;
}
#if GR_TEST_UTILS
void GrDDLTask::dump(bool printDependencies) const {
INHERITED::dump(printDependencies);
for (auto& task : fDDL->priv().renderTasks()) {
task->dump(printDependencies);
}
}
#endif

View File

@ -59,6 +59,7 @@ private:
bool onExecute(GrOpFlushState*) override;
#if GR_TEST_UTILS
void dump(bool printDependencies) const final;
const char* name() const final { return "DDL"; }
#endif
#ifdef SK_DEBUG