diff options
Diffstat (limited to 'src/gpu')
-rw-r--r-- | src/gpu/gl/GrGLCaps.cpp | 4 | ||||
-rw-r--r-- | src/gpu/vk/GrVkCaps.cpp | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp index 05e3268dc9..86c8f92b0d 100644 --- a/src/gpu/gl/GrGLCaps.cpp +++ b/src/gpu/gl/GrGLCaps.cpp @@ -2392,11 +2392,15 @@ bool GrGLCaps::onValidateBackendTexture(GrBackendTexture* tex, SkColorType ct) c case kRGBA_8888_SkColorType: if (GR_GL_RGBA8 == format) { tex->fConfig = kRGBA_8888_GrPixelConfig; + } else if (GR_GL_SRGB8_ALPHA8 == format) { + tex->fConfig = kSRGBA_8888_GrPixelConfig; } break; case kBGRA_8888_SkColorType: if (GR_GL_BGRA8 == format) { tex->fConfig = kBGRA_8888_GrPixelConfig; + } else if (GR_GL_SRGB8_ALPHA8 == format) { + tex->fConfig = kSBGRA_8888_GrPixelConfig; } break; case kGray_8_SkColorType: 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: |