aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/vk
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2017-12-18 14:49:04 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-12-18 21:21:26 +0000
commit7b219ac45d791a1f93f67cadc24d376468210031 (patch)
tree0f6ee229cf9c9c506dfc6a0a1e494f057e4e45e2 /src/gpu/vk
parentf5d8758f29390fd5c135df12bc8a5e196854eda2 (diff)
Add support for SRGB formats when validating backend formats and ColorTypes
Bug: skia: Change-Id: I4413e8e629528608d773d41c6a4a4306eff154c8 Reviewed-on: https://skia-review.googlesource.com/85045 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/vk')
-rw-r--r--src/gpu/vk/GrVkCaps.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gpu/vk/GrVkCaps.cpp b/src/gpu/vk/GrVkCaps.cpp
index 17253a0e04..e6a018b2ba 100644
--- a/src/gpu/vk/GrVkCaps.cpp
+++ b/src/gpu/vk/GrVkCaps.cpp
@@ -444,11 +444,15 @@ bool GrVkCaps::onValidateBackendTexture(GrBackendTexture* tex, SkColorType ct) c
case kRGBA_8888_SkColorType:
if (VK_FORMAT_R8G8B8A8_UNORM == format) {
tex->fConfig = kRGBA_8888_GrPixelConfig;
+ } else if (VK_FORMAT_R8G8B8A8_SRGB == format) {
+ tex->fConfig = kSRGBA_8888_GrPixelConfig;
}
break;
case kBGRA_8888_SkColorType:
if (VK_FORMAT_B8G8R8A8_UNORM == format) {
tex->fConfig = kBGRA_8888_GrPixelConfig;
+ } else if (VK_FORMAT_B8G8R8A8_SRGB == format) {
+ tex->fConfig = kSBGRA_8888_GrPixelConfig;
}
break;
case kGray_8_SkColorType: