diff options
Diffstat (limited to 'src/gpu/GrTextureRenderTargetProxy.cpp')
-rw-r--r-- | src/gpu/GrTextureRenderTargetProxy.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gpu/GrTextureRenderTargetProxy.cpp b/src/gpu/GrTextureRenderTargetProxy.cpp index da8e48307d..843524c062 100644 --- a/src/gpu/GrTextureRenderTargetProxy.cpp +++ b/src/gpu/GrTextureRenderTargetProxy.cpp @@ -53,7 +53,11 @@ GrTextureRenderTargetProxy::GrTextureRenderTargetProxy(sk_sp<GrSurface> surf, } size_t GrTextureRenderTargetProxy::onUninstantiatedGpuMemorySize() const { - int colorSamplesPerPixel = this->numColorSamples() + 1; + int colorSamplesPerPixel = this->numColorSamples(); + if (colorSamplesPerPixel > 1) { + // Add one to account for the resolve buffer. + ++colorSamplesPerPixel += 1; + } // TODO: do we have enough information to improve this worst case estimate? return GrSurface::ComputeSize(this->config(), this->width(), this->height(), |