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

Unified Diff: src/effects/SkColorMatrixFilter.cpp

Issue 1428543003: Create GLSL base class for ProgramDataManager (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add space Created 5 years, 2 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/SkColorCubeFilter.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
diff --git a/src/effects/SkColorMatrixFilter.cpp b/src/effects/SkColorMatrixFilter.cpp
index 68150963c69fd3c20759ce726bd2bb916b853aeb..ef8fb116d69888fa9ccadcc4beb50b3b6db79944 100644
--- a/src/effects/SkColorMatrixFilter.cpp
+++ b/src/effects/SkColorMatrixFilter.cpp
@@ -387,6 +387,7 @@ SkColorFilter* SkColorMatrixFilter::newComposed(const SkColorFilter* innerFilter
#include "GrInvariantOutput.h"
#include "gl/GrGLFragmentProcessor.h"
#include "gl/builders/GrGLProgramBuilder.h"
+#include "glsl/GrGLSLProgramDataManager.h"
class ColorMatrixEffect : public GrFragmentProcessor {
public:
@@ -433,19 +434,19 @@ public:
}
protected:
- virtual void onSetData(const GrGLProgramDataManager& uniManager,
- const GrProcessor& proc) override {
+ virtual void onSetData(const GrGLSLProgramDataManager& uniManager,
+ const GrProcessor& proc) override {
const ColorMatrixEffect& cme = proc.cast<ColorMatrixEffect>();
const float* m = cme.fMatrix.fMat;
// The GL matrix is transposed from SkColorMatrix.
- GrGLfloat mt[] = {
+ float mt[] = {
m[0], m[5], m[10], m[15],
m[1], m[6], m[11], m[16],
m[2], m[7], m[12], m[17],
m[3], m[8], m[13], m[18],
};
static const float kScale = 1.0f / 255.0f;
- GrGLfloat vec[] = {
+ float vec[] = {
m[4] * kScale, m[9] * kScale, m[14] * kScale, m[19] * kScale,
};
uniManager.setMatrix4fv(fMatrixHandle, 1, mt);
@@ -453,8 +454,8 @@ public:
}
private:
- GrGLProgramDataManager::UniformHandle fMatrixHandle;
- GrGLProgramDataManager::UniformHandle fVectorHandle;
+ GrGLSLProgramDataManager::UniformHandle fMatrixHandle;
+ GrGLSLProgramDataManager::UniformHandle fVectorHandle;
typedef GrGLFragmentProcessor INHERITED;
};
« no previous file with comments | « src/effects/SkColorCubeFilter.cpp ('k') | src/effects/SkDisplacementMapEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698