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

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

Issue 1310533004: Standardize BW to NonAA (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('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 9
10 #include "GrStencilAndCoverPathRenderer.h" 10 #include "GrStencilAndCoverPathRenderer.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 // theoretically could set bloat = 0, instead leave it because of ma trix inversion 130 // theoretically could set bloat = 0, instead leave it because of ma trix inversion
131 // precision. 131 // precision.
132 SkScalar bloat = viewMatrix.getMaxScale() * SK_ScalarHalf; 132 SkScalar bloat = viewMatrix.getMaxScale() * SK_ScalarHalf;
133 bounds.outset(bloat, bloat); 133 bounds.outset(bloat, bloat);
134 } else { 134 } else {
135 if (!viewMatrix.invert(&invert)) { 135 if (!viewMatrix.invert(&invert)) {
136 return false; 136 return false;
137 } 137 }
138 } 138 }
139 const SkMatrix& viewM = viewMatrix.hasPerspective() ? SkMatrix::I() : vi ewMatrix; 139 const SkMatrix& viewM = viewMatrix.hasPerspective() ? SkMatrix::I() : vi ewMatrix;
140 args.fTarget->drawBWRect(*pipelineBuilder, args.fColor, viewM, bounds, i nvert); 140 args.fTarget->drawNonAARect(*pipelineBuilder, args.fColor, viewM, bounds , invert);
141 } else { 141 } else {
142 GR_STATIC_CONST_SAME_STENCIL(kStencilPass, 142 GR_STATIC_CONST_SAME_STENCIL(kStencilPass,
143 kZero_StencilOp, 143 kZero_StencilOp,
144 kKeep_StencilOp, 144 kKeep_StencilOp,
145 kNotEqual_StencilFunc, 145 kNotEqual_StencilFunc,
146 0xffff, 146 0xffff,
147 0x0000, 147 0x0000,
148 0xffff); 148 0xffff);
149 149
150 pipelineBuilder->setStencil(kStencilPass); 150 pipelineBuilder->setStencil(kStencilPass);
151 SkAutoTUnref<GrPathProcessor> pp(GrPathProcessor::Create(args.fColor, vi ewMatrix)); 151 SkAutoTUnref<GrPathProcessor> pp(GrPathProcessor::Create(args.fColor, vi ewMatrix));
152 args.fTarget->drawPath(*pipelineBuilder, pp, p, 152 args.fTarget->drawPath(*pipelineBuilder, pp, p,
153 convert_skpath_filltype(path.getFillType())); 153 convert_skpath_filltype(path.getFillType()));
154 } 154 }
155 155
156 pipelineBuilder->stencil()->setDisabled(); 156 pipelineBuilder->stencil()->setDisabled();
157 return true; 157 return true;
158 } 158 }
OLDNEW
« no previous file with comments | « src/gpu/GrSoftwarePathRenderer.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698