Index: src/gpu/GrReorderCommandBuilder.cpp |
diff --git a/src/gpu/GrReorderCommandBuilder.cpp b/src/gpu/GrReorderCommandBuilder.cpp |
index 8c318fd0d00b322b0d247b0a596b98802f0e33f6..e373381cb28becd93630f59323c8486e05bf1f61 100644 |
--- a/src/gpu/GrReorderCommandBuilder.cpp |
+++ b/src/gpu/GrReorderCommandBuilder.cpp |
@@ -23,7 +23,6 @@ |
// Experimentally we have found that most batching occurs within the first 10 comparisons. |
static const int kMaxLookback = 10; |
int i = 0; |
- batch->setPipeline(state->getPipeline()); |
if (!this->cmdBuffer()->empty()) { |
GrTargetCommands::CmdBuffer::ReverseIter reverseIter(*this->cmdBuffer()); |
@@ -31,7 +30,8 @@ |
if (Cmd::kDrawBatch_CmdType == reverseIter->type()) { |
DrawBatch* previous = static_cast<DrawBatch*>(reverseIter.get()); |
- if (previous->fBatch->combineIfPossible(batch)) { |
+ if (previous->fState->getPipeline()->isEqual(*state->getPipeline()) && |
+ previous->fBatch->combineIfPossible(batch)) { |
return NULL; |
} |