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

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

Issue 2126083002: Remove fColor from PathRenderer DrawPathArgs struct (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove unnecessary GrPaint::setColor calls Created 4 years, 5 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/GrDrawContext.cpp ('k') | src/gpu/GrSWMaskHelper.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 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrPathRenderer_DEFINED 8 #ifndef GrPathRenderer_DEFINED
9 #define GrPathRenderer_DEFINED 9 #define GrPathRenderer_DEFINED
10 10
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 * fAntiAlias true if anti-aliasing is required. 123 * fAntiAlias true if anti-aliasing is required.
124 * fGammaCorrect true if gamma-correct rendering is to be used. 124 * fGammaCorrect true if gamma-correct rendering is to be used.
125 */ 125 */
126 struct DrawPathArgs { 126 struct DrawPathArgs {
127 GrResourceProvider* fResourceProvider; 127 GrResourceProvider* fResourceProvider;
128 const GrPaint* fPaint; 128 const GrPaint* fPaint;
129 const GrUserStencilSettings*fUserStencilSettings; 129 const GrUserStencilSettings*fUserStencilSettings;
130 130
131 GrDrawContext* fDrawContext; 131 GrDrawContext* fDrawContext;
132 const GrClip* fClip; 132 const GrClip* fClip;
133 GrColor fColor;
134 const SkMatrix* fViewMatrix; 133 const SkMatrix* fViewMatrix;
135 const GrShape* fShape; 134 const GrShape* fShape;
136 bool fAntiAlias; 135 bool fAntiAlias;
137 bool fGammaCorrect; 136 bool fGammaCorrect;
138 #ifdef SK_DEBUG 137 #ifdef SK_DEBUG
139 void validate() const { 138 void validate() const {
140 SkASSERT(fResourceProvider); 139 SkASSERT(fResourceProvider);
141 SkASSERT(fPaint); 140 SkASSERT(fPaint);
142 SkASSERT(fUserStencilSettings); 141 SkASSERT(fUserStencilSettings);
143 SkASSERT(fDrawContext); 142 SkASSERT(fDrawContext);
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 0xffff>() 273 0xffff>()
275 ); 274 );
276 275
277 GrPaint paint; 276 GrPaint paint;
278 277
279 DrawPathArgs drawArgs; 278 DrawPathArgs drawArgs;
280 drawArgs.fResourceProvider = args.fResourceProvider; 279 drawArgs.fResourceProvider = args.fResourceProvider;
281 drawArgs.fPaint = &paint; 280 drawArgs.fPaint = &paint;
282 drawArgs.fUserStencilSettings = &kIncrementStencil; 281 drawArgs.fUserStencilSettings = &kIncrementStencil;
283 drawArgs.fDrawContext = args.fDrawContext; 282 drawArgs.fDrawContext = args.fDrawContext;
284 drawArgs.fColor = GrColor_WHITE;
285 drawArgs.fViewMatrix = args.fViewMatrix; 283 drawArgs.fViewMatrix = args.fViewMatrix;
286 drawArgs.fShape = args.fShape; 284 drawArgs.fShape = args.fShape;
287 drawArgs.fAntiAlias = false; // In this case the MSAA handles the AA so we want to draw BW 285 drawArgs.fAntiAlias = false; // In this case the MSAA handles the AA so we want to draw BW
288 drawArgs.fGammaCorrect = false; 286 drawArgs.fGammaCorrect = false;
289 this->drawPath(drawArgs); 287 this->drawPath(drawArgs);
290 } 288 }
291 289
292 typedef SkRefCnt INHERITED; 290 typedef SkRefCnt INHERITED;
293 }; 291 };
294 292
295 #endif 293 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/GrSWMaskHelper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698