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

Unified Diff: src/gpu/effects/GrConvexPolyEffect.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/GrConstColorProcessor.cpp ('k') | src/gpu/effects/GrConvolutionEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrConvexPolyEffect.cpp
diff --git a/src/gpu/effects/GrConvexPolyEffect.cpp b/src/gpu/effects/GrConvexPolyEffect.cpp
index 3596ab548f20b0ddb58985e0ceeb6213b420cf67..d22a3472a5def57b85457b85b18f5d32babeb883 100644
--- a/src/gpu/effects/GrConvexPolyEffect.cpp
+++ b/src/gpu/effects/GrConvexPolyEffect.cpp
@@ -11,6 +11,7 @@
#include "gl/GrGLContext.h"
#include "gl/GrGLFragmentProcessor.h"
#include "gl/builders/GrGLProgramBuilder.h"
+#include "glsl/GrGLSLProgramDataManager.h"
//////////////////////////////////////////////////////////////////////////////
class AARectEffect : public GrFragmentProcessor {
@@ -87,10 +88,10 @@ 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 fRectUniform;
+ GrGLSLProgramDataManager::UniformHandle fRectUniform;
SkRect fPrevRect;
typedef GrGLFragmentProcessor INHERITED;
};
@@ -138,7 +139,8 @@ void GLAARectEffect::emitCode(EmitArgs& args) {
(GrGLSLExpr4(args.fInputColor) * GrGLSLExpr1("alpha")).c_str());
}
-void GLAARectEffect::onSetData(const GrGLProgramDataManager& pdman, const GrProcessor& processor) {
+void GLAARectEffect::onSetData(const GrGLSLProgramDataManager& pdman,
+ const GrProcessor& processor) {
const AARectEffect& aare = processor.cast<AARectEffect>();
const SkRect& rect = aare.getRect();
if (rect != fPrevRect) {
@@ -173,10 +175,10 @@ 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 fEdgeUniform;
+ GrGLSLProgramDataManager::UniformHandle fEdgeUniform;
SkScalar fPrevEdges[3 * GrConvexPolyEffect::kMaxEdges];
typedef GrGLFragmentProcessor INHERITED;
};
@@ -222,7 +224,8 @@ void GrGLConvexPolyEffect::emitCode(EmitArgs& args) {
(GrGLSLExpr4(args.fInputColor) * GrGLSLExpr1("alpha")).c_str());
}
-void GrGLConvexPolyEffect::onSetData(const GrGLProgramDataManager& pdman, const GrProcessor& effect) {
+void GrGLConvexPolyEffect::onSetData(const GrGLSLProgramDataManager& pdman,
+ const GrProcessor& effect) {
const GrConvexPolyEffect& cpe = effect.cast<GrConvexPolyEffect>();
size_t byteSize = 3 * cpe.getEdgeCount() * sizeof(SkScalar);
if (0 != memcmp(fPrevEdges, cpe.getEdges(), byteSize)) {
« no previous file with comments | « src/gpu/effects/GrConstColorProcessor.cpp ('k') | src/gpu/effects/GrConvolutionEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698