aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrInOrderCommandBuilder.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-08-11 14:47:42 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-08-11 14:47:42 -0700
commita387a11f9e10ee828fd0e0257cc3ee3f6262f7ca (patch)
treeaca9af5c1dc095afca43fc2fe6c0eaf91489f3cb /src/gpu/GrInOrderCommandBuilder.cpp
parent3bff4749e4be098757f56dac8708c4ae2c85ae76 (diff)
Make GrBatch carry its own GrPipeline
Diffstat (limited to 'src/gpu/GrInOrderCommandBuilder.cpp')
-rw-r--r--src/gpu/GrInOrderCommandBuilder.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/gpu/GrInOrderCommandBuilder.cpp b/src/gpu/GrInOrderCommandBuilder.cpp
index 912f0b5dbd..89a2502b72 100644
--- a/src/gpu/GrInOrderCommandBuilder.cpp
+++ b/src/gpu/GrInOrderCommandBuilder.cpp
@@ -25,24 +25,19 @@ static bool path_fill_type_is_winding(const GrStencilSettings& pathStencilSettin
return isWinding;
}
-GrTargetCommands::Cmd* GrInOrderCommandBuilder::recordDrawBatch(const State* state,
- const GrPipelineOptimizations& opts,
- GrBatch* batch) {
- // Check if there is a Batch Draw we can batch with
- batch->setPipeline(state->getPipeline(), opts);
+GrTargetCommands::Cmd* GrInOrderCommandBuilder::recordDrawBatch(GrBatch* batch) {
GrBATCH_INFO("In-Recording (%s, %u)\n", batch->name(), batch->uniqueID());
if (!this->cmdBuffer()->empty() &&
Cmd::kDrawBatch_CmdType == this->cmdBuffer()->back().type()) {
DrawBatch* previous = static_cast<DrawBatch*>(&this->cmdBuffer()->back());
- if (previous->fState == state && previous->fBatch->combineIfPossible(batch)) {
+ if (previous->batch()->combineIfPossible(batch)) {
GrBATCH_INFO("\tBatching with (%s, %u)\n",
previous->fBatch->name(), previous->fBatch->uniqueID());
return NULL;
}
}
- return GrNEW_APPEND_TO_RECORDER(*this->cmdBuffer(), DrawBatch, (state, batch,
- this->batchTarget()));
+ return GrNEW_APPEND_TO_RECORDER(*this->cmdBuffer(), DrawBatch, (batch, this->batchTarget()));
}
GrTargetCommands::Cmd*