| Index: include/gpu/GrTextureAccess.h
|
| diff --git a/include/gpu/GrTextureAccess.h b/include/gpu/GrTextureAccess.h
|
| index 237485a9e2798072c9339bb227477fb86181bbe2..047a86636eac35d9eb2ef12b9967bae4cac7b65e 100644
|
| --- a/include/gpu/GrTextureAccess.h
|
| +++ b/include/gpu/GrTextureAccess.h
|
| @@ -33,6 +33,9 @@ public:
|
| GrShaderFlags visibility = kFragment_GrShaderFlag,
|
| GrSLPrecision = kDefault_GrSLPrecision);
|
|
|
| + // This constructor is only for textures that do not support texture params.
|
| + explicit GrTextureAccess(GrTexture*, GrShaderFlags visibility, GrSLPrecision);
|
| +
|
| void reset(GrTexture*, const GrTextureParams&,
|
| GrShaderFlags visibility = kFragment_GrShaderFlag,
|
| GrSLPrecision = kDefault_GrSLPrecision);
|
| @@ -42,6 +45,9 @@ public:
|
| GrShaderFlags visibility = kFragment_GrShaderFlag,
|
| GrSLPrecision = kDefault_GrSLPrecision);
|
|
|
| + // This version is only for textures that do not support texture params.
|
| + void reset(GrTexture*, GrShaderFlags visibility, GrSLPrecision);
|
| +
|
| bool operator==(const GrTextureAccess& that) const {
|
| return this->getTexture() == that.getTexture() &&
|
| fParams == that.fParams &&
|
| @@ -60,7 +66,10 @@ public:
|
| */
|
| const GrGpuResourceRef* getProgramTexture() const { return &fTexture; }
|
|
|
| - const GrTextureParams& getParams() const { return fParams; }
|
| + const GrTextureParams& getParams() const {
|
| + SkASSERT(this->getTexture()->supportsTextureParams());
|
| + return fParams;
|
| + }
|
|
|
| private:
|
|
|
|
|