diff options
author | Greg Daniel <egdaniel@google.com> | 2018-02-15 13:06:26 -0500 |
---|---|---|
committer | Greg Daniel <egdaniel@google.com> | 2018-02-15 20:13:32 +0000 |
commit | f6f7b67ac230b14a725fbdabe951c70ea5b4428f (patch) | |
tree | a75cefe0e22e69aeaa9a862714818d4684afddc3 /src/gpu/GrTextureRenderTargetProxy.cpp | |
parent | 602836138e02935885c77f9dd93dcb51a3ec9a64 (diff) |
When creating emptyp MipMap proxies, don't instantiate them immediately. Attempt 3
original: https://skia-review.googlesource.com/106966
Bug: skia:
Change-Id: I779985cef2d3c4f36a0129d8ecedd12e510bec7e
Reviewed-on: https://skia-review.googlesource.com/107781
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/GrTextureRenderTargetProxy.cpp')
-rw-r--r-- | src/gpu/GrTextureRenderTargetProxy.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gpu/GrTextureRenderTargetProxy.cpp b/src/gpu/GrTextureRenderTargetProxy.cpp index 2d5dbeee9f..50077c4c0f 100644 --- a/src/gpu/GrTextureRenderTargetProxy.cpp +++ b/src/gpu/GrTextureRenderTargetProxy.cpp @@ -19,12 +19,13 @@ // GrRenderTargetProxy) so its constructor must be explicitly called. GrTextureRenderTargetProxy::GrTextureRenderTargetProxy(const GrCaps& caps, const GrSurfaceDesc& desc, + GrMipMapped mipMapped, SkBackingFit fit, SkBudgeted budgeted, uint32_t flags) : GrSurfaceProxy(desc, fit, budgeted, flags) // for now textures w/ data are always wrapped - , GrTextureProxy(desc, fit, budgeted, nullptr, 0, flags) + , GrTextureProxy(desc, mipMapped, fit, budgeted, nullptr, 0, flags) , GrRenderTargetProxy(caps, desc, fit, budgeted, flags) { } @@ -59,7 +60,7 @@ size_t GrTextureRenderTargetProxy::onUninstantiatedGpuMemorySize() const { int colorSamplesPerPixel = this->numColorSamples(); if (colorSamplesPerPixel > 1) { // Add one to account for the resolve buffer. - ++colorSamplesPerPixel += 1; + ++colorSamplesPerPixel; } // TODO: do we have enough information to improve this worst case estimate? |