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

Side by Side Diff: src/gpu/batches/GrDashLinePathRenderer.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 "GrDashLinePathRenderer.h" 8 #include "GrDashLinePathRenderer.h"
9 9
10 #include "GrGpu.h" 10 #include "GrGpu.h"
(...skipping 20 matching lines...) Expand all
31 // We ignore args.fAntiAlias here and force anti aliasing when using MSA A. Otherwise, 31 // We ignore args.fAntiAlias here and force anti aliasing when using MSA A. Otherwise,
32 // we can wind up with external edges antialiased and internal edges una ntialiased. 32 // we can wind up with external edges antialiased and internal edges una ntialiased.
33 aaMode = GrDashingEffect::AAMode::kCoverageWithMSAA; 33 aaMode = GrDashingEffect::AAMode::kCoverageWithMSAA;
34 } else if (args.fAntiAlias) { 34 } else if (args.fAntiAlias) {
35 aaMode = GrDashingEffect::AAMode::kCoverage; 35 aaMode = GrDashingEffect::AAMode::kCoverage;
36 } else { 36 } else {
37 aaMode = GrDashingEffect::AAMode::kNone; 37 aaMode = GrDashingEffect::AAMode::kNone;
38 } 38 }
39 SkPoint pts[2]; 39 SkPoint pts[2];
40 SkAssertResult(args.fShape->asLine(pts, nullptr)); 40 SkAssertResult(args.fShape->asLine(pts, nullptr));
41 SkAutoTUnref<GrDrawBatch> batch(GrDashingEffect::CreateDashLineBatch(args.fC olor, 41 SkAutoTUnref<GrDrawBatch> batch(GrDashingEffect::CreateDashLineBatch(args.fP aint->getColor(),
42 *args.f ViewMatrix, 42 *args.f ViewMatrix,
43 pts, 43 pts,
44 aaMode, 44 aaMode,
45 args.fS hape->style())); 45 args.fS hape->style()));
46 if (!batch) { 46 if (!batch) {
47 return false; 47 return false;
48 } 48 }
49 49
50 GrPipelineBuilder pipelineBuilder(*args.fPaint, useHWAA); 50 GrPipelineBuilder pipelineBuilder(*args.fPaint, useHWAA);
51 pipelineBuilder.setUserStencil(args.fUserStencilSettings); 51 pipelineBuilder.setUserStencil(args.fUserStencilSettings);
52 52
53 args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch); 53 args.fDrawContext->drawBatch(pipelineBuilder, *args.fClip, batch);
54 return true; 54 return true;
55 } 55 }
OLDNEW
« no previous file with comments | « src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp ('k') | src/gpu/batches/GrDefaultPathRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698