aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTextureProxy.cpp
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2017-10-24 09:17:00 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-24 13:33:51 +0000
commit027815fb7815d960a494d1eee38cf67da9b415cb (patch)
treefa9cac2aab84c516ddde7c0d000f7275771fe4e3 /src/gpu/GrTextureProxy.cpp
parent1ca6c51dd069cab8feef70fbf260bed8dc89f8da (diff)
Respect if texture proxy will have mips or not when computing size
Bug: skia: Change-Id: I47239ae68c103f29a8c8c2a2a5d8940c2c1d95fc Reviewed-on: https://skia-review.googlesource.com/63001 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrTextureProxy.cpp')
-rw-r--r--src/gpu/GrTextureProxy.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/gpu/GrTextureProxy.cpp b/src/gpu/GrTextureProxy.cpp
index 4617285b1c..9afa63f374 100644
--- a/src/gpu/GrTextureProxy.cpp
+++ b/src/gpu/GrTextureProxy.cpp
@@ -109,9 +109,7 @@ GrSamplerState::Filter GrTextureProxy::highestFilterMode() const {
}
size_t GrTextureProxy::onUninstantiatedGpuMemorySize() const {
- // TODO: add tracking of mipmap state to improve the estimate. We track whether we are created
- // with mip maps but not whether a texture read from the proxy will lazily generate mip maps.
- return GrSurface::ComputeSize(fConfig, fWidth, fHeight, 1, GrMipMapped::kYes,
+ return GrSurface::ComputeSize(fConfig, fWidth, fHeight, 1, this->mipMapped(),
SkBackingFit::kApprox == fFit);
}