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

Side by Side Diff: src/gpu/batches/GrAAConvexPathRenderer.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
« no previous file with comments | « src/gpu/GrSoftwarePathRenderer.cpp ('k') | src/gpu/batches/GrAADistanceFieldPathRenderer.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 * Copyright 2012 Google Inc. 2 * Copyright 2012 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 "GrAAConvexPathRenderer.h" 8 #include "GrAAConvexPathRenderer.h"
9 9
10 #include "GrAAConvexTessellator.h" 10 #include "GrAAConvexTessellator.h"
(...skipping 981 matching lines...) Expand 10 before | Expand all | Expand 10 after
992 992
993 bool GrAAConvexPathRenderer::onDrawPath(const DrawPathArgs& args) { 993 bool GrAAConvexPathRenderer::onDrawPath(const DrawPathArgs& args) {
994 GR_AUDIT_TRAIL_AUTO_FRAME(args.fDrawContext->auditTrail(), 994 GR_AUDIT_TRAIL_AUTO_FRAME(args.fDrawContext->auditTrail(),
995 "GrAAConvexPathRenderer::onDrawPath"); 995 "GrAAConvexPathRenderer::onDrawPath");
996 SkASSERT(!args.fDrawContext->isUnifiedMultisampled()); 996 SkASSERT(!args.fDrawContext->isUnifiedMultisampled());
997 SkASSERT(!args.fShape->isEmpty()); 997 SkASSERT(!args.fShape->isEmpty());
998 998
999 SkPath path; 999 SkPath path;
1000 args.fShape->asPath(&path); 1000 args.fShape->asPath(&path);
1001 1001
1002 SkAutoTUnref<GrDrawBatch> batch(new AAConvexPathBatch(args.fColor, *args.fVi ewMatrix, path)); 1002 SkAutoTUnref<GrDrawBatch> batch(new AAConvexPathBatch(args.fPaint->getColor( ),
1003 *args.fViewMatrix, pat h));
1003 1004
1004 GrPipelineBuilder pipelineBuilder(*args.fPaint); 1005 GrPipelineBuilder pipelineBuilder(*args.fPaint);
1005 pipelineBuilder.setUserStencil(args.fUserStencilSettings); 1006 pipelineBuilder.setUserStencil(args.fUserStencilSettings);
1006 1007
1007 args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch); 1008 args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch);
1008 1009
1009 return true; 1010 return true;
1010 1011
1011 } 1012 }
1012 1013
1013 //////////////////////////////////////////////////////////////////////////////// /////////////////// 1014 //////////////////////////////////////////////////////////////////////////////// ///////////////////
1014 1015
1015 #ifdef GR_TEST_UTILS 1016 #ifdef GR_TEST_UTILS
1016 1017
1017 DRAW_BATCH_TEST_DEFINE(AAConvexPathBatch) { 1018 DRAW_BATCH_TEST_DEFINE(AAConvexPathBatch) {
1018 GrColor color = GrRandomColor(random); 1019 GrColor color = GrRandomColor(random);
1019 SkMatrix viewMatrix = GrTest::TestMatrixInvertible(random); 1020 SkMatrix viewMatrix = GrTest::TestMatrixInvertible(random);
1020 SkPath path = GrTest::TestPathConvex(random); 1021 SkPath path = GrTest::TestPathConvex(random);
1021 1022
1022 return new AAConvexPathBatch(color, viewMatrix, path); 1023 return new AAConvexPathBatch(color, viewMatrix, path);
1023 } 1024 }
1024 1025
1025 #endif 1026 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrSoftwarePathRenderer.cpp ('k') | src/gpu/batches/GrAADistanceFieldPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698