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

Unified Diff: src/effects/SkColorFilters.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 | « src/effects/SkColorCubeFilter.cpp ('k') | src/effects/SkColorMatrixFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkColorFilters.cpp
diff --git a/src/effects/SkColorFilters.cpp b/src/effects/SkColorFilters.cpp
index 92e6f432f17c24cf5c2d2b020ccc769b88ddeb8d..d8cc42cd186fccd490f95a55f49517719344030c 100644
--- a/src/effects/SkColorFilters.cpp
+++ b/src/effects/SkColorFilters.cpp
@@ -115,10 +115,9 @@ SkFlattenable* SkModeColorFilter::CreateProc(SkReadBuffer& buffer) {
#include "GrFragmentProcessor.h"
#include "GrInvariantOutput.h"
#include "GrProcessorUnitTest.h"
-#include "GrTBackendProcessorFactory.h"
+#include "SkGr.h"
#include "gl/GrGLProcessor.h"
#include "gl/builders/GrGLProgramBuilder.h"
-#include "SkGr.h"
namespace {
/**
@@ -195,19 +194,23 @@ public:
return true;
}
- virtual const GrBackendFragmentProcessorFactory& getFactory() const SK_OVERRIDE {
- return GrTBackendFragmentProcessorFactory<ModeColorFilterEffect>::getInstance();
+ virtual void getGLProcessorKey(const GrGLCaps& caps,
+ GrProcessorKeyBuilder* b) const SK_OVERRIDE {
+ GLProcessor::GenKey(*this, caps, b);
}
- static const char* Name() { return "ModeColorFilterEffect"; }
+ virtual GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE {
+ return SkNEW_ARGS(GLProcessor, (*this));
+ }
+
+ virtual const char* name() const SK_OVERRIDE { return "ModeColorFilterEffect"; }
SkXfermode::Mode mode() const { return fMode; }
GrColor color() const { return fColor; }
class GLProcessor : public GrGLFragmentProcessor {
public:
- GLProcessor(const GrBackendProcessorFactory& factory, const GrProcessor&)
- : INHERITED(factory) {
+ GLProcessor(const GrProcessor&) {
}
virtual void emitCode(GrGLFPBuilder* builder,
@@ -263,7 +266,9 @@ public:
private:
ModeColorFilterEffect(GrColor color, SkXfermode::Mode mode)
: fMode(mode),
- fColor(color) {}
+ fColor(color) {
+ this->initClassID<ModeColorFilterEffect>();
+ }
virtual bool onIsEqual(const GrFragmentProcessor& other) const SK_OVERRIDE {
const ModeColorFilterEffect& s = other.cast<ModeColorFilterEffect>();
« no previous file with comments | « src/effects/SkColorCubeFilter.cpp ('k') | src/effects/SkColorMatrixFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698