diff options
author | Greg Daniel <egdaniel@google.com> | 2018-02-09 10:49:23 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-02-09 16:14:51 +0000 |
commit | 3b2ebbb2d49d41553ff17d64202e2046b1af1560 (patch) | |
tree | d8b617014c9bf9a0943031a9c97251cbb72bdd26 /src/gpu/GrTextureProxyPriv.h | |
parent | 1fabd51f585383b0f7b8f82c4489989e9379627b (diff) |
When querying mipmapped on proxies return targets state if possible
In the non-ddl world where we are still using lazy proxies, we may create
those proxies with no mipmaps, but when we instantiate them immediately we
end up getting a surface with mips. This allows future queries on that
proxy to take advatage of the fact that we actaully have mips.
For lazy ddl proxies, this makes it work in a world where we may decide to
uninstantiate the proxies and we continue to track the request mip level as
well as the actually one from instantiation.
Bug: skia:
Change-Id: I4824e74d5e2a2fdf860709c85469aa8cf74632d5
Reviewed-on: https://skia-review.googlesource.com/106121
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrTextureProxyPriv.h')
-rw-r--r-- | src/gpu/GrTextureProxyPriv.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gpu/GrTextureProxyPriv.h b/src/gpu/GrTextureProxyPriv.h index e961493179..3b68374d49 100644 --- a/src/gpu/GrTextureProxyPriv.h +++ b/src/gpu/GrTextureProxyPriv.h @@ -27,6 +27,9 @@ public: // Clears any deferred uploader object on the proxy. Used to free the CPU data after the // contents have been uploaded. void resetDeferredUploader(); + // Returns the GrMipMapped value of the proxy from creation time regardless of whether it has + // been instantiated or not. + GrMipMapped proxyMipMapped() const { return fTextureProxy->fMipMapped; } private: explicit GrTextureProxyPriv(GrTextureProxy* textureProxy) : fTextureProxy(textureProxy) {} |