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

Unified Diff: src/gpu/effects/GrBicubicEffect.cpp

Issue 778453002: Remove backend factories (Closed) Base URL: https://skia.googlesource.com/skia.git@unichoice
Patch Set: cleanup 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
Index: src/gpu/effects/GrBicubicEffect.cpp
diff --git a/src/gpu/effects/GrBicubicEffect.cpp b/src/gpu/effects/GrBicubicEffect.cpp
index 51ba58efd5150ecadf24b453ba5fe1853b647a64..a0dc7ad2a545f74f7e6c9aeab76f35fdd5f75e64 100644
--- a/src/gpu/effects/GrBicubicEffect.cpp
+++ b/src/gpu/effects/GrBicubicEffect.cpp
@@ -5,9 +5,9 @@
* found in the LICENSE file.
*/
-#include "gl/builders/GrGLProgramBuilder.h"
#include "GrBicubicEffect.h"
#include "GrInvariantOutput.h"
+#include "gl/builders/GrGLProgramBuilder.h"
#define DS(x) SkDoubleToScalar(x)
@@ -21,8 +21,7 @@ const SkScalar GrBicubicEffect::gMitchellCoefficients[16] = {
class GrGLBicubicEffect : public GrGLFragmentProcessor {
public:
- GrGLBicubicEffect(const GrBackendProcessorFactory& factory,
- const GrProcessor&);
+ GrGLBicubicEffect(const GrProcessor&);
virtual void emitCode(GrGLFPBuilder*,
const GrFragmentProcessor&,
@@ -49,8 +48,7 @@ private:
typedef GrGLFragmentProcessor INHERITED;
};
-GrGLBicubicEffect::GrGLBicubicEffect(const GrBackendProcessorFactory& factory, const GrProcessor&)
- : INHERITED(factory) {
+GrGLBicubicEffect::GrGLBicubicEffect(const GrProcessor&) {
}
void GrGLBicubicEffect::emitCode(GrGLFPBuilder* builder,
@@ -156,8 +154,13 @@ GrBicubicEffect::GrBicubicEffect(GrTexture* texture,
GrBicubicEffect::~GrBicubicEffect() {
}
-const GrBackendFragmentProcessorFactory& GrBicubicEffect::getFactory() const {
- return GrTBackendFragmentProcessorFactory<GrBicubicEffect>::getInstance();
+void GrBicubicEffect::getGLProcessorKey(const GrGLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
+ GrGLBicubicEffect::GenKey(*this, caps, b);
+}
+
+GrGLFragmentProcessor* GrBicubicEffect::createGLInstance() const {
+ return SkNEW_ARGS(GrGLBicubicEffect, (*this));
}
bool GrBicubicEffect::onIsEqual(const GrFragmentProcessor& sBase) const {

Powered by Google App Engine
This is Rietveld 408576698