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

Unified Diff: src/gpu/effects/GrPorterDuffXferProcessor.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/GrPorterDuffXferProcessor.h ('k') | src/gpu/effects/GrRRectEffect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrPorterDuffXferProcessor.cpp
diff --git a/src/gpu/effects/GrPorterDuffXferProcessor.cpp b/src/gpu/effects/GrPorterDuffXferProcessor.cpp
index 1f50f9d52420691ac05813f63b823a210ed55103..5c842a890a8b708d921e780f7d0da8ba39b1eabc 100644
--- a/src/gpu/effects/GrPorterDuffXferProcessor.cpp
+++ b/src/gpu/effects/GrPorterDuffXferProcessor.cpp
@@ -7,11 +7,9 @@
#include "GrPorterDuffXferProcessor.h"
-#include "GrBackendProcessorFactory.h"
#include "GrDrawState.h"
#include "GrInvariantOutput.h"
#include "GrProcessor.h"
-#include "GrTBackendProcessorFactory.h"
#include "GrTypes.h"
#include "GrXferProcessor.h"
#include "gl/GrGLProcessor.h"
@@ -20,8 +18,7 @@
class GrGLPorterDuffXferProcessor : public GrGLXferProcessor {
public:
- GrGLPorterDuffXferProcessor(const GrBackendProcessorFactory& factory, const GrProcessor&)
- : INHERITED(factory) {}
+ GrGLPorterDuffXferProcessor(const GrProcessor&) {}
virtual ~GrGLPorterDuffXferProcessor() {}
@@ -46,13 +43,20 @@ private:
///////////////////////////////////////////////////////////////////////////////
GrPorterDuffXferProcessor::GrPorterDuffXferProcessor(GrBlendCoeff srcBlend, GrBlendCoeff dstBlend)
- : fSrcBlend(srcBlend), fDstBlend(dstBlend) {}
+ : fSrcBlend(srcBlend), fDstBlend(dstBlend) {
+ this->initClassID<GrPorterDuffXferProcessor>();
+}
GrPorterDuffXferProcessor::~GrPorterDuffXferProcessor() {
}
-const GrBackendFragmentProcessorFactory& GrPorterDuffXferProcessor::getFactory() const {
- return GrTBackendFragmentProcessorFactory<GrPorterDuffXferProcessor>::getInstance();
+void GrPorterDuffXferProcessor::getGLProcessorKey(const GrGLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
+ GrGLPorterDuffXferProcessor::GenKey(*this, caps, b);
+}
+
+GrGLFragmentProcessor* GrPorterDuffXferProcessor::createGLInstance() const {
+ return SkNEW_ARGS(GrGLPorterDuffXferProcessor, (*this));
}
void GrPorterDuffXferProcessor::onComputeInvariantOutput(GrInvariantOutput* inout) const {
« no previous file with comments | « src/gpu/effects/GrPorterDuffXferProcessor.h ('k') | src/gpu/effects/GrRRectEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698