| Index: include/gpu/GrTextureAccess.h
|
| diff --git a/include/gpu/GrTextureAccess.h b/include/gpu/GrTextureAccess.h
|
| index 1b5de0ce99cc1f4e162820c03df288bce6f0f939..cf8be9a319a2a1c2dd328ed5671b0021c526a58e 100644
|
| --- a/include/gpu/GrTextureAccess.h
|
| +++ b/include/gpu/GrTextureAccess.h
|
| @@ -8,6 +8,7 @@
|
| #ifndef GrTextureAccess_DEFINED
|
| #define GrTextureAccess_DEFINED
|
|
|
| +#include "GrColorSpaceXform.h"
|
| #include "GrGpuResourceRef.h"
|
| #include "GrTexture.h"
|
| #include "GrTextureParams.h"
|
| @@ -25,16 +26,16 @@ public:
|
| */
|
| GrTextureAccess();
|
|
|
| - GrTextureAccess(GrTexture*, const GrTextureParams&);
|
| + GrTextureAccess(GrTexture*, sk_sp<GrColorSpaceXform> colorSpaceXform, const GrTextureParams&);
|
|
|
| - explicit GrTextureAccess(GrTexture*,
|
| + explicit GrTextureAccess(GrTexture*, sk_sp<GrColorSpaceXform> colorSpaceXform,
|
| GrTextureParams::FilterMode = GrTextureParams::kNone_FilterMode,
|
| SkShader::TileMode tileXAndY = SkShader::kClamp_TileMode,
|
| GrShaderFlags visibility = kFragment_GrShaderFlag);
|
|
|
| - void reset(GrTexture*, const GrTextureParams&,
|
| + void reset(GrTexture*, sk_sp<GrColorSpaceXform> colorSpaceXform, const GrTextureParams&,
|
| GrShaderFlags visibility = kFragment_GrShaderFlag);
|
| - void reset(GrTexture*,
|
| + void reset(GrTexture*, sk_sp<GrColorSpaceXform> colorSpaceXform,
|
| GrTextureParams::FilterMode = GrTextureParams::kNone_FilterMode,
|
| SkShader::TileMode tileXAndY = SkShader::kClamp_TileMode,
|
| GrShaderFlags visibility = kFragment_GrShaderFlag);
|
| @@ -42,13 +43,15 @@ public:
|
| bool operator==(const GrTextureAccess& that) const {
|
| return this->getTexture() == that.getTexture() &&
|
| fParams == that.fParams &&
|
| - fVisibility == that.fVisibility;
|
| + fVisibility == that.fVisibility &&
|
| + fColorSpaceXform == that.fColorSpaceXform;
|
| }
|
|
|
| bool operator!=(const GrTextureAccess& other) const { return !(*this == other); }
|
|
|
| GrTexture* getTexture() const { return fTexture.get(); }
|
| GrShaderFlags getVisibility() const { return fVisibility; }
|
| + GrColorSpaceXform* getColorSpaceXform() const { return fColorSpaceXform.get(); }
|
|
|
| /**
|
| * For internal use by GrProcessor.
|
| @@ -64,6 +67,7 @@ private:
|
| ProgramTexture fTexture;
|
| GrTextureParams fParams;
|
| GrShaderFlags fVisibility;
|
| + sk_sp<GrColorSpaceXform> fColorSpaceXform;
|
|
|
| typedef SkNoncopyable INHERITED;
|
| };
|
|
|