diff options
Diffstat (limited to 'src/gpu/mock/GrMockTexture.h')
-rw-r--r-- | src/gpu/mock/GrMockTexture.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gpu/mock/GrMockTexture.h b/src/gpu/mock/GrMockTexture.h index 9b6501a3c4..b5cc4a27c0 100644 --- a/src/gpu/mock/GrMockTexture.h +++ b/src/gpu/mock/GrMockTexture.h @@ -90,8 +90,11 @@ private: } size_t onGpuMemorySize() const override { - // The plus 1 is to account for the resolve texture. - int numColorSamples = this->numColorSamples() + 1; + int numColorSamples = this->numColorSamples(); + if (numColorSamples > 1) { + // Add one to account for the resolve buffer. + ++numColorSamples; + } return GrSurface::ComputeSize(this->config(), this->width(), this->height(), numColorSamples, this->texturePriv().mipMapped()); |