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

Unified Diff: src/gpu/GrAAConvexPathRenderer.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/effects/gradients/SkTwoPointRadialGradient.cpp ('k') | src/gpu/GrAAHairLinePathRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAAConvexPathRenderer.cpp
diff --git a/src/gpu/GrAAConvexPathRenderer.cpp b/src/gpu/GrAAConvexPathRenderer.cpp
index 3108b0472e96bfdd757a1301ff5eebe293445622..4008fe23d347707e26392b2a7ef88ed952ad6941 100644
--- a/src/gpu/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/GrAAConvexPathRenderer.cpp
@@ -11,20 +11,17 @@
#include "GrContext.h"
#include "GrDrawState.h"
#include "GrDrawTargetCaps.h"
+#include "GrGeometryProcessor.h"
#include "GrInvariantOutput.h"
#include "GrProcessor.h"
#include "GrPathUtils.h"
-#include "GrTBackendProcessorFactory.h"
#include "SkString.h"
#include "SkStrokeRec.h"
#include "SkTraceEvent.h"
-
-#include "gl/builders/GrGLProgramBuilder.h"
#include "gl/GrGLProcessor.h"
#include "gl/GrGLSL.h"
#include "gl/GrGLGeometryProcessor.h"
-
-#include "GrGeometryProcessor.h"
+#include "gl/builders/GrGLProgramBuilder.h"
GrAAConvexPathRenderer::GrAAConvexPathRenderer() {
}
@@ -516,21 +513,15 @@ public:
virtual ~QuadEdgeEffect() {}
- static const char* Name() { return "QuadEdge"; }
+ virtual const char* name() const SK_OVERRIDE { return "QuadEdge"; }
const GrAttribute* inPosition() const { return fInPosition; }
const GrAttribute* inQuadEdge() const { return fInQuadEdge; }
- virtual const GrBackendGeometryProcessorFactory& getFactory() const SK_OVERRIDE {
- return GrTBackendGeometryProcessorFactory<QuadEdgeEffect>::getInstance();
- }
-
class GLProcessor : public GrGLGeometryProcessor {
public:
- GLProcessor(const GrBackendProcessorFactory& factory,
- const GrGeometryProcessor&,
- const GrBatchTracker&)
- : INHERITED (factory) {}
+ GLProcessor(const GrGeometryProcessor&,
+ const GrBatchTracker&) {}
virtual void emitCode(const EmitArgs& args) SK_OVERRIDE {
const QuadEdgeEffect& qe = args.fGP.cast<QuadEdgeEffect>();
@@ -586,8 +577,19 @@ public:
typedef GrGLGeometryProcessor INHERITED;
};
+ virtual void getGLProcessorKey(const GrBatchTracker& bt,
+ const GrGLCaps& caps,
+ GrProcessorKeyBuilder* b) const SK_OVERRIDE {
+ GLProcessor::GenKey(*this, bt, caps, b);
+ }
+
+ virtual GrGLGeometryProcessor* createGLInstance(const GrBatchTracker& bt) const SK_OVERRIDE {
+ return SkNEW_ARGS(GLProcessor, (*this, bt));
+ }
+
private:
QuadEdgeEffect() {
+ this->initClassID<QuadEdgeEffect>();
fInPosition = &this->addVertexAttrib(GrAttribute("inPosition", kVec2f_GrVertexAttribType));
fInQuadEdge = &this->addVertexAttrib(GrAttribute("inQuadEdge", kVec4f_GrVertexAttribType));
}
« no previous file with comments | « src/effects/gradients/SkTwoPointRadialGradient.cpp ('k') | src/gpu/GrAAHairLinePathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698