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

Unified Diff: src/core/SkXfermode.cpp

Issue 778453002: Remove backend factories (Closed) Base URL: https://skia.googlesource.com/skia.git@unichoice
Patch Set: more clang warnings Created 6 years 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 | « include/gpu/GrTBackendProcessorFactory.h ('k') | src/effects/SkAlphaThresholdFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkXfermode.cpp
diff --git a/src/core/SkXfermode.cpp b/src/core/SkXfermode.cpp
index 83503659bd61098fe2140a6add8ff7c51c46085b..268d41ec1be3de741667adf3556dd5eda5075a57 100644
--- a/src/core/SkXfermode.cpp
+++ b/src/core/SkXfermode.cpp
@@ -810,7 +810,6 @@ void SkXfermode::xferA8(SkAlpha* SK_RESTRICT dst,
#include "GrCoordTransform.h"
#include "GrInvariantOutput.h"
#include "GrProcessorUnitTest.h"
-#include "GrTBackendProcessorFactory.h"
#include "gl/GrGLProcessor.h"
#include "gl/builders/GrGLProgramBuilder.h"
@@ -831,20 +830,24 @@ public:
}
}
- virtual const GrBackendFragmentProcessorFactory& getFactory() const SK_OVERRIDE {
- return GrTBackendFragmentProcessorFactory<XferEffect>::getInstance();
+ virtual void getGLProcessorKey(const GrGLCaps& caps,
+ GrProcessorKeyBuilder* b) const SK_OVERRIDE {
+ GLProcessor::GenKey(*this, caps, b);
}
- static const char* Name() { return "XferEffect"; }
+ virtual GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE {
+ return SkNEW_ARGS(GLProcessor, (*this));
+ }
+
+ virtual const char* name() const SK_OVERRIDE { return "XferEffect"; }
SkXfermode::Mode mode() const { return fMode; }
const GrTextureAccess& backgroundAccess() const { return fBackgroundAccess; }
class GLProcessor : public GrGLFragmentProcessor {
public:
- GLProcessor(const GrBackendProcessorFactory& factory, const GrProcessor&)
- : INHERITED(factory) {
- }
+ GLProcessor(const GrFragmentProcessor&) {}
+
virtual void emitCode(GrGLFPBuilder* builder,
const GrFragmentProcessor& fp,
const char* outputColor,
@@ -1228,6 +1231,7 @@ public:
private:
XferEffect(SkXfermode::Mode mode, GrTexture* background)
: fMode(mode) {
+ this->initClassID<XferEffect>();
if (background) {
fBackgroundTransform.reset(kLocal_GrCoordSet, background);
this->addCoordTransform(&fBackgroundTransform);
« no previous file with comments | « include/gpu/GrTBackendProcessorFactory.h ('k') | src/effects/SkAlphaThresholdFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698