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

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

Issue 855513004: Tessellating GPU path renderer. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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 /* 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"
11 11
12 #include "GrContext.h" 12 #include "GrContext.h"
13 #include "GrDefaultPathRenderer.h" 13 #include "GrDefaultPathRenderer.h"
14 #include "GrDrawTargetCaps.h" 14 #include "GrDrawTargetCaps.h"
15 #include "GrTessellatingPathRenderer.h"
15 #include "GrGpu.h" 16 #include "GrGpu.h"
16 17
17 GrPathRendererChain::GrPathRendererChain(GrContext* context) 18 GrPathRendererChain::GrPathRendererChain(GrContext* context)
18 : fInit(false) 19 : fInit(false)
19 , fOwner(context) { 20 , fOwner(context) {
20 } 21 }
21 22
22 GrPathRendererChain::~GrPathRendererChain() { 23 GrPathRendererChain::~GrPathRendererChain() {
23 for (int i = 0; i < fChain.count(); ++i) { 24 for (int i = 0; i < fChain.count(); ++i) {
24 fChain[i]->unref(); 25 fChain[i]->unref();
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 } 74 }
74 } 75 }
75 return fChain[i]; 76 return fChain[i];
76 } 77 }
77 } 78 }
78 return NULL; 79 return NULL;
79 } 80 }
80 81
81 void GrPathRendererChain::init() { 82 void GrPathRendererChain::init() {
82 SkASSERT(!fInit); 83 SkASSERT(!fInit);
84 this->addPathRenderer(SkNEW(GrTessellatingPathRenderer))->unref();
83 GrGpu* gpu = fOwner->getGpu(); 85 GrGpu* gpu = fOwner->getGpu();
84 bool twoSided = gpu->caps()->twoSidedStencilSupport(); 86 bool twoSided = gpu->caps()->twoSidedStencilSupport();
85 bool wrapOp = gpu->caps()->stencilWrapOpsSupport(); 87 bool wrapOp = gpu->caps()->stencilWrapOpsSupport();
86 GrPathRenderer::AddPathRenderers(fOwner, this); 88 GrPathRenderer::AddPathRenderers(fOwner, this);
87 this->addPathRenderer(SkNEW_ARGS(GrDefaultPathRenderer, 89 this->addPathRenderer(SkNEW_ARGS(GrDefaultPathRenderer,
88 (twoSided, wrapOp)))->unref(); 90 (twoSided, wrapOp)))->unref();
89 fInit = true; 91 fInit = true;
90 } 92 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698