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

Unified Diff: src/effects/SkColorMatrixFilter.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/SkBlendImageFilter.cpp ('k') | src/effects/SkDisplacementMapEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkColorMatrixFilter.cpp
===================================================================
--- src/effects/SkColorMatrixFilter.cpp (revision 8241)
+++ src/effects/SkColorMatrixFilter.cpp (working copy)
@@ -386,18 +386,17 @@
class GLEffect : public GrGLEffect {
public:
// this class always generates the same code.
- static EffectKey GenKey(const GrEffectStage&, const GrGLCaps&) { return 0; }
+ static EffectKey GenKey(const GrDrawEffect&, const GrGLCaps&) { return 0; }
GLEffect(const GrBackendEffectFactory& factory,
- const GrEffectRef& effect)
+ const GrDrawEffect&)
: INHERITED(factory)
, fMatrixHandle(GrGLUniformManager::kInvalidUniformHandle)
, fVectorHandle(GrGLUniformManager::kInvalidUniformHandle) {}
virtual void emitCode(GrGLShaderBuilder* builder,
- const GrEffectStage&,
+ const GrDrawEffect&,
EffectKey,
- const char* vertexCoords,
const char* outputColor,
const char* inputColor,
const TextureSamplerArray&) SK_OVERRIDE {
@@ -424,8 +423,8 @@
}
virtual void setData(const GrGLUniformManager& uniManager,
- const GrEffectStage& stage) SK_OVERRIDE {
- const ColorMatrixEffect& cme = GetEffectFromStage<ColorMatrixEffect>(stage);
+ const GrDrawEffect& drawEffect) SK_OVERRIDE {
+ const ColorMatrixEffect& cme = drawEffect.castEffect<ColorMatrixEffect>();
const float* m = cme.fMatrix.fMat;
// The GL matrix is transposed from SkColorMatrix.
GrGLfloat mt[] = {
« no previous file with comments | « src/effects/SkBlendImageFilter.cpp ('k') | src/effects/SkDisplacementMapEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698