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

Unified Diff: src/effects/gradients/SkTwoPointConicalGradient_gpu.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/gradients/SkGradientShaderPriv.h ('k') | src/gpu/GrDefaultGeoProcFactory.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp
diff --git a/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp b/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp
index 4976575f522b4ed48266522cd0ab2cbd84b227e0..b5716b1de00331355e066e9859450ea5620ef4c7 100644
--- a/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp
+++ b/src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp
@@ -13,8 +13,9 @@
#if SK_SUPPORT_GPU
#include "GrPaint.h"
#include "gl/builders/GrGLProgramBuilder.h"
+#include "glsl/GrGLSLProgramDataManager.h"
// For brevity
-typedef GrGLProgramDataManager::UniformHandle UniformHandle;
+typedef GrGLSLProgramDataManager::UniformHandle UniformHandle;
static const SkScalar kErrorTol = 0.00001f;
static const SkScalar kEdgeErrorTol = 5.f * kErrorTol;
@@ -147,7 +148,7 @@ public:
static void GenKey(const GrProcessor&, const GrGLSLCaps& caps, GrProcessorKeyBuilder* b);
protected:
- void onSetData(const GrGLProgramDataManager&, const GrProcessor&) override;
+ void onSetData(const GrGLSLProgramDataManager&, const GrProcessor&) override;
UniformHandle fParamUni;
@@ -273,8 +274,8 @@ void GLEdge2PtConicalEffect::emitCode(EmitArgs& args) {
fsBuilder->codeAppend("\t}\n");
}
-void GLEdge2PtConicalEffect::onSetData(const GrGLProgramDataManager& pdman,
- const GrProcessor& processor) {
+void GLEdge2PtConicalEffect::onSetData(const GrGLSLProgramDataManager& pdman,
+ const GrProcessor& processor) {
INHERITED::onSetData(pdman, processor);
const Edge2PtConicalEffect& data = processor.cast<Edge2PtConicalEffect>();
SkScalar radius0 = data.radius();
@@ -423,7 +424,7 @@ public:
static void GenKey(const GrProcessor&, const GrGLSLCaps& caps, GrProcessorKeyBuilder* b);
protected:
- void onSetData(const GrGLProgramDataManager&, const GrProcessor&) override;
+ void onSetData(const GrGLSLProgramDataManager&, const GrProcessor&) override;
UniformHandle fParamUni;
@@ -540,8 +541,8 @@ void GLFocalOutside2PtConicalEffect::emitCode(EmitArgs& args) {
fsBuilder->codeAppend("\t}\n");
}
-void GLFocalOutside2PtConicalEffect::onSetData(const GrGLProgramDataManager& pdman,
- const GrProcessor& processor) {
+void GLFocalOutside2PtConicalEffect::onSetData(const GrGLSLProgramDataManager& pdman,
+ const GrProcessor& processor) {
INHERITED::onSetData(pdman, processor);
const FocalOutside2PtConicalEffect& data = processor.cast<FocalOutside2PtConicalEffect>();
SkASSERT(data.isFlipped() == fIsFlipped);
@@ -629,7 +630,7 @@ public:
static void GenKey(const GrProcessor&, const GrGLSLCaps& caps, GrProcessorKeyBuilder* b);
protected:
- void onSetData(const GrGLProgramDataManager&, const GrProcessor&) override;
+ void onSetData(const GrGLSLProgramDataManager&, const GrProcessor&) override;
UniformHandle fFocalUni;
@@ -723,8 +724,8 @@ void GLFocalInside2PtConicalEffect::emitCode(EmitArgs& args) {
args.fSamplers);
}
-void GLFocalInside2PtConicalEffect::onSetData(const GrGLProgramDataManager& pdman,
- const GrProcessor& processor) {
+void GLFocalInside2PtConicalEffect::onSetData(const GrGLSLProgramDataManager& pdman,
+ const GrProcessor& processor) {
INHERITED::onSetData(pdman, processor);
const FocalInside2PtConicalEffect& data = processor.cast<FocalInside2PtConicalEffect>();
SkScalar focal = data.focal();
@@ -866,7 +867,7 @@ public:
static void GenKey(const GrProcessor&, const GrGLSLCaps& caps, GrProcessorKeyBuilder* b);
protected:
- void onSetData(const GrGLProgramDataManager&, const GrProcessor&) override;
+ void onSetData(const GrGLSLProgramDataManager&, const GrProcessor&) override;
UniformHandle fCenterUni;
UniformHandle fParamUni;
@@ -983,8 +984,8 @@ void GLCircleInside2PtConicalEffect::emitCode(EmitArgs& args) {
args.fSamplers);
}
-void GLCircleInside2PtConicalEffect::onSetData(const GrGLProgramDataManager& pdman,
- const GrProcessor& processor) {
+void GLCircleInside2PtConicalEffect::onSetData(const GrGLSLProgramDataManager& pdman,
+ const GrProcessor& processor) {
INHERITED::onSetData(pdman, processor);
const CircleInside2PtConicalEffect& data = processor.cast<CircleInside2PtConicalEffect>();
SkScalar centerX = data.centerX();
@@ -1088,7 +1089,7 @@ public:
static void GenKey(const GrProcessor&, const GrGLSLCaps& caps, GrProcessorKeyBuilder* b);
protected:
- void onSetData(const GrGLProgramDataManager&, const GrProcessor&) override;
+ void onSetData(const GrGLSLProgramDataManager&, const GrProcessor&) override;
UniformHandle fCenterUni;
UniformHandle fParamUni;
@@ -1229,8 +1230,8 @@ void GLCircleOutside2PtConicalEffect::emitCode(EmitArgs& args) {
fsBuilder->codeAppend("\t}\n");
}
-void GLCircleOutside2PtConicalEffect::onSetData(const GrGLProgramDataManager& pdman,
- const GrProcessor& processor) {
+void GLCircleOutside2PtConicalEffect::onSetData(const GrGLSLProgramDataManager& pdman,
+ const GrProcessor& processor) {
INHERITED::onSetData(pdman, processor);
const CircleOutside2PtConicalEffect& data = processor.cast<CircleOutside2PtConicalEffect>();
SkASSERT(data.isFlipped() == fIsFlipped);
« no previous file with comments | « src/effects/gradients/SkGradientShaderPriv.h ('k') | src/gpu/GrDefaultGeoProcFactory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698