diff options
Diffstat (limited to 'src/gpu/GrTexture.cpp')
-rw-r--r-- | src/gpu/GrTexture.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gpu/GrTexture.cpp b/src/gpu/GrTexture.cpp index 0051a225ef..cd3e7055ab 100644 --- a/src/gpu/GrTexture.cpp +++ b/src/gpu/GrTexture.cpp @@ -25,8 +25,14 @@ void GrTexture::markMipMapsDirty() { } void GrTexture::markMipMapsClean() { - SkASSERT(GrMipMapsStatus::kNotAllocated != fMipMapsStatus); + const bool sizeChanged = GrMipMapsStatus::kNotAllocated == fMipMapsStatus; fMipMapsStatus = GrMipMapsStatus::kValid; + if (sizeChanged) { + // This must not be called until after changing fMipMapsStatus. + this->didChangeGpuMemorySize(); + // TODO(http://skbug.com/4548) - The desc and scratch key should be + // updated to reflect the newly-allocated mipmaps. + } } size_t GrTexture::onGpuMemorySize() const { |