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

Unified Diff: src/gpu/GrGeometryProcessor.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/GrDefaultGeoProcFactory.cpp ('k') | src/gpu/GrOvalRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrGeometryProcessor.h
diff --git a/src/gpu/GrGeometryProcessor.h b/src/gpu/GrGeometryProcessor.h
index 27383a4df49df6dd3e618f24f72fed5a5e745a1d..9e621d82a04a66e603976c7305745bd2da34c742 100644
--- a/src/gpu/GrGeometryProcessor.h
+++ b/src/gpu/GrGeometryProcessor.h
@@ -34,6 +34,8 @@ private:
uint8_t fData[kMaxSize];
};
+class GrGLCaps;
+class GrGLGeometryProcessor;
class GrOptDrawState;
/**
@@ -55,7 +57,18 @@ public:
, fHasVertexCoverage(false)
, fHasLocalCoords(false) {}
- virtual const GrBackendGeometryProcessorFactory& getFactory() const = 0;
+ virtual const char* name() const = 0;
+
+ /** Implemented using GLProcessor::GenKey as described in this class's comment. */
+ virtual void getGLProcessorKey(const GrBatchTracker& bt,
+ const GrGLCaps& caps,
+ GrProcessorKeyBuilder* b) const = 0;
+
+
+ /** Returns a new instance of the appropriate *GL* implementation class
+ for the given GrProcessor; caller is responsible for deleting
+ the object. */
+ virtual GrGLGeometryProcessor* createGLInstance(const GrBatchTracker& bt) const = 0;
/*
* This is a safeguard to prevent GPs from going beyond platform specific attribute limits.
@@ -91,7 +104,7 @@ public:
would generate the same shader code. To test for identical code generation use the
processors' keys computed by the GrBackendEffectFactory. */
bool isEqual(const GrGeometryProcessor& that) const {
- if (&this->getFactory() != &that.getFactory() || !this->hasSameTextureAccesses(that)) {
+ if (this->classID() != that.classID() || !this->hasSameTextureAccesses(that)) {
return false;
}
return this->onIsEqual(that);
@@ -143,5 +156,4 @@ private:
typedef GrProcessor INHERITED;
};
-
#endif
« no previous file with comments | « src/gpu/GrDefaultGeoProcFactory.cpp ('k') | src/gpu/GrOvalRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698