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

Side by Side Diff: src/gpu/GrPathRenderer.h

Issue 787233003: Add XP to handle the cases where we disable color write. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update Created 6 years 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/GrPaint.cpp ('k') | src/gpu/GrProcessor.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 2011 Google Inc. 3 * Copyright 2011 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 #ifndef GrPathRenderer_DEFINED 9 #ifndef GrPathRenderer_DEFINED
10 #define GrPathRenderer_DEFINED 10 #define GrPathRenderer_DEFINED
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 const SkPath& path, 190 const SkPath& path,
191 const SkStrokeRec& stroke) { 191 const SkStrokeRec& stroke) {
192 GR_STATIC_CONST_SAME_STENCIL(kIncrementStencil, 192 GR_STATIC_CONST_SAME_STENCIL(kIncrementStencil,
193 kReplace_StencilOp, 193 kReplace_StencilOp,
194 kReplace_StencilOp, 194 kReplace_StencilOp,
195 kAlways_StencilFunc, 195 kAlways_StencilFunc,
196 0xffff, 196 0xffff,
197 0xffff, 197 0xffff,
198 0xffff); 198 0xffff);
199 drawState->setStencil(kIncrementStencil); 199 drawState->setStencil(kIncrementStencil);
200 drawState->enableState(GrDrawState::kNoColorWrites_StateBit); 200 drawState->setDisableColorXPFactory();
201 this->drawPath(target, drawState, GrColor_WHITE, path, stroke, false); 201 this->drawPath(target, drawState, GrColor_WHITE, path, stroke, false);
202 } 202 }
203 203
204 // Helper for getting the device bounds of a path. Inverse filled paths will have bounds set 204 // Helper for getting the device bounds of a path. Inverse filled paths will have bounds set
205 // by devSize. Non-inverse path bounds will not necessarily be clipped to de vSize. 205 // by devSize. Non-inverse path bounds will not necessarily be clipped to de vSize.
206 static void GetPathDevBounds(const SkPath& path, 206 static void GetPathDevBounds(const SkPath& path,
207 int devW, 207 int devW,
208 int devH, 208 int devH,
209 const SkMatrix& matrix, 209 const SkMatrix& matrix,
210 SkRect* bounds); 210 SkRect* bounds);
211 211
212 // Helper version that gets the dev width and height from a GrSurface. 212 // Helper version that gets the dev width and height from a GrSurface.
213 static void GetPathDevBounds(const SkPath& path, 213 static void GetPathDevBounds(const SkPath& path,
214 const GrSurface* device, 214 const GrSurface* device,
215 const SkMatrix& matrix, 215 const SkMatrix& matrix,
216 SkRect* bounds) { 216 SkRect* bounds) {
217 GetPathDevBounds(path, device->width(), device->height(), matrix, bounds ); 217 GetPathDevBounds(path, device->width(), device->height(), matrix, bounds );
218 } 218 }
219 219
220 private: 220 private:
221 221
222 typedef SkRefCnt INHERITED; 222 typedef SkRefCnt INHERITED;
223 }; 223 };
224 224
225 #endif 225 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrPaint.cpp ('k') | src/gpu/GrProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698