diff options
author | Robert Phillips <robertphillips@google.com> | 2017-06-13 12:44:56 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-06-13 17:21:41 +0000 |
commit | 646e4293f06d9de6d44dbfa3c32cdc15a6f5906e (patch) | |
tree | 282acbcd4dc4204d06ed7d61e1d9884dbd6dd3f1 /src/gpu/vk | |
parent | 1791a064f1c1256cf29c69a5eef88de66ee6e794 (diff) |
Retract GrTexture*.h & GrRenderTarget*.h from other headers
This does push some additional work (& includes) into the .cpp files.
Change-Id: I27c847e371802270d13594dcc22aae44039990bb
Reviewed-on: https://skia-review.googlesource.com/19660
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/vk')
-rw-r--r-- | src/gpu/vk/GrVkResourceProvider.h | 1 | ||||
-rw-r--r-- | src/gpu/vk/GrVkTexture.h | 1 | ||||
-rw-r--r-- | src/gpu/vk/GrVkTextureRenderTarget.cpp | 8 | ||||
-rw-r--r-- | src/gpu/vk/GrVkTextureRenderTarget.h | 10 |
4 files changed, 9 insertions, 11 deletions
diff --git a/src/gpu/vk/GrVkResourceProvider.h b/src/gpu/vk/GrVkResourceProvider.h index 902dece073..5940681e8c 100644 --- a/src/gpu/vk/GrVkResourceProvider.h +++ b/src/gpu/vk/GrVkResourceProvider.h @@ -8,7 +8,6 @@ #ifndef GrVkResourceProvider_DEFINED #define GrVkResourceProvider_DEFINED -#include "GrGpu.h" #include "GrResourceHandle.h" #include "GrVkDescriptorPool.h" #include "GrVkDescriptorSetManager.h" diff --git a/src/gpu/vk/GrVkTexture.h b/src/gpu/vk/GrVkTexture.h index fc3ffdff2e..239f6b350d 100644 --- a/src/gpu/vk/GrVkTexture.h +++ b/src/gpu/vk/GrVkTexture.h @@ -8,7 +8,6 @@ #ifndef GrVkTexture_DEFINED #define GrVkTexture_DEFINED -#include "GrGpu.h" #include "GrTexture.h" #include "GrVkImage.h" diff --git a/src/gpu/vk/GrVkTextureRenderTarget.cpp b/src/gpu/vk/GrVkTextureRenderTarget.cpp index 1b72c1f94b..a77722832d 100644 --- a/src/gpu/vk/GrVkTextureRenderTarget.cpp +++ b/src/gpu/vk/GrVkTextureRenderTarget.cpp @@ -8,6 +8,7 @@ #include "GrVkTextureRenderTarget.h" #include "GrRenderTargetPriv.h" +#include "GrTexturePriv.h" #include "GrVkGpu.h" #include "GrVkImageView.h" #include "GrVkUtil.h" @@ -186,3 +187,10 @@ bool GrVkTextureRenderTarget::updateForMipmap(GrVkGpu* gpu, const GrVkImageInfo& return true; } +size_t GrVkTextureRenderTarget::onGpuMemorySize() const { + // The plus 1 is to account for the resolve texture. + int numColorSamples = this->numColorSamples() + 1; + return GrSurface::ComputeSize(this->config(), this->width(), this->height(), + numColorSamples, // TODO: this still correct? + this->texturePriv().hasMipMaps()); +} diff --git a/src/gpu/vk/GrVkTextureRenderTarget.h b/src/gpu/vk/GrVkTextureRenderTarget.h index 7639dc06ac..7eab1058d6 100644 --- a/src/gpu/vk/GrVkTextureRenderTarget.h +++ b/src/gpu/vk/GrVkTextureRenderTarget.h @@ -13,8 +13,6 @@ #include "GrVkRenderTarget.h" #include "GrVkGpu.h" -#include "GrTexturePriv.h" - #ifdef SK_BUILD_FOR_WIN // Windows gives bogus warnings about inheriting asTexture/asRenderTarget via dominance. #pragma warning(push) @@ -113,13 +111,7 @@ private: GrVkImage::Wrapped wrapped); // 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. - int numColorSamples = this->numColorSamples() + 1; - return GrSurface::ComputeSize(this->config(), this->width(), this->height(), - numColorSamples, // TODO: this still correct? - this->texturePriv().hasMipMaps()); - } + size_t onGpuMemorySize() const override; }; #endif |