Index: src/gpu/GrTextureAccess.cpp |
diff --git a/src/gpu/GrTextureAccess.cpp b/src/gpu/GrTextureAccess.cpp |
index a62a4ddce013debe081a9c59473d834c6a2c52e4..931d9399567f401b30eb7bb88310fc631402cb0d 100644 |
--- a/src/gpu/GrTextureAccess.cpp |
+++ b/src/gpu/GrTextureAccess.cpp |
@@ -23,11 +23,18 @@ GrTextureAccess::GrTextureAccess(GrTexture* texture, |
this->reset(texture, filterMode, tileXAndY, visibility, precision); |
} |
+GrTextureAccess::GrTextureAccess(GrTexture* texture, |
+ GrShaderFlags visibility, |
+ GrSLPrecision precision) { |
+ this->reset(texture, visibility, precision); |
+} |
+ |
void GrTextureAccess::reset(GrTexture* texture, |
const GrTextureParams& params, |
GrShaderFlags visibility, |
GrSLPrecision precision) { |
SkASSERT(texture); |
+ SkASSERT(texture->supportsTextureParams()); |
fTexture.set(SkRef(texture), kRead_GrIOType); |
fParams = params; |
fVisibility = visibility; |
@@ -40,8 +47,17 @@ void GrTextureAccess::reset(GrTexture* texture, |
GrShaderFlags visibility, |
GrSLPrecision precision) { |
SkASSERT(texture); |
+ SkASSERT(texture->supportsTextureParams()); |
fTexture.set(SkRef(texture), kRead_GrIOType); |
fParams.reset(tileXAndY, filterMode); |
fVisibility = visibility; |
fPrecision = precision; |
} |
+ |
+void GrTextureAccess::reset(GrTexture* texture, GrShaderFlags visibility, GrSLPrecision precision) { |
+ SkASSERT(texture); |
+ SkASSERT(!texture->supportsTextureParams()); |
+ fTexture.set(SkRef(texture), kRead_GrIOType); |
+ fVisibility = visibility; |
+ fPrecision = precision; |
+} |