Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(908)

Unified Diff: src/gpu/batches/GrDrawBatch.h

Issue 2105983002: Dump batch bounds and scissor rect (Closed) Base URL: https://chromium.googlesource.com/skia.git@robspruce
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrDrawBatch.h
diff --git a/src/gpu/batches/GrDrawBatch.h b/src/gpu/batches/GrDrawBatch.h
index bf93cf5a72115f2a2df4734e361d3cfdeacfcee8..3854c1df70676861e4b7f6e7089da8841461fbba 100644
--- a/src/gpu/batches/GrDrawBatch.h
+++ b/src/gpu/batches/GrDrawBatch.h
@@ -100,6 +100,22 @@ public:
this->pipeline()->getCoverageFragmentProcessor(i).dumpInfo().c_str());
}
string.appendf("XP: %s\n", this->pipeline()->getXferProcessor().name());
+ SkString scissor;
+ if (this->pipeline()->getScissorState().enabled()) {
+ scissor.printf("[L: %d, T: %d, R: %d, B: %d]",
+ this->pipeline()->getScissorState().rect().fLeft,
+ this->pipeline()->getScissorState().rect().fTop,
+ this->pipeline()->getScissorState().rect().fRight,
+ this->pipeline()->getScissorState().rect().fBottom);
+ } else {
+ scissor = "<disabled>";
+ }
+ string.appendf("Scissor: %s\n", scissor.c_str());
+ string.appendf("Bounds: [L: %.2f, T: %.2f, R: %.2f, B: %.2f]\n",
+ this->bounds().fLeft,
+ this->bounds().fTop,
+ this->bounds().fRight,
+ this->bounds().fBottom);
return string;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698