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

Unified Diff: src/gpu/effects/GrCustomCoordsTextureEffect.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/GrCustomCoordsTextureEffect.h ('k') | src/gpu/effects/GrDashingEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrCustomCoordsTextureEffect.cpp
diff --git a/src/gpu/effects/GrCustomCoordsTextureEffect.cpp b/src/gpu/effects/GrCustomCoordsTextureEffect.cpp
index 637d442d133143aace8fcbe9bfa9100442d8a732..a132e86cf9e3e1104e5c868c6ad5dc4f04ab61bb 100644
--- a/src/gpu/effects/GrCustomCoordsTextureEffect.cpp
+++ b/src/gpu/effects/GrCustomCoordsTextureEffect.cpp
@@ -7,20 +7,17 @@
#include "GrCustomCoordsTextureEffect.h"
#include "GrInvariantOutput.h"
-#include "gl/builders/GrGLProgramBuilder.h"
+#include "GrTexture.h"
#include "gl/GrGLProcessor.h"
#include "gl/GrGLSL.h"
#include "gl/GrGLTexture.h"
#include "gl/GrGLGeometryProcessor.h"
-#include "GrTBackendProcessorFactory.h"
-#include "GrTexture.h"
+#include "gl/builders/GrGLProgramBuilder.h"
class GrGLCustomCoordsTextureEffect : public GrGLGeometryProcessor {
public:
- GrGLCustomCoordsTextureEffect(const GrBackendProcessorFactory& factory,
- const GrGeometryProcessor&,
- const GrBatchTracker&)
- : INHERITED (factory) {}
+ GrGLCustomCoordsTextureEffect(const GrGeometryProcessor&,
+ const GrBatchTracker&) {}
virtual void emitCode(const EmitArgs& args) SK_OVERRIDE {
const GrCustomCoordsTextureEffect& cte =
@@ -74,6 +71,7 @@ GrCustomCoordsTextureEffect::GrCustomCoordsTextureEffect(GrTexture* texture,
const GrTextureParams& params,
bool hasColor)
: fTextureAccess(texture, params), fInColor(NULL) {
+ this->initClassID<GrCustomCoordsTextureEffect>();
fInPosition = &this->addVertexAttrib(GrAttribute("inPosition", kVec2f_GrVertexAttribType));
if (hasColor) {
fInColor = &this->addVertexAttrib(GrAttribute("inColor", kVec4ub_GrVertexAttribType));
@@ -99,10 +97,16 @@ void GrCustomCoordsTextureEffect::onComputeInvariantOutput(GrInvariantOutput* in
}
}
-const GrBackendGeometryProcessorFactory& GrCustomCoordsTextureEffect::getFactory() const {
- return GrTBackendGeometryProcessorFactory<GrCustomCoordsTextureEffect>::getInstance();
+void GrCustomCoordsTextureEffect::getGLProcessorKey(const GrBatchTracker& bt,
+ const GrGLCaps& caps,
+ GrProcessorKeyBuilder* b) const {
+ GrGLCustomCoordsTextureEffect::GenKey(*this, bt, caps, b);
}
+GrGLGeometryProcessor*
+GrCustomCoordsTextureEffect::createGLInstance(const GrBatchTracker& bt) const {
+ return SkNEW_ARGS(GrGLCustomCoordsTextureEffect, (*this, bt));
+}
///////////////////////////////////////////////////////////////////////////////
GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrCustomCoordsTextureEffect);
« no previous file with comments | « src/gpu/effects/GrCustomCoordsTextureEffect.h ('k') | src/gpu/effects/GrDashingEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698