aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrReorderCommandBuilder.cpp
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2015-07-16 08:12:45 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-07-16 08:12:45 -0700
commitdbe1e6f0c32bd07b7669b1b1ac3c7f58c9b8d773 (patch)
tree7911e79e520c673044bcc16bab0d5a60cb48cc71 /src/gpu/GrReorderCommandBuilder.cpp
parent3e5f55542cbd23f1ad448cac3d29e8551204552c (diff)
Give GrBatch a pointer to GrPipeline
Diffstat (limited to 'src/gpu/GrReorderCommandBuilder.cpp')
-rw-r--r--src/gpu/GrReorderCommandBuilder.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gpu/GrReorderCommandBuilder.cpp b/src/gpu/GrReorderCommandBuilder.cpp
index e373381cb2..8c318fd0d0 100644
--- a/src/gpu/GrReorderCommandBuilder.cpp
+++ b/src/gpu/GrReorderCommandBuilder.cpp
@@ -23,6 +23,7 @@ GrTargetCommands::Cmd* GrReorderCommandBuilder::recordDrawBatch(State* state, Gr
// 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());
@@ -30,8 +31,7 @@ GrTargetCommands::Cmd* GrReorderCommandBuilder::recordDrawBatch(State* state, Gr
if (Cmd::kDrawBatch_CmdType == reverseIter->type()) {
DrawBatch* previous = static_cast<DrawBatch*>(reverseIter.get());
- if (previous->fState->getPipeline()->isEqual(*state->getPipeline()) &&
- previous->fBatch->combineIfPossible(batch)) {
+ if (previous->fBatch->combineIfPossible(batch)) {
return NULL;
}