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

Unified Diff: src/gpu/effects/GrOvalEffect.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/gpu/effects/GrMatrixConvolutionEffect.cpp ('k') | src/gpu/effects/GrPorterDuffXferProcessor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrOvalEffect.cpp
diff --git a/src/gpu/effects/GrOvalEffect.cpp b/src/gpu/effects/GrOvalEffect.cpp
index 42b71ade9e6bc876d7cc8bad9a0dbca5fbf7410e..1bc6589a3eecdcc53ac0029749a2f620d00cd387 100644
--- a/src/gpu/effects/GrOvalEffect.cpp
+++ b/src/gpu/effects/GrOvalEffect.cpp
@@ -12,6 +12,7 @@
#include "SkRect.h"
#include "gl/GrGLFragmentProcessor.h"
#include "gl/builders/GrGLProgramBuilder.h"
+#include "glsl/GrGLSLProgramDataManager.h"
//////////////////////////////////////////////////////////////////////////////
@@ -98,12 +99,12 @@ public:
static inline void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessorKeyBuilder*);
protected:
- void onSetData(const GrGLProgramDataManager&, const GrProcessor&) override;
+ void onSetData(const GrGLSLProgramDataManager&, const GrProcessor&) override;
private:
- GrGLProgramDataManager::UniformHandle fCircleUniform;
- SkPoint fPrevCenter;
- SkScalar fPrevRadius;
+ GrGLSLProgramDataManager::UniformHandle fCircleUniform;
+ SkPoint fPrevCenter;
+ SkScalar fPrevRadius;
typedef GrGLFragmentProcessor INHERITED;
};
@@ -153,7 +154,8 @@ void GLCircleEffect::GenKey(const GrProcessor& processor, const GrGLSLCaps&,
b->add32(ce.getEdgeType());
}
-void GLCircleEffect::onSetData(const GrGLProgramDataManager& pdman, const GrProcessor& processor) {
+void GLCircleEffect::onSetData(const GrGLSLProgramDataManager& pdman,
+ const GrProcessor& processor) {
const CircleEffect& ce = processor.cast<CircleEffect>();
if (ce.getRadius() != fPrevRadius || ce.getCenter() != fPrevCenter) {
SkScalar radius = ce.getRadius();
@@ -269,12 +271,12 @@ public:
static inline void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessorKeyBuilder*);
protected:
- void onSetData(const GrGLProgramDataManager&, const GrProcessor&) override;
+ void onSetData(const GrGLSLProgramDataManager&, const GrProcessor&) override;
private:
- GrGLProgramDataManager::UniformHandle fEllipseUniform;
- SkPoint fPrevCenter;
- SkVector fPrevRadii;
+ GrGLSLProgramDataManager::UniformHandle fEllipseUniform;
+ SkPoint fPrevCenter;
+ SkVector fPrevRadii;
typedef GrGLFragmentProcessor INHERITED;
};
@@ -334,7 +336,8 @@ void GLEllipseEffect::GenKey(const GrProcessor& effect, const GrGLSLCaps&,
b->add32(ee.getEdgeType());
}
-void GLEllipseEffect::onSetData(const GrGLProgramDataManager& pdman, const GrProcessor& effect) {
+void GLEllipseEffect::onSetData(const GrGLSLProgramDataManager& pdman,
+ const GrProcessor& effect) {
const EllipseEffect& ee = effect.cast<EllipseEffect>();
if (ee.getRadii() != fPrevRadii || ee.getCenter() != fPrevCenter) {
SkScalar invRXSqd = 1.f / (ee.getRadii().fX * ee.getRadii().fX);
« no previous file with comments | « src/gpu/effects/GrMatrixConvolutionEffect.cpp ('k') | src/gpu/effects/GrPorterDuffXferProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698