aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTextureRenderTargetProxy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/GrTextureRenderTargetProxy.cpp')
-rw-r--r--src/gpu/GrTextureRenderTargetProxy.cpp6
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(),