Index: src/gpu/GrGpu.cpp |
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp |
index a4aa00eac12b53406a4cf0a02a82438c84743769..f8c528150c7c39e25cf2203e2699b3aa1fa039af 100644 |
--- a/src/gpu/GrGpu.cpp |
+++ b/src/gpu/GrGpu.cpp |
@@ -349,10 +349,8 @@ void GrGpu::onDraw(const DrawInfo& info) { |
void GrGpu::onStencilPath(const GrPath* path, const SkStrokeRec&, SkPath::FillType fill) { |
this->handleDirtyContext(); |
- // TODO: make this more efficient (don't copy and copy back) |
- GrAutoTRestore<GrStencilSettings> asr(this->drawState()->stencil()); |
+ this->drawState()->setStencilPathSettings(this->getStencilPathSettings(*path, fill)); |
- this->setStencilPathSettings(*path, fill, this->drawState()->stencil()); |
GrDrawState::AutoRestoreEffects are; |
if (!this->setupClipAndFlushState(kStencilPath_DrawType, NULL, &are)) { |
return; |
@@ -361,6 +359,20 @@ void GrGpu::onStencilPath(const GrPath* path, const SkStrokeRec&, SkPath::FillTy |
this->onGpuStencilPath(path, fill); |
} |
+void GrGpu::onDrawPath(const GrPath* path, const SkStrokeRec& stroke, SkPath::FillType fill) { |
+ this->handleDirtyContext(); |
+ |
+ this->drawState()->setStencilPathSettings(this->getStencilPathSettings(*path, fill)); |
+ |
+ GrDrawState::AutoRestoreEffects are; |
+ // TODO: Some blending effects require destination texture, see onDraw |
+ if (!this->setupClipAndFlushState(kDrawPath_DrawType, NULL, &are)) { |
+ return; |
+ } |
+ |
+ this->onGpuDrawPath(path, fill); |
+} |
+ |
void GrGpu::finalizeReservedVertices() { |
SkASSERT(NULL != fVertexPool); |
fVertexPool->unlock(); |