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

Side by Side Diff: src/gpu/batches/GrTessellatingPathRenderer.cpp

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
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 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 #include "GrTessellatingPathRenderer.h" 8 #include "GrTessellatingPathRenderer.h"
9 9
10 #include "GrAuditTrail.h" 10 #include "GrAuditTrail.h"
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 args.fClip->getConservativeBounds(args.fDrawContext->width(), args.fDrawCont ext->height(), 264 args.fClip->getConservativeBounds(args.fDrawContext->width(), args.fDrawCont ext->height(),
265 &clipBoundsI); 265 &clipBoundsI);
266 SkRect clipBounds = SkRect::Make(clipBoundsI); 266 SkRect clipBounds = SkRect::Make(clipBoundsI);
267 SkMatrix vmi; 267 SkMatrix vmi;
268 if (!args.fViewMatrix->invert(&vmi)) { 268 if (!args.fViewMatrix->invert(&vmi)) {
269 return false; 269 return false;
270 } 270 }
271 vmi.mapRect(&clipBounds); 271 vmi.mapRect(&clipBounds);
272 SkPath path; 272 SkPath path;
273 args.fShape->asPath(&path); 273 args.fShape->asPath(&path);
274 SkAutoTUnref<GrDrawBatch> batch(TessellatingPathBatch::Create(args.fColor, * args.fShape, 274 SkAutoTUnref<GrDrawBatch> batch(TessellatingPathBatch::Create(args.fPaint->g etColor(),
275 *args.fShape,
275 *args.fViewMat rix, clipBounds)); 276 *args.fViewMat rix, clipBounds));
276 277
277 GrPipelineBuilder pipelineBuilder(*args.fPaint, args.fDrawContext->mustUseHW AA(*args.fPaint)); 278 GrPipelineBuilder pipelineBuilder(*args.fPaint, args.fDrawContext->mustUseHW AA(*args.fPaint));
278 pipelineBuilder.setUserStencil(args.fUserStencilSettings); 279 pipelineBuilder.setUserStencil(args.fUserStencilSettings);
279 280
280 args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch); 281 args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch);
281 282
282 return true; 283 return true;
283 } 284 }
284 285
(...skipping 14 matching lines...) Expand all
299 vmi.mapRect(&clipBounds); 300 vmi.mapRect(&clipBounds);
300 GrStyle style; 301 GrStyle style;
301 do { 302 do {
302 GrTest::TestStyle(random, &style); 303 GrTest::TestStyle(random, &style);
303 } while (style.strokeRec().isHairlineStyle()); 304 } while (style.strokeRec().isHairlineStyle());
304 GrShape shape(path, style); 305 GrShape shape(path, style);
305 return TessellatingPathBatch::Create(color, shape, viewMatrix, clipBounds); 306 return TessellatingPathBatch::Create(color, shape, viewMatrix, clipBounds);
306 } 307 }
307 308
308 #endif 309 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrStencilAndCoverPathRenderer.cpp ('k') | tests/TessellatingPathRendererTests.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698