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

Unified Diff: src/gpu/GrReorderCommandBuilder.cpp

Issue 1275543005: Move some work from backend onClear to base class clear (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Pass references and rebase 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
« no previous file with comments | « src/gpu/GrImmediateDrawTarget.cpp ('k') | src/gpu/GrTargetCommands.h » ('j') | 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..90953b047b00b2bf33757e97f70d9b6824ffcb23 100644
--- a/src/gpu/GrReorderCommandBuilder.cpp
+++ b/src/gpu/GrReorderCommandBuilder.cpp
@@ -32,11 +32,10 @@ GrTargetCommands::Cmd* GrReorderCommandBuilder::recordDrawBatch(State* state, Gr
if (Cmd::kDrawBatch_CmdType == reverseIter->type()) {
DrawBatch* previous = static_cast<DrawBatch*>(reverseIter.get());
- // We cannot continue to search backwards if the render target changes
if (previous->fBatch->pipeline()->getRenderTarget() != rt) {
break;
}
-
+ // We cannot continue to search backwards if the render target changes
if (previous->fBatch->combineIfPossible(batch)) {
return NULL;
}
@@ -53,9 +52,7 @@ GrTargetCommands::Cmd* GrReorderCommandBuilder::recordDrawBatch(State* state, Gr
}
// We set the color to illegal if we are doing a discard.
- // If we can ignore the rect, then we do a full clear
if (previous->fColor == GrColor_ILLEGAL ||
- previous->fCanIgnoreRect ||
intersect(batch->bounds(), previous->fRect)) {
break;
}
« no previous file with comments | « src/gpu/GrImmediateDrawTarget.cpp ('k') | src/gpu/GrTargetCommands.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698