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

Unified Diff: src/gpu/effects/GrSimpleTextureEffect.h

Issue 24018007: Add a GrCustomCoordsTextureEffect class (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 3 months 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.cpp ('k') | src/gpu/effects/GrSimpleTextureEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrSimpleTextureEffect.h
diff --git a/src/gpu/effects/GrSimpleTextureEffect.h b/src/gpu/effects/GrSimpleTextureEffect.h
index bcce46b595bfa8c7ba70f95816b7255c9b104e07..c6941972064c0bd3eb66716c5b0d9a4ae2776511 100644
--- a/src/gpu/effects/GrSimpleTextureEffect.h
+++ b/src/gpu/effects/GrSimpleTextureEffect.h
@@ -26,7 +26,6 @@ public:
static GrEffectRef* Create(GrTexture* tex,
const SkMatrix& matrix,
CoordsType coordsType = kLocal_CoordsType) {
- SkASSERT(kLocal_CoordsType == coordsType || kPosition_CoordsType == coordsType);
AutoEffectUnref effect(SkNEW_ARGS(GrSimpleTextureEffect, (tex, matrix, GrTextureParams::kNone_FilterMode, coordsType)));
return CreateEffectRef(effect);
}
@@ -36,7 +35,6 @@ public:
const SkMatrix& matrix,
GrTextureParams::FilterMode filterMode,
CoordsType coordsType = kLocal_CoordsType) {
- SkASSERT(kLocal_CoordsType == coordsType || kPosition_CoordsType == coordsType);
AutoEffectUnref effect(
SkNEW_ARGS(GrSimpleTextureEffect, (tex, matrix, filterMode, coordsType)));
return CreateEffectRef(effect);
@@ -46,21 +44,10 @@ public:
const SkMatrix& matrix,
const GrTextureParams& p,
CoordsType coordsType = kLocal_CoordsType) {
- SkASSERT(kLocal_CoordsType == coordsType || kPosition_CoordsType == coordsType);
AutoEffectUnref effect(SkNEW_ARGS(GrSimpleTextureEffect, (tex, matrix, p, coordsType)));
return CreateEffectRef(effect);
}
- /** Variant that requires the client to install a custom kVec2 vertex attribute that will be
- the source of the coords. No matrix is allowed in this mode. */
- static GrEffectRef* CreateWithCustomCoords(GrTexture* tex, const GrTextureParams& p) {
- AutoEffectUnref effect(SkNEW_ARGS(GrSimpleTextureEffect, (tex,
- SkMatrix::I(),
- p,
- kCustom_CoordsType)));
- return CreateEffectRef(effect);
- }
-
virtual ~GrSimpleTextureEffect() {}
static const char* Name() { return "Texture"; }
@@ -77,7 +64,6 @@ private:
GrTextureParams::FilterMode filterMode,
CoordsType coordsType)
: GrSingleTextureEffect(texture, matrix, filterMode, coordsType) {
- SkASSERT(kLocal_CoordsType == coordsType || kPosition_CoordsType == coordsType);
}
GrSimpleTextureEffect(GrTexture* texture,
@@ -85,10 +71,6 @@ private:
const GrTextureParams& params,
CoordsType coordsType)
: GrSingleTextureEffect(texture, matrix, params, coordsType) {
- if (kCustom_CoordsType == coordsType) {
- SkASSERT(matrix.isIdentity());
- this->addVertexAttrib(kVec2f_GrSLType);
- }
}
virtual bool onIsEqual(const GrEffect& other) const SK_OVERRIDE {
« no previous file with comments | « src/gpu/effects/GrCustomCoordsTextureEffect.cpp ('k') | src/gpu/effects/GrSimpleTextureEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698