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

Side by Side Diff: src/gpu/GrPathRendererChain.cpp

Issue 1100073003: Extract gpu line dashing to GrDashLinePathRenderer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: address review comments Created 5 years, 8 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/GrPathRenderer.h ('k') | src/gpu/GrSoftwarePathRenderer.h » ('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 9
10 #include "GrPathRendererChain.h" 10 #include "GrPathRendererChain.h"
(...skipping 17 matching lines...) Expand all
28 GrPathRenderer* GrPathRendererChain::addPathRenderer(GrPathRenderer* pr) { 28 GrPathRenderer* GrPathRendererChain::addPathRenderer(GrPathRenderer* pr) {
29 fChain.push_back() = pr; 29 fChain.push_back() = pr;
30 pr->ref(); 30 pr->ref();
31 return pr; 31 return pr;
32 } 32 }
33 33
34 GrPathRenderer* GrPathRendererChain::getPathRenderer(const GrDrawTarget* target, 34 GrPathRenderer* GrPathRendererChain::getPathRenderer(const GrDrawTarget* target,
35 const GrPipelineBuilder* pi pelineBuilder, 35 const GrPipelineBuilder* pi pelineBuilder,
36 const SkMatrix& viewMatrix, 36 const SkMatrix& viewMatrix,
37 const SkPath& path, 37 const SkPath& path,
38 const SkStrokeRec& stroke, 38 const GrStrokeInfo& stroke,
39 DrawType drawType, 39 DrawType drawType,
40 StencilSupport* stencilSupp ort) { 40 StencilSupport* stencilSupp ort) {
41 if (!fInit) { 41 if (!fInit) {
42 this->init(); 42 this->init();
43 } 43 }
44 bool antiAlias = (kColorAntiAlias_DrawType == drawType || 44 bool antiAlias = (kColorAntiAlias_DrawType == drawType ||
45 kStencilAndColorAntiAlias_DrawType == drawType); 45 kStencilAndColorAntiAlias_DrawType == drawType);
46 46
47 GR_STATIC_ASSERT(GrPathRenderer::kNoSupport_StencilSupport < 47 GR_STATIC_ASSERT(GrPathRenderer::kNoSupport_StencilSupport <
48 GrPathRenderer::kStencilOnly_StencilSupport); 48 GrPathRenderer::kStencilOnly_StencilSupport);
(...skipping 30 matching lines...) Expand all
79 void GrPathRendererChain::init() { 79 void GrPathRendererChain::init() {
80 SkASSERT(!fInit); 80 SkASSERT(!fInit);
81 GrGpu* gpu = fOwner->getGpu(); 81 GrGpu* gpu = fOwner->getGpu();
82 bool twoSided = gpu->caps()->twoSidedStencilSupport(); 82 bool twoSided = gpu->caps()->twoSidedStencilSupport();
83 bool wrapOp = gpu->caps()->stencilWrapOpsSupport(); 83 bool wrapOp = gpu->caps()->stencilWrapOpsSupport();
84 GrPathRenderer::AddPathRenderers(fOwner, this); 84 GrPathRenderer::AddPathRenderers(fOwner, this);
85 this->addPathRenderer(SkNEW_ARGS(GrDefaultPathRenderer, 85 this->addPathRenderer(SkNEW_ARGS(GrDefaultPathRenderer,
86 (twoSided, wrapOp)))->unref(); 86 (twoSided, wrapOp)))->unref();
87 fInit = true; 87 fInit = true;
88 } 88 }
OLDNEW
« no previous file with comments | « src/gpu/GrPathRenderer.h ('k') | src/gpu/GrSoftwarePathRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698