Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(233)

Unified Diff: src/gpu/GrSoftwarePathRenderer.cpp

Issue 2167183002: Minor change to Ganesh path renderers (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrSoftwarePathRenderer.h ('k') | src/gpu/batches/GrDefaultPathRenderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrSoftwarePathRenderer.cpp
diff --git a/src/gpu/GrSoftwarePathRenderer.cpp b/src/gpu/GrSoftwarePathRenderer.cpp
index 54d4851b1c092972a652071766f1cbbecd5232df..87b0926a8c0736f29ef97a4d96fb235b462ad3dc 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);
}
« no previous file with comments | « src/gpu/GrSoftwarePathRenderer.h ('k') | src/gpu/batches/GrDefaultPathRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698