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

Unified Diff: src/effects/SkArithmeticMode_gpu.cpp

Issue 1287023009: Added tree structure to GrGLFragmentProcessor, i.e. GL instances (Closed) Base URL: https://skia.googlesource.com/skia@cs3_isequal_nonrecursive
Patch Set: moved onSetData from public to protected, onCreateGLInstance from public to private in subclasses Created 5 years, 4 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/SkArithmeticMode_gpu.h ('k') | src/effects/SkBlurMaskFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkArithmeticMode_gpu.cpp
diff --git a/src/effects/SkArithmeticMode_gpu.cpp b/src/effects/SkArithmeticMode_gpu.cpp
index 08851cb7bd3c7ff0c2e5c6a53ab2501c94d02fed..39814e2eb2776e78f0ae585f2c235c55eb38ee5b 100644
--- a/src/effects/SkArithmeticMode_gpu.cpp
+++ b/src/effects/SkArithmeticMode_gpu.cpp
@@ -77,18 +77,19 @@ public:
fEnforcePMColor);
}
- void setData(const GrGLProgramDataManager& pdman, const GrProcessor& proc) override {
- const GrArithmeticFP& arith = proc.cast<GrArithmeticFP>();
- pdman.set4f(fKUni, arith.k1(), arith.k2(), arith.k3(), arith.k4());
- fEnforcePMColor = arith.enforcePMColor();
- }
-
static void GenKey(const GrProcessor& proc, const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) {
const GrArithmeticFP& arith = proc.cast<GrArithmeticFP>();
uint32_t key = arith.enforcePMColor() ? 1 : 0;
b->add32(key);
}
+protected:
+ void onSetData(const GrGLProgramDataManager& pdman, const GrProcessor& proc) override {
+ const GrArithmeticFP& arith = proc.cast<GrArithmeticFP>();
+ pdman.set4f(fKUni, arith.k1(), arith.k2(), arith.k3(), arith.k4());
+ fEnforcePMColor = arith.enforcePMColor();
+ }
+
private:
GrGLProgramDataManager::UniformHandle fKUni;
bool fEnforcePMColor;
@@ -116,7 +117,7 @@ void GrArithmeticFP::onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyB
GLArithmeticFP::GenKey(*this, caps, b);
}
-GrGLFragmentProcessor* GrArithmeticFP::createGLInstance() const {
+GrGLFragmentProcessor* GrArithmeticFP::onCreateGLInstance() const {
return SkNEW_ARGS(GLArithmeticFP, (*this));
}
« no previous file with comments | « src/effects/SkArithmeticMode_gpu.h ('k') | src/effects/SkBlurMaskFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698