aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrSoftwarePathRenderer.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2016-07-21 08:55:08 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-07-21 08:55:08 -0700
commitd2b6d6486ed9d00df779f6b337d756c9a818006f (patch)
tree42dec09e869f89f94a3085844942e403bc0f34f4 /src/gpu/GrSoftwarePathRenderer.cpp
parent7b33bf1d2a8664235a9eb372024641d2da1a0dad (diff)
Minor change to Ganesh path renderers
In large part this is an attempt to get non-substantive changes out of https://codereview.chromium.org/2092893003/ (Retract PipelineBuilder some more) All the other parameters extracted from DrawPathArgs are passed around by reference except for the userStencilSettings GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2167183002 Review-Url: https://codereview.chromium.org/2167183002
Diffstat (limited to 'src/gpu/GrSoftwarePathRenderer.cpp')
-rw-r--r--src/gpu/GrSoftwarePathRenderer.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gpu/GrSoftwarePathRenderer.cpp b/src/gpu/GrSoftwarePathRenderer.cpp
index 54d4851b1c..87b0926a8c 100644
--- a/src/gpu/GrSoftwarePathRenderer.cpp
+++ b/src/gpu/GrSoftwarePathRenderer.cpp
@@ -63,7 +63,7 @@ bool get_shape_and_clip_bounds(int width, int height,
void GrSoftwarePathRenderer::DrawNonAARect(GrDrawContext* drawContext,
const GrPaint& paint,
- const GrUserStencilSettings* userStencilSettings,
+ const GrUserStencilSettings& userStencilSettings,
const GrClip& clip,
const SkMatrix& viewMatrix,
const SkRect& rect,
@@ -73,14 +73,14 @@ void GrSoftwarePathRenderer::DrawNonAARect(GrDrawContext* drawContext,
nullptr, &localMatrix));
GrPipelineBuilder pipelineBuilder(paint, drawContext->mustUseHWAA(paint));
- pipelineBuilder.setUserStencil(userStencilSettings);
+ pipelineBuilder.setUserStencil(&userStencilSettings);
drawContext->drawBatch(pipelineBuilder, clip, batch);
}
void GrSoftwarePathRenderer::DrawAroundInvPath(GrDrawContext* drawContext,
const GrPaint& paint,
- const GrUserStencilSettings* userStencilSettings,
+ const GrUserStencilSettings& userStencilSettings,
const GrClip& clip,
const SkMatrix& viewMatrix,
const SkIRect& devClipBounds,
@@ -137,7 +137,7 @@ bool GrSoftwarePathRenderer::onDrawPath(const DrawPathArgs& args) {
*args.fClip, *args.fShape,
*args.fViewMatrix, &devShapeBounds, &devClipBounds)) {
if (inverseFilled) {
- DrawAroundInvPath(args.fDrawContext, *args.fPaint, args.fUserStencilSettings,
+ DrawAroundInvPath(args.fDrawContext, *args.fPaint, *args.fUserStencilSettings,
*args.fClip,
*args.fViewMatrix, devClipBounds, devShapeBounds);
@@ -148,17 +148,17 @@ bool GrSoftwarePathRenderer::onDrawPath(const DrawPathArgs& args) {
SkAutoTUnref<GrTexture> texture(
GrSWMaskHelper::DrawShapeMaskToTexture(fTexProvider, *args.fShape, devShapeBounds,
args.fAntiAlias, args.fViewMatrix));
- if (nullptr == texture) {
+ if (!texture) {
return false;
}
GrSWMaskHelper::DrawToTargetWithShapeMask(texture, args.fDrawContext, *args.fPaint,
- args.fUserStencilSettings,
+ *args.fUserStencilSettings,
*args.fClip, *args.fViewMatrix,
devShapeBounds);
if (inverseFilled) {
- DrawAroundInvPath(args.fDrawContext, *args.fPaint, args.fUserStencilSettings,
+ DrawAroundInvPath(args.fDrawContext, *args.fPaint, *args.fUserStencilSettings,
*args.fClip,
*args.fViewMatrix, devClipBounds, devShapeBounds);
}