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

Unified Diff: src/gpu/GrReorderCommandBuilder.cpp

Issue 1274763008: Another small fix for reording (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « 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/GrReorderCommandBuilder.cpp
diff --git a/src/gpu/GrReorderCommandBuilder.cpp b/src/gpu/GrReorderCommandBuilder.cpp
index 4dc2201325852ef2f415d7958caea161356ce4f1..151b516deed64aa2f8eaf58f232a0f1f031ed762 100644
--- a/src/gpu/GrReorderCommandBuilder.cpp
+++ b/src/gpu/GrReorderCommandBuilder.cpp
@@ -47,6 +47,11 @@ GrTargetCommands::Cmd* GrReorderCommandBuilder::recordDrawBatch(State* state, Gr
} else if (Cmd::kClear_CmdType == reverseIter->type()) {
Clear* previous = static_cast<Clear*>(reverseIter.get());
+ // We cannot continue to search backwards if the render target changes
+ if (previous->renderTarget() != rt) {
+ break;
+ }
+
// 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 ||
« 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