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 1834133003: added GrMSAAPathRenderer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fixed path complexity check Created 4 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
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" 13 #include "gl/GrGLCaps.h"
14 #include "glsl/GrGLSLCaps.h" 14 #include "glsl/GrGLSLCaps.h"
15 #include "GrContext.h" 15 #include "GrContext.h"
16 #include "GrGpu.h" 16 #include "GrGpu.h"
17 17
18 #include "batches/GrAAConvexPathRenderer.h" 18 #include "batches/GrAAConvexPathRenderer.h"
19 #include "batches/GrAADistanceFieldPathRenderer.h" 19 #include "batches/GrAADistanceFieldPathRenderer.h"
20 #include "batches/GrAAHairLinePathRenderer.h" 20 #include "batches/GrAAHairLinePathRenderer.h"
21 #include "batches/GrAALinearizingConvexPathRenderer.h" 21 #include "batches/GrAALinearizingConvexPathRenderer.h"
22 #include "batches/GrDashLinePathRenderer.h" 22 #include "batches/GrDashLinePathRenderer.h"
23 #include "batches/GrDefaultPathRenderer.h" 23 #include "batches/GrDefaultPathRenderer.h"
24 #include "batches/GrMSAAPathRenderer.h"
25 #include "batches/GrPLSPathRenderer.h"
24 #include "batches/GrStencilAndCoverPathRenderer.h" 26 #include "batches/GrStencilAndCoverPathRenderer.h"
25 #include "batches/GrTessellatingPathRenderer.h" 27 #include "batches/GrTessellatingPathRenderer.h"
26 #include "batches/GrPLSPathRenderer.h"
27 28
28 GrPathRendererChain::GrPathRendererChain(GrContext* context) { 29 GrPathRendererChain::GrPathRendererChain(GrContext* context) {
29 const GrCaps& caps = *context->caps(); 30 const GrCaps& caps = *context->caps();
30 this->addPathRenderer(new GrDashLinePathRenderer)->unref(); 31 this->addPathRenderer(new GrDashLinePathRenderer)->unref();
31 32
32 if (GrPathRenderer* pr = GrStencilAndCoverPathRenderer::Create(context->reso urceProvider(), 33 if (GrPathRenderer* pr = GrStencilAndCoverPathRenderer::Create(context->reso urceProvider(),
33 caps)) { 34 caps)) {
34 this->addPathRenderer(pr)->unref(); 35 this->addPathRenderer(pr)->unref();
35 } 36 }
37 if (caps.sampleShadingSupport()) {
38 this->addPathRenderer(new GrMSAAPathRenderer)->unref();
39 }
36 this->addPathRenderer(new GrTessellatingPathRenderer)->unref(); 40 this->addPathRenderer(new GrTessellatingPathRenderer)->unref();
37 this->addPathRenderer(new GrAAHairLinePathRenderer)->unref(); 41 this->addPathRenderer(new GrAAHairLinePathRenderer)->unref();
38 this->addPathRenderer(new GrAAConvexPathRenderer)->unref(); 42 this->addPathRenderer(new GrAAConvexPathRenderer)->unref();
39 this->addPathRenderer(new GrAALinearizingConvexPathRenderer)->unref(); 43 this->addPathRenderer(new GrAALinearizingConvexPathRenderer)->unref();
40 if (caps.shaderCaps()->plsPathRenderingSupport()) { 44 if (caps.shaderCaps()->plsPathRenderingSupport()) {
41 this->addPathRenderer(new GrPLSPathRenderer)->unref(); 45 this->addPathRenderer(new GrPLSPathRenderer)->unref();
42 } 46 }
43 this->addPathRenderer(new GrAADistanceFieldPathRenderer)->unref(); 47 this->addPathRenderer(new GrAADistanceFieldPathRenderer)->unref();
44 this->addPathRenderer(new GrDefaultPathRenderer(caps.twoSidedStencilSupport( ), 48 this->addPathRenderer(new GrDefaultPathRenderer(caps.twoSidedStencilSupport( ),
45 caps.stencilWrapOpsSupport() ))->unref(); 49 caps.stencilWrapOpsSupport() ))->unref();
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 continue; 87 continue;
84 } else if (stencilSupport) { 88 } else if (stencilSupport) {
85 *stencilSupport = support; 89 *stencilSupport = support;
86 } 90 }
87 } 91 }
88 return fChain[i]; 92 return fChain[i];
89 } 93 }
90 } 94 }
91 return nullptr; 95 return nullptr;
92 } 96 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698