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

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

Issue 1151283004: Split drawing functionality out of GrContext and into new GrDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix no-GPU builds Created 5 years, 6 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/GrStencilAndCoverTextContext.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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 // theoretically could set bloat = 0, instead leave it because of ma trix inversion 135 // theoretically could set bloat = 0, instead leave it because of ma trix inversion
136 // precision. 136 // precision.
137 SkScalar bloat = viewMatrix.getMaxScale() * SK_ScalarHalf; 137 SkScalar bloat = viewMatrix.getMaxScale() * SK_ScalarHalf;
138 bounds.outset(bloat, bloat); 138 bounds.outset(bloat, bloat);
139 } else { 139 } else {
140 if (!viewMatrix.invert(&invert)) { 140 if (!viewMatrix.invert(&invert)) {
141 return false; 141 return false;
142 } 142 }
143 } 143 }
144 const SkMatrix& viewM = viewMatrix.hasPerspective() ? SkMatrix::I() : vi ewMatrix; 144 const SkMatrix& viewM = viewMatrix.hasPerspective() ? SkMatrix::I() : vi ewMatrix;
145 target->drawRect(pipelineBuilder, color, viewM, bounds, NULL, &invert); 145 target->drawBWRect(pipelineBuilder, color, viewM, bounds, NULL, &invert) ;
146 } else { 146 } else {
147 GR_STATIC_CONST_SAME_STENCIL(kStencilPass, 147 GR_STATIC_CONST_SAME_STENCIL(kStencilPass,
148 kZero_StencilOp, 148 kZero_StencilOp,
149 kZero_StencilOp, 149 kZero_StencilOp,
150 kNotEqual_StencilFunc, 150 kNotEqual_StencilFunc,
151 0xffff, 151 0xffff,
152 0x0000, 152 0x0000,
153 0xffff); 153 0xffff);
154 154
155 pipelineBuilder->setStencil(kStencilPass); 155 pipelineBuilder->setStencil(kStencilPass);
156 SkAutoTUnref<GrPathProcessor> pp(GrPathProcessor::Create(color, viewMatr ix)); 156 SkAutoTUnref<GrPathProcessor> pp(GrPathProcessor::Create(color, viewMatr ix));
157 target->drawPath(pipelineBuilder, pp, p, convert_skpath_filltype(path.ge tFillType())); 157 target->drawPath(pipelineBuilder, pp, p, convert_skpath_filltype(path.ge tFillType()));
158 } 158 }
159 159
160 pipelineBuilder->stencil()->setDisabled(); 160 pipelineBuilder->stencil()->setDisabled();
161 return true; 161 return true;
162 } 162 }
OLDNEW
« no previous file with comments | « src/gpu/GrSoftwarePathRenderer.cpp ('k') | src/gpu/GrStencilAndCoverTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698