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

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

Issue 418073002: Alter Default & Software path renderers to better handle AA hairline paths (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update to ToT Created 6 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/GrDefaultPathRenderer.cpp ('k') | no next file » | 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 12
13 //////////////////////////////////////////////////////////////////////////////// 13 ////////////////////////////////////////////////////////////////////////////////
14 bool GrSoftwarePathRenderer::canDrawPath(const SkPath&, 14 bool GrSoftwarePathRenderer::canDrawPath(const SkPath&,
15 const SkStrokeRec&, 15 const SkStrokeRec&,
16 const GrDrawTarget*, 16 const GrDrawTarget*,
17 bool antiAlias) const { 17 bool antiAlias) const {
18 if (!antiAlias || NULL == fContext) { 18 if (NULL == fContext) {
19 // TODO: We could allow the SW path to also handle non-AA paths but
20 // this would mean that GrDefaultPathRenderer would never be called
21 // (since it appears after the SW renderer in the path renderer
22 // chain). Some testing would need to be done r.e. performance
23 // and consistency of the resulting images before removing
24 // the "!antiAlias" clause from the above test
25 return false; 19 return false;
26 } 20 }
27 21
28 return true; 22 return true;
29 } 23 }
30 24
31 GrPathRenderer::StencilSupport GrSoftwarePathRenderer::onGetStencilSupport( 25 GrPathRenderer::StencilSupport GrSoftwarePathRenderer::onGetStencilSupport(
32 const SkPath&, 26 const SkPath&,
33 const SkStrokeRec&, 27 const SkStrokeRec&,
34 const GrDrawTarget*) const { 28 const GrDrawTarget*) const {
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 } 138 }
145 139
146 GrSWMaskHelper::DrawToTargetWithPathMask(texture, target, devPathBounds); 140 GrSWMaskHelper::DrawToTargetWithPathMask(texture, target, devPathBounds);
147 141
148 if (path.isInverseFillType()) { 142 if (path.isInverseFillType()) {
149 draw_around_inv_path(target, devClipBounds, devPathBounds); 143 draw_around_inv_path(target, devClipBounds, devPathBounds);
150 } 144 }
151 145
152 return true; 146 return true;
153 } 147 }
OLDNEW
« no previous file with comments | « src/gpu/GrDefaultPathRenderer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698