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

Unified Diff: src/effects/gradients/SkLinearGradient.cpp

Issue 12531015: Adds local coords to GrEffect system. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/effects/gradients/SkGradientShaderPriv.h ('k') | src/effects/gradients/SkRadialGradient.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/SkLinearGradient.cpp
===================================================================
--- src/effects/gradients/SkLinearGradient.cpp (revision 8241)
+++ src/effects/gradients/SkLinearGradient.cpp (working copy)
@@ -453,21 +453,20 @@
class GrGLLinearGradient : public GrGLGradientEffect {
public:
- GrGLLinearGradient(const GrBackendEffectFactory& factory, const GrEffectRef&)
+ GrGLLinearGradient(const GrBackendEffectFactory& factory, const GrDrawEffect&)
: INHERITED (factory) { }
virtual ~GrGLLinearGradient() { }
virtual void emitCode(GrGLShaderBuilder*,
- const GrEffectStage&,
+ const GrDrawEffect&,
EffectKey,
- const char* vertexCoords,
const char* outputColor,
const char* inputColor,
const TextureSamplerArray&) SK_OVERRIDE;
- static EffectKey GenKey(const GrEffectStage& stage, const GrGLCaps&) {
- return GenMatrixKey(stage);
+ static EffectKey GenKey(const GrDrawEffect& drawEffect, const GrGLCaps&) {
+ return GenMatrixKey(drawEffect);
}
private:
@@ -533,15 +532,14 @@
/////////////////////////////////////////////////////////////////////
void GrGLLinearGradient::emitCode(GrGLShaderBuilder* builder,
- const GrEffectStage& stage,
+ const GrDrawEffect&,
EffectKey key,
- const char* vertexCoords,
const char* outputColor,
const char* inputColor,
const TextureSamplerArray& samplers) {
this->emitYCoordUniform(builder);
const char* coords;
- this->setupMatrix(builder, key, vertexCoords, &coords);
+ this->setupMatrix(builder, key, &coords);
SkString t;
t.append(coords);
t.append(".x");
« no previous file with comments | « src/effects/gradients/SkGradientShaderPriv.h ('k') | src/effects/gradients/SkRadialGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698