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

Unified Diff: src/gpu/effects/GrBicubicEffect.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/GrBicubicEffect.h ('k') | src/gpu/effects/GrConfigConversionEffect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrBicubicEffect.cpp
diff --git a/src/gpu/effects/GrBicubicEffect.cpp b/src/gpu/effects/GrBicubicEffect.cpp
index 51ba58efd5150ecadf24b453ba5fe1853b647a64..804a087b16e547ed83237c54c453cea4e0b43582 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,
@@ -140,6 +138,7 @@ GrBicubicEffect::GrBicubicEffect(GrTexture* texture,
const SkShader::TileMode tileModes[2])
: INHERITED(texture, matrix, GrTextureParams(tileModes, GrTextureParams::kNone_FilterMode))
, fDomain(GrTextureDomain::IgnoredDomain()) {
+ this->initClassID<GrBicubicEffect>();
convert_row_major_scalar_coeffs_to_column_major_floats(fCoefficients, coefficients);
}
@@ -150,14 +149,20 @@ GrBicubicEffect::GrBicubicEffect(GrTexture* texture,
: INHERITED(texture, matrix, GrTextureParams(SkShader::kClamp_TileMode,
GrTextureParams::kNone_FilterMode))
, fDomain(domain, GrTextureDomain::kClamp_Mode) {
+ this->initClassID<GrBicubicEffect>();
convert_row_major_scalar_coeffs_to_column_major_floats(fCoefficients, coefficients);
}
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 {
« no previous file with comments | « src/gpu/effects/GrBicubicEffect.h ('k') | src/gpu/effects/GrConfigConversionEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698