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

Unified Diff: src/gpu/GrBufferedDrawTarget.cpp

Issue 1275003004: Remove GrPipelineOptimizations member from GrPipeline (Closed) Base URL: https://skia.googlesource.com/skia.git@opt
Patch Set: rebase 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 | « src/gpu/GrBufferedDrawTarget.h ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrBufferedDrawTarget.cpp
diff --git a/src/gpu/GrBufferedDrawTarget.cpp b/src/gpu/GrBufferedDrawTarget.cpp
index 21a63826cc7f62f58a6441de695a4717c13a00ad..1abf8138014d3e69b3d75e416fdf95530084b98f 100644
--- a/src/gpu/GrBufferedDrawTarget.cpp
+++ b/src/gpu/GrBufferedDrawTarget.cpp
@@ -28,7 +28,8 @@ GrBufferedDrawTarget::~GrBufferedDrawTarget() {
void GrBufferedDrawTarget::onDrawBatch(GrBatch* batch,
const PipelineInfo& pipelineInfo) {
- State* state = this->setupPipelineAndShouldDraw(batch, pipelineInfo);
+ GrPipelineOptimizations opts;
+ State* state = this->setupPipelineAndShouldDraw(batch, pipelineInfo, &opts);
if (!state) {
return;
}
@@ -52,7 +53,8 @@ void GrBufferedDrawTarget::onDrawPath(const GrPathProcessor* pathProc,
const GrPath* path,
const GrStencilSettings& stencilSettings,
const PipelineInfo& pipelineInfo) {
- State* state = this->setupPipelineAndShouldDraw(pathProc, pipelineInfo);
+ GrPipelineOptimizations opts;
+ State* state = this->setupPipelineAndShouldDraw(pathProc, pipelineInfo, &opts);
if (!state) {
return;
}
@@ -69,7 +71,8 @@ void GrBufferedDrawTarget::onDrawPaths(const GrPathProcessor* pathProc,
int count,
const GrStencilSettings& stencilSettings,
const PipelineInfo& pipelineInfo) {
- State* state = this->setupPipelineAndShouldDraw(pathProc, pipelineInfo);
+ GrPipelineOptimizations opts;
+ State* state = this->setupPipelineAndShouldDraw(pathProc, pipelineInfo, &opts);
if (!state) {
return;
}
@@ -148,17 +151,17 @@ void GrBufferedDrawTarget::recordTraceMarkersIfNecessary(GrTargetCommands::Cmd*
GrTargetCommands::State*
GrBufferedDrawTarget::setupPipelineAndShouldDraw(const GrPrimitiveProcessor* primProc,
- const GrDrawTarget::PipelineInfo& pipelineInfo) {
+ const GrDrawTarget::PipelineInfo& pipelineInfo,
+ GrPipelineOptimizations* opts) {
State* state = this->allocState(primProc);
- this->setupPipeline(pipelineInfo, state->pipelineLocation());
+ this->setupPipeline(pipelineInfo, state->pipelineLocation(), opts);
if (state->getPipeline()->mustSkip()) {
this->unallocState(state);
return NULL;
}
- state->fPrimitiveProcessor->initBatchTracker(
- &state->fBatchTracker, state->getPipeline()->infoForPrimitiveProcessor());
+ state->fPrimitiveProcessor->initBatchTracker(&state->fBatchTracker, *opts);
if (fPrevState && fPrevState->fPrimitiveProcessor.get() &&
fPrevState->fPrimitiveProcessor->canMakeEqual(fPrevState->fBatchTracker,
@@ -177,16 +180,17 @@ GrBufferedDrawTarget::setupPipelineAndShouldDraw(const GrPrimitiveProcessor* pri
GrTargetCommands::State*
GrBufferedDrawTarget::setupPipelineAndShouldDraw(GrBatch* batch,
- const GrDrawTarget::PipelineInfo& pipelineInfo) {
+ const GrDrawTarget::PipelineInfo& pipelineInfo,
+ GrPipelineOptimizations* opts) {
State* state = this->allocState();
- this->setupPipeline(pipelineInfo, state->pipelineLocation());
+ this->setupPipeline(pipelineInfo, state->pipelineLocation(), opts);
if (state->getPipeline()->mustSkip()) {
this->unallocState(state);
return NULL;
}
- batch->initBatchTracker(state->getPipeline()->infoForPrimitiveProcessor());
+ batch->initBatchTracker(*opts);
if (fPrevState && !fPrevState->fPrimitiveProcessor.get() &&
fPrevState->getPipeline()->isEqual(*state->getPipeline())) {
« no previous file with comments | « src/gpu/GrBufferedDrawTarget.h ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698