diff options
author | 2015-08-06 08:39:22 -0700 | |
---|---|---|
committer | 2015-08-06 08:39:22 -0700 | |
commit | c8da81df6b7502bfd57eb34627efbc7cdda2afeb (patch) | |
tree | 289d7e4c01ac27933f838221c35a788ee9e1d08a | |
parent | b6394746ff546a9c60d68e3be162cb38feffa803 (diff) |
Another small fix for reordering
BUG=skia:
Review URL: https://codereview.chromium.org/1274763008
-rw-r--r-- | src/gpu/GrReorderCommandBuilder.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gpu/GrReorderCommandBuilder.cpp b/src/gpu/GrReorderCommandBuilder.cpp index 4dc2201325..151b516dee 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 || |