aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/mtl
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2018-03-02 11:01:10 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-03-02 18:19:50 +0000
commit10fc6fddf24878f4f34e75c1bcc11e4499edfcc0 (patch)
treeb3bd1d9263dbcf53c688d412e1e719fa97674b23 /src/gpu/mtl
parentfde6fa0903b3cedc463c1a753268ffcf30ad7a38 (diff)
Revert "Revert "Add 1010102 support to Ganesh""
This reverts commit ded47a50143470d1acdafa03e878cc7da5608038. Bug: skia: Change-Id: I7d7552e6ccc8591cae91426407ab13b628b93b68 Reviewed-on: https://skia-review.googlesource.com/111760 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu/mtl')
-rw-r--r--src/gpu/mtl/GrMtlUtil.mm7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gpu/mtl/GrMtlUtil.mm b/src/gpu/mtl/GrMtlUtil.mm
index a188afe4ad..383cc98264 100644
--- a/src/gpu/mtl/GrMtlUtil.mm
+++ b/src/gpu/mtl/GrMtlUtil.mm
@@ -30,9 +30,12 @@ bool GrPixelConfigToMTLFormat(GrPixelConfig config, MTLPixelFormat* format) {
case kSBGRA_8888_GrPixelConfig:
*format = MTLPixelFormatBGRA8Unorm_sRGB;
return true;
+ case kRGBA_1010102_GrPixelConfig:
+ *format = MTLPixelFormatRGB10A2Unorm;
+ return true;
case kRGB_565_GrPixelConfig:
#ifdef SK_BUILD_FOR_IOS
- *format = MTLPixelFormatR5G6B5Unorm;
+ *format = MTLPixelFormatB5G6R5Unorm;
return true;
#else
return false;
@@ -84,6 +87,8 @@ GrPixelConfig GrMTLFormatToPixelConfig(MTLPixelFormat format) {
return kSRGBA_8888_GrPixelConfig;
case MTLPixelFormatBGRA8Unorm_sRGB:
return kSBGRA_8888_GrPixelConfig;
+ case MTLPixelFormatRGB10A2Unorm:
+ return kRGBA_1010102_GrPixelConfig;
#ifdef SK_BUILD_FOR_IOS
case MTLPixelFormatB5G6R5Unorm:
return kRGB_565_GrPixelConfig;