aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Salomon <bsalomon@google.com>2018-01-30 15:43:49 -0500
committerSkia Commit-Bot <skia-commit-bot@chromium.org>2018-01-30 21:08:50 +0000
commit57b0430e19f3c8c2ebda4d8b705bc339af00e0fb (patch)
treeca8688d829b33e7d3d3bb9c8c1d609d829ccede8 /src
parentf650ad99780ad04ac59dff93009a25ba50548f7e (diff)
downloadskqp-57b0430e19f3c8c2ebda4d8b705bc339af00e0fb.tar.gz
Fix mock tex rt gpu mem size
Change-Id: Ieeab32d3eb8fdbb16c004537f2d50956d6ec74d3 Reviewed-on: https://skia-review.googlesource.com/102022 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/gpu/mock/GrMockTexture.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gpu/mock/GrMockTexture.h b/src/gpu/mock/GrMockTexture.h
index 0be1da1f4c..9b6501a3c4 100644
--- a/src/gpu/mock/GrMockTexture.h
+++ b/src/gpu/mock/GrMockTexture.h
@@ -90,8 +90,10 @@ private:
}
size_t onGpuMemorySize() const override {
+ // The plus 1 is to account for the resolve texture.
+ int numColorSamples = this->numColorSamples() + 1;
return GrSurface::ComputeSize(this->config(), this->width(), this->height(),
- this->numStencilSamples(),
+ numColorSamples,
this->texturePriv().mipMapped());
}