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

Unified Diff: src/gpu/gl/GrGLProcessor.h

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/gl/GrGLGeometryProcessor.h ('k') | src/gpu/gl/GrGLProgramDesc.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLProcessor.h
diff --git a/src/gpu/gl/GrGLProcessor.h b/src/gpu/gl/GrGLProcessor.h
index 6401e2b324abdacfc36fe11fdafd1e24017bb2e3..6dccd33bac40764f5adba2b7762ccdabd3a53e0a 100644
--- a/src/gpu/gl/GrGLProcessor.h
+++ b/src/gpu/gl/GrGLProcessor.h
@@ -8,8 +8,8 @@
#ifndef GrGLProcessor_DEFINED
#define GrGLProcessor_DEFINED
-#include "GrBackendProcessorFactory.h"
#include "GrGLProgramDataManager.h"
+#include "GrProcessor.h"
#include "GrTextureAccess.h"
/** @file
@@ -26,13 +26,9 @@
These objects are created by the factory object returned by the GrProcessor::getFactory().
*/
-
+// TODO delete this and make TextureSampler its own thing
class GrGLProcessor {
public:
- GrGLProcessor(const GrBackendProcessorFactory& factory)
- : fFactory(factory) {
- }
-
typedef GrGLProgramDataManager::UniformHandle UniformHandle;
/**
@@ -67,27 +63,20 @@ public:
};
typedef SkTArray<TextureSampler> TextureSamplerArray;
-
- virtual ~GrGLProcessor() {}
-
- const char* name() const { return fFactory.name(); }
-
- static void GenKey(const GrProcessor&, const GrGLCaps&, GrProcessorKeyBuilder*) {}
-
-protected:
- const GrBackendProcessorFactory& fFactory;
};
class GrGLFPBuilder;
-class GrGLFragmentProcessor : public GrGLProcessor {
+class GrGLFragmentProcessor {
public:
- GrGLFragmentProcessor(const GrBackendProcessorFactory& factory)
- : INHERITED(factory) {
- }
+ GrGLFragmentProcessor() {}
virtual ~GrGLFragmentProcessor() {}
+ typedef GrGLProgramDataManager::UniformHandle UniformHandle;
+ typedef GrGLProcessor::TransformedCoordsArray TransformedCoordsArray;
+ typedef GrGLProcessor::TextureSamplerArray TextureSamplerArray;
+
/** Called when the program stage should insert its code into the shaders. The code in each
shader will be in its own block ({}) and so locally scoped names will not collide across
stages.
@@ -122,15 +111,15 @@ public:
// TODO update this to pass in GrFragmentProcessor
virtual void setData(const GrGLProgramDataManager&, const GrProcessor&) {}
+ static void GenKey(const GrProcessor&, const GrGLCaps&, GrProcessorKeyBuilder*) {}
+
private:
typedef GrGLProcessor INHERITED;
};
class GrGLXferProcessor : public GrGLFragmentProcessor {
public:
- GrGLXferProcessor(const GrBackendProcessorFactory& factory)
- : INHERITED(factory) {
- }
+ GrGLXferProcessor() {}
virtual ~GrGLXferProcessor() {}
« no previous file with comments | « src/gpu/gl/GrGLGeometryProcessor.h ('k') | src/gpu/gl/GrGLProgramDesc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698