diff options
author | 2015-04-28 08:48:20 -0700 | |
---|---|---|
committer | 2015-04-28 08:48:20 -0700 | |
commit | cfc18867d982119d9dc2888bf09f1093012daadd (patch) | |
tree | af55e571828da1a7353457451bafab547079fa1f /src/gpu/effects/GrCustomXfermode.cpp | |
parent | 77772f3ca36c3fb7f2195615cce2adac2be2fec6 (diff) |
Use GLSLCaps for creating processor keys and GLSL-specific programs
Effectively all this does is future-proof any GLSL-specific code, as
GLSLCaps is just a typedef of GLCaps.
BUG=skia:
Review URL: https://codereview.chromium.org/1109863004
Diffstat (limited to 'src/gpu/effects/GrCustomXfermode.cpp')
-rw-r--r-- | src/gpu/effects/GrCustomXfermode.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gpu/effects/GrCustomXfermode.cpp b/src/gpu/effects/GrCustomXfermode.cpp index 2d5352e934..195511d6d1 100644 --- a/src/gpu/effects/GrCustomXfermode.cpp +++ b/src/gpu/effects/GrCustomXfermode.cpp @@ -427,7 +427,7 @@ public: void setData(const GrGLProgramDataManager&, const GrProcessor&) override {} - static void GenKey(const GrFragmentProcessor& proc, const GrGLCaps&, GrProcessorKeyBuilder* b) { + static void GenKey(const GrFragmentProcessor& proc, const GrGLSLCaps&, GrProcessorKeyBuilder* b) { // The background may come from the dst or from a texture. uint32_t key = proc.numTextures(); SkASSERT(key <= 1); @@ -453,7 +453,7 @@ GrCustomXferFP::GrCustomXferFP(SkXfermode::Mode mode, GrTexture* background) this->addTextureAccess(&fBackgroundAccess); } -void GrCustomXferFP::getGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuilder* b) const { +void GrCustomXferFP::getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const { GLCustomXferFP::GenKey(*this, caps, b); } @@ -514,7 +514,7 @@ public: private: CustomXP(SkXfermode::Mode mode, const GrDeviceCoordTexture* dstCopy, bool willReadDstColor); - void onGetGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuilder* b) const override; + void onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override; bool onIsEqual(const GrXferProcessor& xpBase) const override; @@ -540,7 +540,7 @@ public: GLCustomXP(const GrXferProcessor&) {} ~GLCustomXP() override {} - static void GenKey(const GrXferProcessor& proc, const GrGLCaps&, GrProcessorKeyBuilder* b) { + static void GenKey(const GrXferProcessor& proc, const GrGLSLCaps&, GrProcessorKeyBuilder* b) { uint32_t key = proc.numTextures(); SkASSERT(key <= 1); key |= proc.cast<CustomXP>().mode() << 1; @@ -573,7 +573,7 @@ CustomXP::CustomXP(SkXfermode::Mode mode, const GrDeviceCoordTexture* dstCopy, this->initClassID<CustomXP>(); } -void CustomXP::onGetGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuilder* b) const { +void CustomXP::onGetGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const { GLCustomXP::GenKey(*this, caps, b); } |