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

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

Issue 1967513002: Revert of Replace GrStrokeInfo with GrStyle. (Closed) Base URL: https://chromium.googlesource.com/skia.git@resscale
Patch Set: Created 4 years, 7 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"
11 #include "effects/GrDashingEffect.h" 11 #include "effects/GrDashingEffect.h"
12 12
13 bool GrDashLinePathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const { 13 bool GrDashLinePathRenderer::onCanDrawPath(const CanDrawPathArgs& args) const {
14 SkPoint pts[2]; 14 SkPoint pts[2];
15 if (args.fStyle->isDashed() && args.fPath->isLine(pts)) { 15 if (args.fStroke->isDashed() && args.fPath->isLine(pts)) {
16 return GrDashingEffect::CanDrawDashLine(pts, *args.fStyle, *args.fViewMa trix); 16 return GrDashingEffect::CanDrawDashLine(pts, *args.fStroke, *args.fViewM atrix);
17 } 17 }
18 return false; 18 return false;
19 } 19 }
20 20
21 bool GrDashLinePathRenderer::onDrawPath(const DrawPathArgs& args) { 21 bool GrDashLinePathRenderer::onDrawPath(const DrawPathArgs& args) {
22 GR_AUDIT_TRAIL_AUTO_FRAME(args.fTarget->getAuditTrail(), "GrDashLinePathRend erer::onDrawPath"); 22 GR_AUDIT_TRAIL_AUTO_FRAME(args.fTarget->getAuditTrail(), "GrDashLinePathRend erer::onDrawPath");
23 bool msaaIsEnabled = args.fPipelineBuilder->getRenderTarget()->isUnifiedMult isampled(); 23 bool msaaIsEnabled = args.fPipelineBuilder->getRenderTarget()->isUnifiedMult isampled();
24 SkPoint pts[2]; 24 SkPoint pts[2];
25 SkAssertResult(args.fPath->isLine(pts)); 25 SkAssertResult(args.fPath->isLine(pts));
26 SkAutoTUnref<GrDrawBatch> batch(GrDashingEffect::CreateDashLineBatch(args.fC olor, 26 SkAutoTUnref<GrDrawBatch> batch(GrDashingEffect::CreateDashLineBatch(args.fC olor,
27 *args.f ViewMatrix, 27 *args.f ViewMatrix,
28 pts, 28 pts,
29 args.fA ntiAlias, 29 args.fA ntiAlias,
30 msaaIsE nabled, 30 msaaIsE nabled,
31 *args.f Style)); 31 *args.f Stroke));
32 if (!batch) { 32 if (!batch) {
33 return false; 33 return false;
34 } 34 }
35 35
36 args.fTarget->drawBatch(*args.fPipelineBuilder, batch); 36 args.fTarget->drawBatch(*args.fPipelineBuilder, batch);
37 return true; 37 return true;
38 } 38 }
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