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

Unified Diff: src/gpu/GrReorderCommandBuilder.cpp

Issue 1276913002: Add Batch logging (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 years, 4 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
« src/gpu/GrBatch.h ('K') | « src/gpu/GrInOrderCommandBuilder.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrReorderCommandBuilder.cpp
diff --git a/src/gpu/GrReorderCommandBuilder.cpp b/src/gpu/GrReorderCommandBuilder.cpp
index 151b516deed64aa2f8eaf58f232a0f1f031ed762..4ba5f0c4fb806d45808085e57cb8007670536a48 100644
--- a/src/gpu/GrReorderCommandBuilder.cpp
+++ b/src/gpu/GrReorderCommandBuilder.cpp
@@ -25,6 +25,10 @@ GrTargetCommands::Cmd* GrReorderCommandBuilder::recordDrawBatch(State* state, Gr
int i = 0;
batch->setPipeline(state->getPipeline());
GrRenderTarget* rt = state->getPipeline()->getRenderTarget();
+
+ GrBATCH_INFO("Re-Recording (%s, %p), RenderTarget %p\nBounds (%f, %f, %f, %f)\n", batch->name(),
+ batch, rt, batch->bounds().fLeft, batch->bounds().fRight,
+ batch->bounds().fTop, batch->bounds().fBottom);
if (!this->cmdBuffer()->empty()) {
GrTargetCommands::CmdBuffer::ReverseIter reverseIter(*this->cmdBuffer());
@@ -34,14 +38,20 @@ GrTargetCommands::Cmd* GrReorderCommandBuilder::recordDrawBatch(State* state, Gr
// We cannot continue to search backwards if the render target changes
if (previous->fBatch->pipeline()->getRenderTarget() != rt) {
+ GrBATCH_INFO("\tBreaking because of (%s, %p) Rendertarget\n",
+ previous->fBatch->name(), previous->fBatch.get());
break;
}
if (previous->fBatch->combineIfPossible(batch)) {
+ GrBATCH_INFO("\tCombining with (%s, %p)\n",
+ previous->fBatch->name(), previous->fBatch.get());
return NULL;
}
if (intersect(previous->fBatch->bounds(), batch->bounds())) {
+ GrBATCH_INFO("\tIntersects with (%s, %p)\n",
+ previous->fBatch->name(), previous->fBatch.get());
break;
}
} else if (Cmd::kClear_CmdType == reverseIter->type()) {
@@ -49,6 +59,7 @@ GrTargetCommands::Cmd* GrReorderCommandBuilder::recordDrawBatch(State* state, Gr
// We cannot continue to search backwards if the render target changes
if (previous->renderTarget() != rt) {
+ GrBATCH_INFO("\tBreaking because of Clear's Rendertarget change\n");
break;
}
@@ -57,9 +68,11 @@ GrTargetCommands::Cmd* GrReorderCommandBuilder::recordDrawBatch(State* state, Gr
if (previous->fColor == GrColor_ILLEGAL ||
previous->fCanIgnoreRect ||
intersect(batch->bounds(), previous->fRect)) {
+ GrBATCH_INFO("\tBreaking because of Clear intersection\n");
break;
}
} else {
+ GrBATCH_INFO("\tBreaking because of other %08x\n", reverseIter->type());
// TODO temporary until we can navigate the other types of commands
break;
}
« src/gpu/GrBatch.h ('K') | « src/gpu/GrInOrderCommandBuilder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698