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

Unified Diff: src/gpu/effects/GrConfigConversionEffect.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/GrConfigConversionEffect.h ('k') | src/gpu/effects/GrConvexPolyEffect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrConfigConversionEffect.cpp
diff --git a/src/gpu/effects/GrConfigConversionEffect.cpp b/src/gpu/effects/GrConfigConversionEffect.cpp
index d4878417894830ce17d3651d1ee923a38cc0cd38..e146411e32272fa00325a04d18cc805caa986627 100644
--- a/src/gpu/effects/GrConfigConversionEffect.cpp
+++ b/src/gpu/effects/GrConfigConversionEffect.cpp
@@ -8,17 +8,14 @@
#include "GrConfigConversionEffect.h"
#include "GrContext.h"
#include "GrInvariantOutput.h"
-#include "GrTBackendProcessorFactory.h"
#include "GrSimpleTextureEffect.h"
+#include "SkMatrix.h"
#include "gl/GrGLProcessor.h"
#include "gl/builders/GrGLProgramBuilder.h"
-#include "SkMatrix.h"
class GrGLConfigConversionEffect : public GrGLFragmentProcessor {
public:
- GrGLConfigConversionEffect(const GrBackendProcessorFactory& factory,
- const GrProcessor& processor)
- : INHERITED (factory) {
+ GrGLConfigConversionEffect(const GrProcessor& processor) {
const GrConfigConversionEffect& configConversionEffect =
processor.cast<GrConfigConversionEffect>();
fSwapRedAndBlue = configConversionEffect.swapsRedAndBlue();
@@ -109,16 +106,13 @@ GrConfigConversionEffect::GrConfigConversionEffect(GrTexture* texture,
: GrSingleTextureEffect(texture, matrix)
, fSwapRedAndBlue(swapRedAndBlue)
, fPMConversion(pmConversion) {
+ this->initClassID<GrConfigConversionEffect>();
SkASSERT(kRGBA_8888_GrPixelConfig == texture->config() ||
kBGRA_8888_GrPixelConfig == texture->config());
// Why did we pollute our texture cache instead of using a GrSingleTextureEffect?
SkASSERT(swapRedAndBlue || kNone_PMConversion != pmConversion);
}
-const GrBackendFragmentProcessorFactory& GrConfigConversionEffect::getFactory() const {
- return GrTBackendFragmentProcessorFactory<GrConfigConversionEffect>::getInstance();
-}
-
bool GrConfigConversionEffect::onIsEqual(const GrFragmentProcessor& s) const {
const GrConfigConversionEffect& other = s.cast<GrConfigConversionEffect>();
return other.fSwapRedAndBlue == fSwapRedAndBlue &&
@@ -152,6 +146,16 @@ GrFragmentProcessor* GrConfigConversionEffect::TestCreate(SkRandom* random,
}
///////////////////////////////////////////////////////////////////////////////
+
+void GrConfigConversionEffect::getGLProcessorKey(const GrGLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
+ GrGLConfigConversionEffect::GenKey(*this, caps, b);
+}
+
+GrGLFragmentProcessor* GrConfigConversionEffect::createGLInstance() const {
+ return SkNEW_ARGS(GrGLConfigConversionEffect, (*this));
+}
+
void GrConfigConversionEffect::TestForPreservingPMConversions(GrContext* context,
PMConversion* pmToUPMRule,
PMConversion* upmToPMRule) {
« no previous file with comments | « src/gpu/effects/GrConfigConversionEffect.h ('k') | src/gpu/effects/GrConvexPolyEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698