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

Unified Diff: src/effects/SkDisplacementMapEffect.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/SkColorMatrixFilter.cpp ('k') | src/effects/SkLightingImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkDisplacementMapEffect.cpp
diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp
index b3397476abcfe30ca262943620eec070a7db44c1..776083c079a7634b6631d9c0a7eac5c939cae4a1 100644
--- a/src/effects/SkDisplacementMapEffect.cpp
+++ b/src/effects/SkDisplacementMapEffect.cpp
@@ -19,6 +19,7 @@
#include "effects/GrTextureDomain.h"
#include "gl/GrGLFragmentProcessor.h"
#include "gl/builders/GrGLProgramBuilder.h"
+#include "glsl/GrGLSLProgramDataManager.h"
#endif
namespace {
@@ -314,12 +315,12 @@ public:
const GrTextureDomain::GLDomain& glDomain() const { return fGLDomain; }
protected:
- void onSetData(const GrGLProgramDataManager&, const GrProcessor&) override;
+ void onSetData(const GrGLSLProgramDataManager&, const GrProcessor&) override;
private:
SkDisplacementMapEffect::ChannelSelectorType fXChannelSelector;
SkDisplacementMapEffect::ChannelSelectorType fYChannelSelector;
- GrGLProgramDataManager::UniformHandle fScaleUni;
+ GrGLSLProgramDataManager::UniformHandle fScaleUni;
GrTextureDomain::GLDomain fGLDomain;
typedef GrGLFragmentProcessor INHERITED;
@@ -610,8 +611,8 @@ void GrGLDisplacementMapEffect::emitCode(EmitArgs& args) {
fsBuilder->codeAppend(";\n");
}
-void GrGLDisplacementMapEffect::onSetData(const GrGLProgramDataManager& pdman,
- const GrProcessor& proc) {
+void GrGLDisplacementMapEffect::onSetData(const GrGLSLProgramDataManager& pdman,
+ const GrProcessor& proc) {
const GrDisplacementMapEffect& displacementMap = proc.cast<GrDisplacementMapEffect>();
GrTexture* colorTex = displacementMap.texture(1);
SkScalar scaleX = displacementMap.scale().fX / colorTex->width();
« no previous file with comments | « src/effects/SkColorMatrixFilter.cpp ('k') | src/effects/SkLightingImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698