Index: src/gpu/GrSoftwarePathRenderer.cpp |
diff --git a/src/gpu/GrSoftwarePathRenderer.cpp b/src/gpu/GrSoftwarePathRenderer.cpp |
index 90b35f7431a38e2e0f382c67757e796ff38d5238..4fb7538b03f3dce4ed9ba0a6543cb8372ff711fd 100644 |
--- a/src/gpu/GrSoftwarePathRenderer.cpp |
+++ b/src/gpu/GrSoftwarePathRenderer.cpp |
@@ -12,7 +12,7 @@ |
//////////////////////////////////////////////////////////////////////////////// |
bool GrSoftwarePathRenderer::canDrawPath(const GrDrawTarget*, |
- const GrDrawState*, |
+ const GrPipelineBuilder*, |
const SkMatrix& viewMatrix, |
const SkPath&, |
const SkStrokeRec&, |
@@ -26,7 +26,7 @@ bool GrSoftwarePathRenderer::canDrawPath(const GrDrawTarget*, |
GrPathRenderer::StencilSupport |
GrSoftwarePathRenderer::onGetStencilSupport(const GrDrawTarget*, |
- const GrDrawState*, |
+ const GrPipelineBuilder*, |
const SkPath&, |
const SkStrokeRec&) const { |
return GrPathRenderer::kNoSupport_StencilSupport; |
@@ -39,13 +39,13 @@ namespace { |
// path bounds will be a subset of the clip bounds. returns false if |
// path bounds would be empty. |
bool get_path_and_clip_bounds(const GrDrawTarget* target, |
- const GrDrawState* drawState, |
+ const GrPipelineBuilder* pipelineBuilder, |
const SkPath& path, |
const SkMatrix& matrix, |
SkIRect* devPathBounds, |
SkIRect* devClipBounds) { |
// compute bounds as intersection of rt size, clip, and path |
- const GrRenderTarget* rt = drawState->getRenderTarget(); |
+ const GrRenderTarget* rt = pipelineBuilder->getRenderTarget(); |
if (NULL == rt) { |
return false; |
} |
@@ -78,7 +78,7 @@ bool get_path_and_clip_bounds(const GrDrawTarget* target, |
//////////////////////////////////////////////////////////////////////////////// |
void draw_around_inv_path(GrDrawTarget* target, |
- GrDrawState* drawState, |
+ GrPipelineBuilder* pipelineBuilder, |
GrColor color, |
const SkMatrix& viewMatrix, |
const SkIRect& devClipBounds, |
@@ -92,22 +92,22 @@ void draw_around_inv_path(GrDrawTarget* target, |
if (devClipBounds.fTop < devPathBounds.fTop) { |
rect.iset(devClipBounds.fLeft, devClipBounds.fTop, |
devClipBounds.fRight, devPathBounds.fTop); |
- target->drawRect(drawState, color, SkMatrix::I(), rect, NULL, &invert); |
+ target->drawRect(pipelineBuilder, color, SkMatrix::I(), rect, NULL, &invert); |
} |
if (devClipBounds.fLeft < devPathBounds.fLeft) { |
rect.iset(devClipBounds.fLeft, devPathBounds.fTop, |
devPathBounds.fLeft, devPathBounds.fBottom); |
- target->drawRect(drawState, color, SkMatrix::I(), rect, NULL, &invert); |
+ target->drawRect(pipelineBuilder, color, SkMatrix::I(), rect, NULL, &invert); |
} |
if (devClipBounds.fRight > devPathBounds.fRight) { |
rect.iset(devPathBounds.fRight, devPathBounds.fTop, |
devClipBounds.fRight, devPathBounds.fBottom); |
- target->drawRect(drawState, color, SkMatrix::I(), rect, NULL, &invert); |
+ target->drawRect(pipelineBuilder, color, SkMatrix::I(), rect, NULL, &invert); |
} |
if (devClipBounds.fBottom > devPathBounds.fBottom) { |
rect.iset(devClipBounds.fLeft, devPathBounds.fBottom, |
devClipBounds.fRight, devClipBounds.fBottom); |
- target->drawRect(drawState, color, SkMatrix::I(), rect, NULL, &invert); |
+ target->drawRect(pipelineBuilder, color, SkMatrix::I(), rect, NULL, &invert); |
} |
} |
@@ -116,7 +116,7 @@ void draw_around_inv_path(GrDrawTarget* target, |
//////////////////////////////////////////////////////////////////////////////// |
// return true on success; false on failure |
bool GrSoftwarePathRenderer::onDrawPath(GrDrawTarget* target, |
- GrDrawState* drawState, |
+ GrPipelineBuilder* pipelineBuilder, |
GrColor color, |
const SkMatrix& viewMatrix, |
const SkPath& path, |
@@ -128,10 +128,11 @@ bool GrSoftwarePathRenderer::onDrawPath(GrDrawTarget* target, |
} |
SkIRect devPathBounds, devClipBounds; |
- if (!get_path_and_clip_bounds(target, drawState, path, viewMatrix, |
+ if (!get_path_and_clip_bounds(target, pipelineBuilder, path, viewMatrix, |
&devPathBounds, &devClipBounds)) { |
if (path.isInverseFillType()) { |
- draw_around_inv_path(target, drawState, color, viewMatrix, devClipBounds,devPathBounds); |
+ draw_around_inv_path(target, pipelineBuilder, color, viewMatrix, devClipBounds, |
+ devPathBounds); |
} |
return true; |
} |
@@ -144,12 +145,13 @@ bool GrSoftwarePathRenderer::onDrawPath(GrDrawTarget* target, |
return false; |
} |
- GrDrawState copy = *drawState; |
+ GrPipelineBuilder copy = *pipelineBuilder; |
GrSWMaskHelper::DrawToTargetWithPathMask(texture, target, ©, color, viewMatrix, |
devPathBounds); |
if (path.isInverseFillType()) { |
- draw_around_inv_path(target, drawState, color, viewMatrix, devClipBounds, devPathBounds); |
+ draw_around_inv_path(target, pipelineBuilder, color, viewMatrix, devClipBounds, |
+ devPathBounds); |
} |
return true; |