Index: src/gpu/GrInOrderDrawBuffer.cpp |
diff --git a/src/gpu/GrInOrderDrawBuffer.cpp b/src/gpu/GrInOrderDrawBuffer.cpp |
index 4629d4f7f03cd967da26f5b1c0f5522d8be2f85f..a760dcbf6fc4fd147811df36a5dd41ea7918c23e 100644 |
--- a/src/gpu/GrInOrderDrawBuffer.cpp |
+++ b/src/gpu/GrInOrderDrawBuffer.cpp |
@@ -247,13 +247,14 @@ |
void GrInOrderDrawBuffer::onDraw(const GrPipelineBuilder& pipelineBuilder, |
const GrGeometryProcessor* gp, |
const DrawInfo& info, |
- const GrScissorState& scissorState) { |
+ const GrScissorState& scissorState, |
+ const GrDeviceCoordTexture* dstCopy) { |
SkASSERT(info.vertexBuffer() && (!info.isIndexed() || info.indexBuffer())); |
// This closeBatch call is required because we may introduce new draws when we setup clip |
this->closeBatch(); |
- if (!this->recordStateAndShouldDraw(pipelineBuilder, gp, scissorState, info.getDevBounds())) { |
+ if (!this->recordStateAndShouldDraw(pipelineBuilder, gp, scissorState, dstCopy)) { |
return; |
} |
@@ -275,8 +276,8 @@ |
void GrInOrderDrawBuffer::onDrawBatch(GrBatch* batch, |
const GrPipelineBuilder& pipelineBuilder, |
const GrScissorState& scissorState, |
- const SkRect* devBounds) { |
- if (!this->recordStateAndShouldDraw(batch, pipelineBuilder, scissorState, devBounds)) { |
+ const GrDeviceCoordTexture* dstCopy) { |
+ if (!this->recordStateAndShouldDraw(batch, pipelineBuilder, scissorState, dstCopy)) { |
return; |
} |
@@ -315,11 +316,11 @@ |
const GrPath* path, |
const GrScissorState& scissorState, |
const GrStencilSettings& stencilSettings, |
- const SkRect* devBounds) { |
+ const GrDeviceCoordTexture* dstCopy) { |
this->closeBatch(); |
// TODO: Only compare the subset of GrPipelineBuilder relevant to path covering? |
- if (!this->recordStateAndShouldDraw(pipelineBuilder, pathProc, scissorState, devBounds)) { |
+ if (!this->recordStateAndShouldDraw(pipelineBuilder, pathProc, scissorState, dstCopy)) { |
return; |
} |
DrawPath* dp = GrNEW_APPEND_TO_RECORDER(fCmdBuffer, DrawPath, (path)); |
@@ -337,14 +338,14 @@ |
int count, |
const GrScissorState& scissorState, |
const GrStencilSettings& stencilSettings, |
- const SkRect* devBounds) { |
+ const GrDeviceCoordTexture* dstCopy) { |
SkASSERT(pathRange); |
SkASSERT(indices); |
SkASSERT(transformValues); |
this->closeBatch(); |
- if (!this->recordStateAndShouldDraw(pipelineBuilder, pathProc, scissorState, devBounds)) { |
+ if (!this->recordStateAndShouldDraw(pipelineBuilder, pathProc, scissorState, dstCopy)) { |
return; |
} |
@@ -485,6 +486,7 @@ |
if (ss->fPrimitiveProcessor) { |
this->getGpu()->buildProgramDesc(&ss->fDesc, *ss->fPrimitiveProcessor, |
ss->fPipeline, |
+ ss->fPipeline.descInfo(), |
ss->fBatchTracker); |
} |
currentState = ss; |
@@ -579,14 +581,10 @@ |
bool GrInOrderDrawBuffer::recordStateAndShouldDraw(const GrPipelineBuilder& pipelineBuilder, |
const GrPrimitiveProcessor* primProc, |
const GrScissorState& scissor, |
- const SkRect* devBounds) { |
- GrDeviceCoordTexture dstCopy; |
- if (!this->setupDstReadIfNecessary(pipelineBuilder, &dstCopy, devBounds)) { |
- return false; |
- } |
+ const GrDeviceCoordTexture* dstCopy) { |
SetState* ss = GrNEW_APPEND_TO_RECORDER(fCmdBuffer, SetState, |
(pipelineBuilder, primProc, *this->getGpu()->caps(), |
- scissor, &dstCopy)); |
+ scissor, dstCopy)); |
if (ss->fPipeline.mustSkip()) { |
fCmdBuffer.pop_back(); |
return false; |
@@ -611,17 +609,13 @@ |
bool GrInOrderDrawBuffer::recordStateAndShouldDraw(GrBatch* batch, |
const GrPipelineBuilder& pipelineBuilder, |
const GrScissorState& scissor, |
- const SkRect* devBounds) { |
- GrDeviceCoordTexture dstCopy; |
- if (!this->setupDstReadIfNecessary(pipelineBuilder, &dstCopy, devBounds)) { |
- return false; |
- } |
+ const GrDeviceCoordTexture* dstCopy) { |
// TODO this gets much simpler when we have batches everywhere. |
// If the previous command is also a set state, then we check to see if it has a Batch. If so, |
// and we can make the two batches equal, and we can combine the states, then we make them equal |
SetState* ss = GrNEW_APPEND_TO_RECORDER(fCmdBuffer, SetState, |
(batch, pipelineBuilder, *this->getGpu()->caps(), scissor, |
- &dstCopy)); |
+ dstCopy)); |
if (ss->fPipeline.mustSkip()) { |
fCmdBuffer.pop_back(); |
return false; |