OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 #ifndef GrBezierEffect_DEFINED | 8 #ifndef GrBezierEffect_DEFINED |
9 #define GrBezierEffect_DEFINED | 9 #define GrBezierEffect_DEFINED |
10 | 10 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 * that the curves become much thinner and "ropey". If all that was ever rendere
d | 63 * that the curves become much thinner and "ropey". If all that was ever rendere
d |
64 * were "not too thin" curves and ellipses then 2nd order may have an advantage
since | 64 * were "not too thin" curves and ellipses then 2nd order may have an advantage
since |
65 * only one geometry would need to be rendered. However no benches were run comp
aring | 65 * only one geometry would need to be rendered. However no benches were run comp
aring |
66 * chopped first order and non chopped 2nd order. | 66 * chopped first order and non chopped 2nd order. |
67 */ | 67 */ |
68 class GrGLConicEffect; | 68 class GrGLConicEffect; |
69 | 69 |
70 class GrConicEffect : public GrEffect { | 70 class GrConicEffect : public GrEffect { |
71 public: | 71 public: |
72 static GrEffectRef* Create(const GrBezierEdgeType edgeType, const GrDrawTarg
etCaps& caps) { | 72 static GrEffectRef* Create(const GrBezierEdgeType edgeType, const GrDrawTarg
etCaps& caps) { |
73 GR_CREATE_STATIC_EFFECT(gConicFillAA, GrConicEffect, (edgeType)); | 73 GR_CREATE_STATIC_EFFECT(gConicFillAA, GrConicEffect, (kFillAA_GrBezierEd
geType)); |
74 GR_CREATE_STATIC_EFFECT(gConicHairAA, GrConicEffect, (edgeType)); | 74 GR_CREATE_STATIC_EFFECT(gConicHairAA, GrConicEffect, (kHairAA_GrBezierEd
geType)); |
75 GR_CREATE_STATIC_EFFECT(gConicFillNoAA, GrConicEffect, (edgeType)); | 75 GR_CREATE_STATIC_EFFECT(gConicFillNoAA, GrConicEffect, (kFillNoAA_GrBezi
erEdgeType)); |
76 if (kFillAA_GrBezierEdgeType == edgeType) { | 76 if (kFillAA_GrBezierEdgeType == edgeType) { |
77 if (!caps.shaderDerivativeSupport()) { | 77 if (!caps.shaderDerivativeSupport()) { |
78 return NULL; | 78 return NULL; |
79 } | 79 } |
80 gConicFillAA->ref(); | 80 gConicFillAA->ref(); |
81 return gConicFillAA; | 81 return gConicFillAA; |
82 } else if (kHairAA_GrBezierEdgeType == edgeType) { | 82 } else if (kHairAA_GrBezierEdgeType == edgeType) { |
83 if (!caps.shaderDerivativeSupport()) { | 83 if (!caps.shaderDerivativeSupport()) { |
84 return NULL; | 84 return NULL; |
85 } | 85 } |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 virtual bool onIsEqual(const GrEffect& other) const SK_OVERRIDE; | 244 virtual bool onIsEqual(const GrEffect& other) const SK_OVERRIDE; |
245 | 245 |
246 GrBezierEdgeType fEdgeType; | 246 GrBezierEdgeType fEdgeType; |
247 | 247 |
248 GR_DECLARE_EFFECT_TEST; | 248 GR_DECLARE_EFFECT_TEST; |
249 | 249 |
250 typedef GrEffect INHERITED; | 250 typedef GrEffect INHERITED; |
251 }; | 251 }; |
252 | 252 |
253 #endif | 253 #endif |
OLD | NEW |