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

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

Issue 1626553002: Revert of added support for PLS path rendering (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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
« no previous file with comments | « src/gpu/GrPathProcessor.cpp ('k') | src/gpu/GrPrimitiveProcessor.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"
11 11
12 #include "GrCaps.h" 12 #include "GrCaps.h"
13 #include "gl/GrGLCaps.h"
14 #include "glsl/GrGLSLCaps.h"
15 #include "GrContext.h" 13 #include "GrContext.h"
16 #include "GrGpu.h" 14 #include "GrGpu.h"
17 15
18 #include "batches/GrAAConvexPathRenderer.h" 16 #include "batches/GrAAConvexPathRenderer.h"
19 #include "batches/GrAADistanceFieldPathRenderer.h" 17 #include "batches/GrAADistanceFieldPathRenderer.h"
20 #include "batches/GrAAHairLinePathRenderer.h" 18 #include "batches/GrAAHairLinePathRenderer.h"
21 #include "batches/GrAALinearizingConvexPathRenderer.h" 19 #include "batches/GrAALinearizingConvexPathRenderer.h"
22 #include "batches/GrDashLinePathRenderer.h" 20 #include "batches/GrDashLinePathRenderer.h"
23 #include "batches/GrDefaultPathRenderer.h" 21 #include "batches/GrDefaultPathRenderer.h"
24 #include "batches/GrStencilAndCoverPathRenderer.h" 22 #include "batches/GrStencilAndCoverPathRenderer.h"
25 #include "batches/GrTessellatingPathRenderer.h" 23 #include "batches/GrTessellatingPathRenderer.h"
26 #include "batches/GrPLSPathRenderer.h"
27 24
28 GrPathRendererChain::GrPathRendererChain(GrContext* context) { 25 GrPathRendererChain::GrPathRendererChain(GrContext* context) {
29 const GrCaps& caps = *context->caps(); 26 const GrCaps& caps = *context->caps();
30 this->addPathRenderer(new GrDashLinePathRenderer)->unref(); 27 this->addPathRenderer(new GrDashLinePathRenderer)->unref();
31 28
32 if (GrPathRenderer* pr = GrStencilAndCoverPathRenderer::Create(context->reso urceProvider(), 29 if (GrPathRenderer* pr = GrStencilAndCoverPathRenderer::Create(context->reso urceProvider(),
33 caps)) { 30 caps)) {
34 this->addPathRenderer(pr)->unref(); 31 this->addPathRenderer(pr)->unref();
35 } 32 }
36 this->addPathRenderer(new GrTessellatingPathRenderer)->unref(); 33 this->addPathRenderer(new GrTessellatingPathRenderer)->unref();
37 this->addPathRenderer(new GrAAHairLinePathRenderer)->unref(); 34 this->addPathRenderer(new GrAAHairLinePathRenderer)->unref();
38 this->addPathRenderer(new GrAAConvexPathRenderer)->unref(); 35 this->addPathRenderer(new GrAAConvexPathRenderer)->unref();
39 this->addPathRenderer(new GrAALinearizingConvexPathRenderer)->unref(); 36 this->addPathRenderer(new GrAALinearizingConvexPathRenderer)->unref();
40 if (caps.shaderCaps()->plsPathRenderingSupport()) {
41 this->addPathRenderer(new GrPLSPathRenderer)->unref();
42 }
43 this->addPathRenderer(new GrAADistanceFieldPathRenderer)->unref(); 37 this->addPathRenderer(new GrAADistanceFieldPathRenderer)->unref();
44 this->addPathRenderer(new GrDefaultPathRenderer(caps.twoSidedStencilSupport( ), 38 this->addPathRenderer(new GrDefaultPathRenderer(caps.twoSidedStencilSupport( ),
45 caps.stencilWrapOpsSupport() ))->unref(); 39 caps.stencilWrapOpsSupport() ))->unref();
46 } 40 }
47 41
48 GrPathRendererChain::~GrPathRendererChain() { 42 GrPathRendererChain::~GrPathRendererChain() {
49 for (int i = 0; i < fChain.count(); ++i) { 43 for (int i = 0; i < fChain.count(); ++i) {
50 fChain[i]->unref(); 44 fChain[i]->unref();
51 } 45 }
52 } 46 }
(...skipping 30 matching lines...) Expand all
83 continue; 77 continue;
84 } else if (stencilSupport) { 78 } else if (stencilSupport) {
85 *stencilSupport = support; 79 *stencilSupport = support;
86 } 80 }
87 } 81 }
88 return fChain[i]; 82 return fChain[i];
89 } 83 }
90 } 84 }
91 return nullptr; 85 return nullptr;
92 } 86 }
OLDNEW
« no previous file with comments | « src/gpu/GrPathProcessor.cpp ('k') | src/gpu/GrPrimitiveProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698