diff options
author | Greg Daniel <egdaniel@google.com> | 2017-10-12 11:23:36 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-10-12 16:12:42 +0000 |
commit | 0fc4d2d269c0aff1eadf57da2e571d0d54c38f5a (patch) | |
tree | daab2c8050304d504d014c5c93732d738c1f651b /src/gpu/GrTexturePriv.h | |
parent | a8c63075260337277d3ed405e97ba5ff89af3679 (diff) |
Use enum to track MipMapsStatus throughout Texture creation
Bug: skia:
Change-Id: I1de1105d74b45f7b02ff52e6b8333801d98ef1ce
Reviewed-on: https://skia-review.googlesource.com/58501
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrTexturePriv.h')
-rw-r--r-- | src/gpu/GrTexturePriv.h | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/gpu/GrTexturePriv.h b/src/gpu/GrTexturePriv.h index 3986c96746..31d097edbc 100644 --- a/src/gpu/GrTexturePriv.h +++ b/src/gpu/GrTexturePriv.h @@ -17,22 +17,20 @@ implemented privately in GrTexture with a inline public method here). */ class GrTexturePriv { public: - void dirtyMipMaps(bool mipMapsDirty) { - fTexture->dirtyMipMaps(mipMapsDirty); + void markMipMapsDirty() { + fTexture->markMipMapsDirty(); } - bool mipMapsAreDirty() const { - return GrTexture::kClean_MipMapsStatus != fTexture->fMipMapsStatus; + void markMipMapsClean() { + fTexture->markMipMapsClean(); } - bool hasMipMaps() const { - return GrTexture::kNotAllocated_MipMapsStatus != fTexture->fMipMapsStatus; + bool mipMapsAreDirty() const { + return GrMipMapsStatus::kValid != fTexture->fMipMapsStatus; } - // Once we no longer support allocating mip levels after creation, we can also require that mips - // have been allocated to the valid check. - bool mipMapsAreValid() const { - return GrTexture::kInvalid_MipMapsStatus != fTexture->fMipMapsStatus; + bool hasMipMaps() const { + return GrMipMapsStatus::kNotAllocated != fTexture->fMipMapsStatus; } void setMaxMipMapLevel(int maxMipMapLevel) const { |