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

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

Issue 1087323002: Implement caching in the tessellating path renderer, including strokes. Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: NULL -> nullptr 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/GrDrawContext.cpp ('k') | src/gpu/GrTessellatingPathRenderer.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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 */ 137 */
138 struct DrawPathArgs { 138 struct DrawPathArgs {
139 GrDrawTarget* fTarget; 139 GrDrawTarget* fTarget;
140 GrResourceProvider* fResourceProvider; 140 GrResourceProvider* fResourceProvider;
141 GrPipelineBuilder* fPipelineBuilder; 141 GrPipelineBuilder* fPipelineBuilder;
142 GrColor fColor; 142 GrColor fColor;
143 const SkMatrix* fViewMatrix; 143 const SkMatrix* fViewMatrix;
144 const SkPath* fPath; 144 const SkPath* fPath;
145 const GrStrokeInfo* fStroke; 145 const GrStrokeInfo* fStroke;
146 bool fAntiAlias; 146 bool fAntiAlias;
147 const SkPath* fOrigSrcPath;
148 const GrStrokeInfo* fOrigStrokeInfo;
147 }; 149 };
148 150
149 /** 151 /**
150 * Draws the path into the draw target. If getStencilSupport() would return kNoRestriction then 152 * Draws the path into the draw target. If getStencilSupport() would return kNoRestriction then
151 * the subclass must respect the stencil settings of the GrPipelineBuilder. 153 * the subclass must respect the stencil settings of the GrPipelineBuilder.
152 */ 154 */
153 bool drawPath(const DrawPathArgs& args) { 155 bool drawPath(const DrawPathArgs& args) {
154 SkASSERT(args.fTarget); 156 SkASSERT(args.fTarget);
155 SkASSERT(args.fPipelineBuilder); 157 SkASSERT(args.fPipelineBuilder);
156 SkASSERT(args.fViewMatrix); 158 SkASSERT(args.fViewMatrix);
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 args.fPipelineBuilder->setDisableColorXPFactory(); 285 args.fPipelineBuilder->setDisableColorXPFactory();
284 DrawPathArgs drawArgs; 286 DrawPathArgs drawArgs;
285 drawArgs.fTarget = args.fTarget; 287 drawArgs.fTarget = args.fTarget;
286 drawArgs.fResourceProvider = args.fResourceProvider; 288 drawArgs.fResourceProvider = args.fResourceProvider;
287 drawArgs.fPipelineBuilder = args.fPipelineBuilder; 289 drawArgs.fPipelineBuilder = args.fPipelineBuilder;
288 drawArgs.fColor = 0xFFFFFFFF; 290 drawArgs.fColor = 0xFFFFFFFF;
289 drawArgs.fViewMatrix = args.fViewMatrix; 291 drawArgs.fViewMatrix = args.fViewMatrix;
290 drawArgs.fPath = args.fPath; 292 drawArgs.fPath = args.fPath;
291 drawArgs.fStroke = args.fStroke; 293 drawArgs.fStroke = args.fStroke;
292 drawArgs.fAntiAlias = false; 294 drawArgs.fAntiAlias = false;
295 drawArgs.fOrigSrcPath = nullptr;
296 drawArgs.fOrigStrokeInfo = nullptr;
293 this->drawPath(drawArgs); 297 this->drawPath(drawArgs);
294 } 298 }
295 299
296 300
297 typedef SkRefCnt INHERITED; 301 typedef SkRefCnt INHERITED;
298 }; 302 };
299 303
300 #endif 304 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDrawContext.cpp ('k') | src/gpu/GrTessellatingPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698