diff options
author | brianosman <brianosman@google.com> | 2016-06-13 07:59:48 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-13 07:59:48 -0700 |
commit | fe19987e5499650e8637a8d109f19b8156601660 (patch) | |
tree | b1ac8ff2e2b2ef8798f3db5f0f5b97a440f16cf3 /src/gpu/GrTexturePriv.h | |
parent | 25d57db23445b5602d968fecf015fa8c36246e4a (diff) |
Better (?) interface for controlling sRGB-ness of mipmaps on GrTexture
Switch to new SkSourceGammaTreatment type. Move to a separate setter,
rather than an optional argument to dirty. Set the flag correctly after
uploading CPU-built mips.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2058143002
Review-Url: https://codereview.chromium.org/2058143002
Diffstat (limited to 'src/gpu/GrTexturePriv.h')
-rw-r--r-- | src/gpu/GrTexturePriv.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gpu/GrTexturePriv.h b/src/gpu/GrTexturePriv.h index 762890fcc0..c4e6538d16 100644 --- a/src/gpu/GrTexturePriv.h +++ b/src/gpu/GrTexturePriv.h @@ -29,8 +29,8 @@ public: return 0 != (fTexture->fDesc.fFlags & flags); } - void dirtyMipMaps(bool mipMapsDirty, bool sRGBCorrect = false) { - fTexture->dirtyMipMaps(mipMapsDirty, sRGBCorrect); + void dirtyMipMaps(bool mipMapsDirty) { + fTexture->dirtyMipMaps(mipMapsDirty); } bool mipMapsAreDirty() const { @@ -49,9 +49,10 @@ public: return fTexture->fMaxMipMapLevel; } - bool mipMapsAreSRGBCorrect() const { - return fTexture->fMipMapsAreSRGBCorrect; + void setGammaTreatment(SkSourceGammaTreatment gammaTreatment) const { + fTexture->fGammaTreatment = gammaTreatment; } + SkSourceGammaTreatment gammaTreatment() const { return fTexture->fGammaTreatment; } static void ComputeScratchKey(const GrSurfaceDesc&, GrScratchKey*); |