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

Side by Side Diff: src/gpu/GrSoftwarePathRenderer.cpp

Issue 1291803006: Simplify parameters passed to path renderers (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add more validate methods Created 5 years, 4 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 unified diff | Download patch
« no previous file with comments | « src/gpu/GrSoftwarePathRenderer.h ('k') | src/gpu/GrStencilAndCoverPathRenderer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrSoftwarePathRenderer.h" 9 #include "GrSoftwarePathRenderer.h"
10 #include "GrContext.h" 10 #include "GrContext.h"
11 #include "GrSWMaskHelper.h" 11 #include "GrSWMaskHelper.h"
12 #include "GrVertexBuffer.h" 12 #include "GrVertexBuffer.h"
13 13
14 //////////////////////////////////////////////////////////////////////////////// 14 ////////////////////////////////////////////////////////////////////////////////
15 bool GrSoftwarePathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const { 15 bool GrSoftwarePathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const {
16 if (NULL == fContext) { 16 if (NULL == fContext) {
17 return false; 17 return false;
18 } 18 }
19 if (args.fStroke->isDashed()) { 19 if (args.fStroke->isDashed()) {
20 return false; 20 return false;
21 } 21 }
22 return true; 22 return true;
23 } 23 }
24 24
25 GrPathRenderer::StencilSupport
26 GrSoftwarePathRenderer::onGetStencilSupport(const GrDrawTarget*,
27 const GrPipelineBuilder*,
28 const SkPath&,
29 const GrStrokeInfo&) const {
30 return GrPathRenderer::kNoSupport_StencilSupport;
31 }
32
33 namespace { 25 namespace {
34 26
35 //////////////////////////////////////////////////////////////////////////////// 27 ////////////////////////////////////////////////////////////////////////////////
36 // gets device coord bounds of path (not considering the fill) and clip. The 28 // gets device coord bounds of path (not considering the fill) and clip. The
37 // path bounds will be a subset of the clip bounds. returns false if 29 // path bounds will be a subset of the clip bounds. returns false if
38 // path bounds would be empty. 30 // path bounds would be empty.
39 bool get_path_and_clip_bounds(const GrDrawTarget* target, 31 bool get_path_and_clip_bounds(const GrDrawTarget* target,
40 const GrPipelineBuilder* pipelineBuilder, 32 const GrPipelineBuilder* pipelineBuilder,
41 const SkPath& path, 33 const SkPath& path,
42 const SkMatrix& matrix, 34 const SkMatrix& matrix,
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 GrSWMaskHelper::DrawToTargetWithPathMask(texture, args.fTarget, args.fPipeli neBuilder, 130 GrSWMaskHelper::DrawToTargetWithPathMask(texture, args.fTarget, args.fPipeli neBuilder,
139 args.fColor, *args.fViewMatrix, dev PathBounds); 131 args.fColor, *args.fViewMatrix, dev PathBounds);
140 132
141 if (args.fPath->isInverseFillType()) { 133 if (args.fPath->isInverseFillType()) {
142 draw_around_inv_path(args.fTarget, args.fPipelineBuilder, args.fColor, * args.fViewMatrix, 134 draw_around_inv_path(args.fTarget, args.fPipelineBuilder, args.fColor, * args.fViewMatrix,
143 devClipBounds, devPathBounds); 135 devClipBounds, devPathBounds);
144 } 136 }
145 137
146 return true; 138 return true;
147 } 139 }
OLDNEW
« no previous file with comments | « src/gpu/GrSoftwarePathRenderer.h ('k') | src/gpu/GrStencilAndCoverPathRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698