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

Unified Diff: src/gpu/effects/GrSimpleTextureEffect.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/gpu/effects/GrSimpleTextureEffect.h ('k') | src/gpu/effects/GrTextureDomain.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrSimpleTextureEffect.cpp
diff --git a/src/gpu/effects/GrSimpleTextureEffect.cpp b/src/gpu/effects/GrSimpleTextureEffect.cpp
index a8eab3a771d0c857d00b45778d2411338354dc2a..51822e9b9b54fe710680c19dc0692067580380c0 100644
--- a/src/gpu/effects/GrSimpleTextureEffect.cpp
+++ b/src/gpu/effects/GrSimpleTextureEffect.cpp
@@ -7,8 +7,8 @@
#include "GrSimpleTextureEffect.h"
#include "GrInvariantOutput.h"
-#include "GrTBackendProcessorFactory.h"
#include "GrTexture.h"
+#include "gl/GrGLCaps.h"
#include "gl/GrGLProcessor.h"
#include "gl/GrGLSL.h"
#include "gl/GrGLTexture.h"
@@ -16,9 +16,7 @@
class GrGLSimpleTextureEffect : public GrGLFragmentProcessor {
public:
- GrGLSimpleTextureEffect(const GrBackendProcessorFactory& factory, const GrProcessor&)
- : INHERITED (factory) {
- }
+ GrGLSimpleTextureEffect(const GrProcessor&) {}
virtual void emitCode(GrGLFPBuilder* builder,
const GrFragmentProcessor& fp,
@@ -45,8 +43,13 @@ void GrSimpleTextureEffect::onComputeInvariantOutput(GrInvariantOutput* inout) c
this->updateInvariantOutputForModulation(inout);
}
-const GrBackendFragmentProcessorFactory& GrSimpleTextureEffect::getFactory() const {
- return GrTBackendFragmentProcessorFactory<GrSimpleTextureEffect>::getInstance();
+void GrSimpleTextureEffect::getGLProcessorKey(const GrGLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
+ GrGLSimpleTextureEffect::GenKey(*this, caps, b);
+}
+
+GrGLFragmentProcessor* GrSimpleTextureEffect::createGLInstance() const {
+ return SkNEW_ARGS(GrGLSimpleTextureEffect, (*this));
}
///////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « src/gpu/effects/GrSimpleTextureEffect.h ('k') | src/gpu/effects/GrTextureDomain.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698