Index: src/gpu/GrGpu.cpp |
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp |
index 221aaec0702b6b3b262dd3bd7ef004362b9e7e97..6edc2640cdc6ca079723e1b84940bdaa3d8445d7 100644 |
--- a/src/gpu/GrGpu.cpp |
+++ b/src/gpu/GrGpu.cpp |
@@ -300,14 +300,18 @@ const GrIndexBuffer* GrGpu::getQuadIndexBuffer() const { |
bool GrGpu::setupClipAndFlushState(DrawType type, |
const GrDeviceCoordTexture* dstCopy, |
- GrDrawState::AutoRestoreEffects* are, |
- const SkRect* devBounds) { |
- GrDrawState::AutoRestoreStencil asr; |
- if (!fClipMaskManager.setupClipping(this->getClip(), are, &asr, devBounds)) { |
+ const GrDrawTarget::DrawInfo& drawInfo, |
+ GrDrawState::AutoRestoreEffects* are) { |
+ DrawInfo modifiableDrawInfo = drawInfo; |
+ GrDrawState::AutoRestoreStencil arStencil; |
bsalomon
2014/10/27 19:41:23
Here it's arStencil, but the param is named asSten
|
+ if (!fClipMaskManager.setupClipping(this->getClip(), |
+ &modifiableDrawInfo, |
+ are, |
+ &arStencil)) { |
return false; |
} |
- if (!this->flushGraphicsState(type, dstCopy)) { |
+ if (!this->flushGraphicsState(modifiableDrawInfo, type, dstCopy)) { |
return false; |
} |
@@ -347,7 +351,9 @@ void GrGpu::onDraw(const DrawInfo& info) { |
this->handleDirtyContext(); |
GrDrawState::AutoRestoreEffects are; |
if (!this->setupClipAndFlushState(PrimTypeToDrawType(info.primitiveType()), |
- info.getDstCopy(), &are, info.getDevBounds())) { |
+ info.getDstCopy(), |
bsalomon
2014/10/27 19:41:23
Need to pass dst copy separately when it's already
|
+ info, |
+ &are)) { |
return; |
} |
this->onGpuDraw(info); |
@@ -356,8 +362,12 @@ void GrGpu::onDraw(const DrawInfo& info) { |
void GrGpu::onStencilPath(const GrPath* path, SkPath::FillType fill) { |
this->handleDirtyContext(); |
+ GrDrawTarget::DrawInfo drawInfo; |
GrDrawState::AutoRestoreEffects are; |
- if (!this->setupClipAndFlushState(kStencilPath_DrawType, NULL, &are, NULL)) { |
+ if (!this->setupClipAndFlushState(kStencilPath_DrawType, |
+ NULL, |
+ drawInfo, |
+ &are)) { |
return; |
} |
@@ -371,8 +381,12 @@ void GrGpu::onDrawPath(const GrPath* path, SkPath::FillType fill, |
drawState()->setDefaultVertexAttribs(); |
+ GrDrawTarget::DrawInfo drawInfo; |
bsalomon
2014/10/27 19:41:23
Eek
|
GrDrawState::AutoRestoreEffects are; |
- if (!this->setupClipAndFlushState(kDrawPath_DrawType, dstCopy, &are, NULL)) { |
+ if (!this->setupClipAndFlushState(kDrawPath_DrawType, |
+ dstCopy, |
+ drawInfo, |
+ &are)) { |
return; |
} |
@@ -387,8 +401,12 @@ void GrGpu::onDrawPaths(const GrPathRange* pathRange, |
drawState()->setDefaultVertexAttribs(); |
+ GrDrawTarget::DrawInfo drawInfo; |
GrDrawState::AutoRestoreEffects are; |
- if (!this->setupClipAndFlushState(kDrawPaths_DrawType, dstCopy, &are, NULL)) { |
+ if (!this->setupClipAndFlushState(kDrawPaths_DrawType, |
+ dstCopy, |
+ drawInfo, |
+ &are)) { |
return; |
} |