diff options
-rw-r--r-- | src/gpu/GrTextureProxy.cpp | 4 | ||||
-rw-r--r-- | src/gpu/GrTextureRenderTargetProxy.cpp | 5 |
2 files changed, 2 insertions, 7 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); } diff --git a/src/gpu/GrTextureRenderTargetProxy.cpp b/src/gpu/GrTextureRenderTargetProxy.cpp index 7d4040e3f1..dd79bfefff 100644 --- a/src/gpu/GrTextureRenderTargetProxy.cpp +++ b/src/gpu/GrTextureRenderTargetProxy.cpp @@ -36,11 +36,8 @@ GrTextureRenderTargetProxy::GrTextureRenderTargetProxy(sk_sp<GrSurface> surf, size_t GrTextureRenderTargetProxy::onUninstantiatedGpuMemorySize() const { int colorSamplesPerPixel = this->numColorSamples() + 1; - // 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. - // TODO: do we have enough information to improve this worst case estimate? - return GrSurface::ComputeSize(fConfig, fWidth, fHeight, colorSamplesPerPixel, GrMipMapped::kYes, + return GrSurface::ComputeSize(fConfig, fWidth, fHeight, colorSamplesPerPixel, this->mipMapped(), SkBackingFit::kApprox == fFit); } |