aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2017-11-13 11:05:52 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-11-13 20:39:51 +0000
commit5254ccc1815e1b1bfa066a1ce193ddfdfcf16a55 (patch)
treef5a817d95aea258778fe90c09b56e0f0acf4a157 /src
parent40ef836d9405c60cd1b1a424a799323f7df42fef (diff)
Move pixel config getter to private in GrBackendSurface
We eventually want to remove pixel config from GrBackendSurface so this helps to insure that clients don't rely on it. Bug: skia: Change-Id: I6b8435d12347fab62c0f9032addea1211aa703ca Reviewed-on: https://skia-review.googlesource.com/70642 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/gpu/vk/GrVkGpu.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp
index 198a00ed8e..a87c344d9a 100644
--- a/src/gpu/vk/GrVkGpu.cpp
+++ b/src/gpu/vk/GrVkGpu.cpp
@@ -888,7 +888,8 @@ bool GrVkGpu::updateBuffer(GrVkBuffer* buffer, const void* src,
////////////////////////////////////////////////////////////////////////////////
-static bool check_backend_texture(const GrBackendTexture& backendTex) {
+static bool check_backend_texture(const GrBackendTexture& backendTex,
+ GrPixelConfig config) {
const GrVkImageInfo* info = backendTex.getVkImageInfo();
if (!info) {
return false;
@@ -898,13 +899,13 @@ static bool check_backend_texture(const GrBackendTexture& backendTex) {
return false;
}
- SkASSERT(backendTex.config() == GrVkFormatToPixelConfig(info->fFormat));
+ SkASSERT(config == GrVkFormatToPixelConfig(info->fFormat));
return true;
}
sk_sp<GrTexture> GrVkGpu::onWrapBackendTexture(const GrBackendTexture& backendTex,
GrWrapOwnership ownership) {
- if (!check_backend_texture(backendTex)) {
+ if (!check_backend_texture(backendTex, backendTex.config())) {
return nullptr;
}
@@ -922,7 +923,7 @@ sk_sp<GrTexture> GrVkGpu::onWrapBackendTexture(const GrBackendTexture& backendTe
sk_sp<GrTexture> GrVkGpu::onWrapRenderableBackendTexture(const GrBackendTexture& backendTex,
int sampleCnt,
GrWrapOwnership ownership) {
- if (!check_backend_texture(backendTex)) {
+ if (!check_backend_texture(backendTex, backendTex.config())) {
return nullptr;
}