aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTexturePriv.h
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2017-10-09 15:06:20 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-10 16:45:43 +0000
commit834f12076f703c114173486de6470412d92f6506 (patch)
tree0cdbc645742e740f3934a96f2cb8b80e6fb62c6d /src/gpu/GrTexturePriv.h
parentc5b94988915920ed359eecec34d4fbd6bdc0a3fd (diff)
Set correct mip map status on GrTexture since we no longer require all mip data
Bug: skia: Change-Id: I5074028f307187eef3201523cbd1ddc7d9bf9013 Reviewed-on: https://skia-review.googlesource.com/54102 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrTexturePriv.h')
-rw-r--r--src/gpu/GrTexturePriv.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gpu/GrTexturePriv.h b/src/gpu/GrTexturePriv.h
index a470b3bee6..3986c96746 100644
--- a/src/gpu/GrTexturePriv.h
+++ b/src/gpu/GrTexturePriv.h
@@ -22,13 +22,19 @@ public:
}
bool mipMapsAreDirty() const {
- return GrTexture::kValid_MipMapsStatus != fTexture->fMipMapsStatus;
+ return GrTexture::kClean_MipMapsStatus != fTexture->fMipMapsStatus;
}
bool hasMipMaps() const {
return GrTexture::kNotAllocated_MipMapsStatus != 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;
+ }
+
void setMaxMipMapLevel(int maxMipMapLevel) const {
fTexture->fMaxMipMapLevel = maxMipMapLevel;
}