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

Unified Diff: src/gpu/effects/GrTextureDomain.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/GrTextureDomain.h ('k') | src/gpu/effects/GrYUVtoRGBEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrTextureDomain.cpp
diff --git a/src/gpu/effects/GrTextureDomain.cpp b/src/gpu/effects/GrTextureDomain.cpp
index 1de518c1709b50b580a5953099c9444554816898..c6a9a22a946183632bec88249c9208625fe1d12e 100644
--- a/src/gpu/effects/GrTextureDomain.cpp
+++ b/src/gpu/effects/GrTextureDomain.cpp
@@ -5,14 +5,12 @@
* found in the LICENSE file.
*/
-#include "gl/builders/GrGLProgramBuilder.h"
#include "GrTextureDomain.h"
#include "GrInvariantOutput.h"
#include "GrSimpleTextureEffect.h"
-#include "GrTBackendProcessorFactory.h"
-#include "gl/GrGLProcessor.h"
#include "SkFloatingPoint.h"
-
+#include "gl/GrGLProcessor.h"
+#include "gl/builders/GrGLProgramBuilder.h"
GrTextureDomain::GrTextureDomain(const SkRect& domain, Mode mode, int index)
: fIndex(index) {
@@ -168,7 +166,7 @@ void GrTextureDomain::GLDomain::setData(const GrGLProgramDataManager& pdman,
class GrGLTextureDomainEffect : public GrGLFragmentProcessor {
public:
- GrGLTextureDomainEffect(const GrBackendProcessorFactory&, const GrProcessor&);
+ GrGLTextureDomainEffect(const GrProcessor&);
virtual void emitCode(GrGLFPBuilder*,
const GrFragmentProcessor&,
@@ -186,9 +184,7 @@ private:
typedef GrGLFragmentProcessor INHERITED;
};
-GrGLTextureDomainEffect::GrGLTextureDomainEffect(const GrBackendProcessorFactory& factory,
- const GrProcessor&)
- : INHERITED(factory) {
+GrGLTextureDomainEffect::GrGLTextureDomainEffect(const GrProcessor&) {
}
void GrGLTextureDomainEffect::emitCode(GrGLFPBuilder* builder,
@@ -252,14 +248,20 @@ GrTextureDomainEffect::GrTextureDomainEffect(GrTexture* texture,
, fTextureDomain(domain, mode) {
SkASSERT(mode != GrTextureDomain::kRepeat_Mode ||
filterMode == GrTextureParams::kNone_FilterMode);
+ this->initClassID<GrTextureDomainEffect>();
}
GrTextureDomainEffect::~GrTextureDomainEffect() {
}
-const GrBackendFragmentProcessorFactory& GrTextureDomainEffect::getFactory() const {
- return GrTBackendFragmentProcessorFactory<GrTextureDomainEffect>::getInstance();
+void GrTextureDomainEffect::getGLProcessorKey(const GrGLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
+ GrGLTextureDomainEffect::GenKey(*this, caps, b);
+}
+
+GrGLFragmentProcessor* GrTextureDomainEffect::createGLInstance() const {
+ return SkNEW_ARGS(GrGLTextureDomainEffect, (*this));
}
bool GrTextureDomainEffect::onIsEqual(const GrFragmentProcessor& sBase) const {
« no previous file with comments | « src/gpu/effects/GrTextureDomain.h ('k') | src/gpu/effects/GrYUVtoRGBEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698