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

Unified Diff: src/gpu/effects/GrYUVtoRGBEffect.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/gpu/effects/GrTextureDomain.cpp ('k') | src/gpu/gl/GrGLFragmentProcessor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrYUVtoRGBEffect.cpp
diff --git a/src/gpu/effects/GrYUVtoRGBEffect.cpp b/src/gpu/effects/GrYUVtoRGBEffect.cpp
index 7d77c1f3b41c6682e66c4f24297c79ebcb5949dc..913c37e39b77e84cfdb79cd6189418fe034731d3 100644
--- a/src/gpu/effects/GrYUVtoRGBEffect.cpp
+++ b/src/gpu/effects/GrYUVtoRGBEffect.cpp
@@ -80,7 +80,8 @@ public:
fsBuilder->codeAppendf(".r,\n\t\t1.0) * %s;\n", yuvMatrix);
}
- virtual void setData(const GrGLProgramDataManager& pdman,
+ protected:
+ virtual void onSetData(const GrGLProgramDataManager& pdman,
const GrProcessor& processor) override {
const YUVtoRGBEffect& yuvEffect = processor.cast<YUVtoRGBEffect>();
switch (yuvEffect.getColorSpace()) {
@@ -102,10 +103,6 @@ public:
typedef GrGLFragmentProcessor INHERITED;
};
- GrGLFragmentProcessor* createGLInstance() const override {
- return SkNEW_ARGS(GLProcessor, (*this));
- }
-
private:
YUVtoRGBEffect(GrProcessorDataManager*, GrTexture* yTexture, GrTexture* uTexture,
GrTexture* vTexture, const SkMatrix yuvMatrix[3],
@@ -126,6 +123,10 @@ private:
this->addTextureAccess(&fVAccess);
}
+ GrGLFragmentProcessor* onCreateGLInstance() const override {
+ return SkNEW_ARGS(GLProcessor, (*this));
+ }
+
virtual void onGetGLProcessorKey(const GrGLSLCaps& caps,
GrProcessorKeyBuilder* b) const override {
GLProcessor::GenKey(*this, caps, b);
« no previous file with comments | « src/gpu/effects/GrTextureDomain.cpp ('k') | src/gpu/gl/GrGLFragmentProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698