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

Unified Diff: src/gpu/GrFragmentProcessor.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/GrDefaultGeoProcFactory.cpp ('k') | src/gpu/GrOvalRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrFragmentProcessor.cpp
diff --git a/src/gpu/GrFragmentProcessor.cpp b/src/gpu/GrFragmentProcessor.cpp
index d1a3fa161e405e96a9572526123d3ebbc3546a18..ec5aaac3ee6918a414bd27086ea2c8f565a24219 100644
--- a/src/gpu/GrFragmentProcessor.cpp
+++ b/src/gpu/GrFragmentProcessor.cpp
@@ -10,6 +10,7 @@
#include "GrCoordTransform.h"
#include "gl/GrGLFragmentProcessor.h"
#include "gl/builders/GrGLProgramBuilder.h"
+#include "glsl/GrGLSLProgramDataManager.h"
#include "effects/GrConstColorProcessor.h"
#include "effects/GrXfermodeFragmentProcessor.h"
@@ -231,12 +232,12 @@ const GrFragmentProcessor* GrFragmentProcessor::OverrideInput(const GrFragmentPr
}
private:
- void onSetData(const GrGLProgramDataManager& pdman,
+ void onSetData(const GrGLSLProgramDataManager& pdman,
const GrProcessor& fp) override {
GrColor color = fp.cast<ReplaceInputFragmentProcessor>().fColor;
if (!fHaveSetColor || color != fPreviousColor) {
- static const GrGLfloat scale = 1.f / 255.f;
- GrGLfloat floatColor[4] = {
+ static const float scale = 1.f / 255.f;
+ float floatColor[4] = {
GrColorUnpackR(color) * scale,
GrColorUnpackG(color) * scale,
GrColorUnpackB(color) * scale,
@@ -248,7 +249,7 @@ const GrFragmentProcessor* GrFragmentProcessor::OverrideInput(const GrFragmentPr
}
}
- GrGLProgramDataManager::UniformHandle fColorUni;
+ GrGLSLProgramDataManager::UniformHandle fColorUni;
bool fHaveSetColor;
GrColor fPreviousColor;
};
« no previous file with comments | « src/gpu/GrDefaultGeoProcFactory.cpp ('k') | src/gpu/GrOvalRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698