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

Side by Side Diff: src/gpu/effects/GrBezierEffect.cpp

Issue 23464082: Revert "Add a requiresVertexShader method to GrGLEffect" (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/GrOvalRenderer.cpp ('k') | src/gpu/effects/GrSimpleTextureEffect.cpp » ('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 * 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 #include "GrBezierEffect.h" 8 #include "GrBezierEffect.h"
9 9
10 #include "gl/GrGLEffect.h" 10 #include "gl/GrGLEffect.h"
11 #include "gl/GrGLSL.h" 11 #include "gl/GrGLSL.h"
12 #include "GrTBackendEffectFactory.h" 12 #include "GrTBackendEffectFactory.h"
13 13
14 class GrGLConicEffect : public GrGLEffect { 14 class GrGLConicEffect : public GrGLEffect {
15 public: 15 public:
16 GrGLConicEffect(const GrBackendEffectFactory&, const GrDrawEffect&); 16 GrGLConicEffect(const GrBackendEffectFactory&, const GrDrawEffect&);
17 17
18 virtual bool requiresVertexShader(const GrDrawEffect&) const SK_OVERRIDE { r eturn true; }
19
20 virtual void emitCode(GrGLShaderBuilder* builder, 18 virtual void emitCode(GrGLShaderBuilder* builder,
21 const GrDrawEffect& drawEffect, 19 const GrDrawEffect& drawEffect,
22 EffectKey key, 20 EffectKey key,
23 const char* outputColor, 21 const char* outputColor,
24 const char* inputColor, 22 const char* inputColor,
25 const TextureSamplerArray&) SK_OVERRIDE; 23 const TextureSamplerArray&) SK_OVERRIDE;
26 24
27 static inline EffectKey GenKey(const GrDrawEffect&, const GrGLCaps&); 25 static inline EffectKey GenKey(const GrDrawEffect&, const GrGLCaps&);
28 26
29 virtual void setData(const GrGLUniformManager&, const GrDrawEffect&) SK_OVER RIDE {} 27 virtual void setData(const GrGLUniformManager&, const GrDrawEffect&) SK_OVER RIDE {}
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 } 151 }
154 152
155 ////////////////////////////////////////////////////////////////////////////// 153 //////////////////////////////////////////////////////////////////////////////
156 // Quad 154 // Quad
157 ////////////////////////////////////////////////////////////////////////////// 155 //////////////////////////////////////////////////////////////////////////////
158 156
159 class GrGLQuadEffect : public GrGLEffect { 157 class GrGLQuadEffect : public GrGLEffect {
160 public: 158 public:
161 GrGLQuadEffect(const GrBackendEffectFactory&, const GrDrawEffect&); 159 GrGLQuadEffect(const GrBackendEffectFactory&, const GrDrawEffect&);
162 160
163 virtual bool requiresVertexShader(const GrDrawEffect&) const SK_OVERRIDE { r eturn true; }
164
165 virtual void emitCode(GrGLShaderBuilder* builder, 161 virtual void emitCode(GrGLShaderBuilder* builder,
166 const GrDrawEffect& drawEffect, 162 const GrDrawEffect& drawEffect,
167 EffectKey key, 163 EffectKey key,
168 const char* outputColor, 164 const char* outputColor,
169 const char* inputColor, 165 const char* inputColor,
170 const TextureSamplerArray&) SK_OVERRIDE; 166 const TextureSamplerArray&) SK_OVERRIDE;
171 167
172 static inline EffectKey GenKey(const GrDrawEffect&, const GrGLCaps&); 168 static inline EffectKey GenKey(const GrDrawEffect&, const GrGLCaps&);
173 169
174 virtual void setData(const GrGLUniformManager&, const GrDrawEffect&) SK_OVER RIDE {} 170 virtual void setData(const GrGLUniformManager&, const GrDrawEffect&) SK_OVER RIDE {}
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 } 283 }
288 284
289 ////////////////////////////////////////////////////////////////////////////// 285 //////////////////////////////////////////////////////////////////////////////
290 // Cubic 286 // Cubic
291 ////////////////////////////////////////////////////////////////////////////// 287 //////////////////////////////////////////////////////////////////////////////
292 288
293 class GrGLCubicEffect : public GrGLEffect { 289 class GrGLCubicEffect : public GrGLEffect {
294 public: 290 public:
295 GrGLCubicEffect(const GrBackendEffectFactory&, const GrDrawEffect&); 291 GrGLCubicEffect(const GrBackendEffectFactory&, const GrDrawEffect&);
296 292
297 virtual bool requiresVertexShader(const GrDrawEffect&) const SK_OVERRIDE { r eturn true; }
298
299 virtual void emitCode(GrGLShaderBuilder* builder, 293 virtual void emitCode(GrGLShaderBuilder* builder,
300 const GrDrawEffect& drawEffect, 294 const GrDrawEffect& drawEffect,
301 EffectKey key, 295 EffectKey key,
302 const char* outputColor, 296 const char* outputColor,
303 const char* inputColor, 297 const char* inputColor,
304 const TextureSamplerArray&) SK_OVERRIDE; 298 const TextureSamplerArray&) SK_OVERRIDE;
305 299
306 static inline EffectKey GenKey(const GrDrawEffect&, const GrGLCaps&); 300 static inline EffectKey GenKey(const GrDrawEffect&, const GrGLCaps&);
307 301
308 virtual void setData(const GrGLUniformManager&, const GrDrawEffect&) SK_OVER RIDE {} 302 virtual void setData(const GrGLUniformManager&, const GrDrawEffect&) SK_OVER RIDE {}
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 417
424 GR_DEFINE_EFFECT_TEST(GrCubicEffect); 418 GR_DEFINE_EFFECT_TEST(GrCubicEffect);
425 419
426 GrEffectRef* GrCubicEffect::TestCreate(SkRandom* random, 420 GrEffectRef* GrCubicEffect::TestCreate(SkRandom* random,
427 GrContext*, 421 GrContext*,
428 const GrDrawTargetCaps& caps, 422 const GrDrawTargetCaps& caps,
429 GrTexture*[]) { 423 GrTexture*[]) {
430 const GrBezierEdgeType edgeType = static_cast<GrBezierEdgeType>(random->next ULessThan(3)); 424 const GrBezierEdgeType edgeType = static_cast<GrBezierEdgeType>(random->next ULessThan(3));
431 return GrCubicEffect::Create(edgeType, caps); 425 return GrCubicEffect::Create(edgeType, caps);
432 } 426 }
OLDNEW
« no previous file with comments | « src/gpu/GrOvalRenderer.cpp ('k') | src/gpu/effects/GrSimpleTextureEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698