diff options
author | 2017-05-17 13:49:59 -0400 | |
---|---|---|
committer | 2017-05-17 18:17:50 +0000 | |
commit | bb5711a5e4b9c83f0fc49f2d4ee19ca1e4592e14 (patch) | |
tree | e743c265e75a1dad32c1425bf3b9ed88abad2c52 /src/gpu/vk | |
parent | 9f1c403362d8de6038328c7238b6ac56be552324 (diff) |
Remove GrSurfaceDesc member from GrSurfaceProxy.
Stores the config, origin, and dimensions in GrSurfaceProxy, sample count in GrRenderTargetProxy, and "was constructed with mip maps" in GrTextureProxy.
Change-Id: Iee058674dce49107a991cca9d083cd33e3572809
Reviewed-on: https://skia-review.googlesource.com/17209
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/vk')
-rw-r--r-- | src/gpu/vk/GrVkRenderTarget.h | 4 | ||||
-rw-r--r-- | src/gpu/vk/GrVkTextureRenderTarget.h | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/gpu/vk/GrVkRenderTarget.h b/src/gpu/vk/GrVkRenderTarget.h index cf425fb0a2..272998e317 100644 --- a/src/gpu/vk/GrVkRenderTarget.h +++ b/src/gpu/vk/GrVkRenderTarget.h @@ -100,7 +100,9 @@ protected: size_t onGpuMemorySize() const override { // The plus 1 is to account for the resolve texture. // TODO: is this still correct? - return GrSurface::ComputeSize(fDesc, fDesc.fSampleCnt+1, false); + int numColorSamples = this->numColorSamples() + 1; + return GrSurface::ComputeSize(this->config(), this->width(), this->height(), + numColorSamples, false); } void createFramebuffer(GrVkGpu* gpu); diff --git a/src/gpu/vk/GrVkTextureRenderTarget.h b/src/gpu/vk/GrVkTextureRenderTarget.h index 2877a36265..03f9fdbbb1 100644 --- a/src/gpu/vk/GrVkTextureRenderTarget.h +++ b/src/gpu/vk/GrVkTextureRenderTarget.h @@ -115,7 +115,9 @@ private: // GrGLRenderTarget accounts for the texture's memory and any MSAA renderbuffer's memory. size_t onGpuMemorySize() const override { // The plus 1 is to account for the resolve texture. - return GrSurface::ComputeSize(fDesc, fDesc.fSampleCnt+1, // TODO: this still correct? + int numColorSamples = this->numColorSamples() + 1; + return GrSurface::ComputeSize(this->config(), this->width(), this->height(), + numColorSamples, // TODO: this still correct? this->texturePriv().hasMipMaps()); } }; |