From 34e5e1b387f5c4b4eb49a7b2d083e7aa1b477beb Mon Sep 17 00:00:00 2001 From: Mike Klein Date: Wed, 12 Sep 2018 16:05:38 -0400 Subject: [PATCH] switch Skia to explicit big-endian 16-bit skcms type Change-Id: I1f3fd1d267631b2360da0054ba76b3aaffcec01b Reviewed-on: https://skia-review.googlesource.com/154122 Reviewed-by: Brian Osman Commit-Queue: Mike Klein --- src/codec/SkPngCodec.cpp | 4 ++-- src/core/SkColorSpaceXform.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/codec/SkPngCodec.cpp b/src/codec/SkPngCodec.cpp index c3c6f6c277..0e7cd2b772 100644 --- a/src/codec/SkPngCodec.cpp +++ b/src/codec/SkPngCodec.cpp @@ -452,9 +452,9 @@ static skcms_PixelFormat png_select_xform_format(const SkEncodedInfo& info) { // We use kRGB and kRGBA formats because color PNGs are always RGB or RGBA. if (16 == info.bitsPerComponent()) { if (SkEncodedInfo::kRGBA_Color == info.color()) { - return skcms_PixelFormat_RGBA_16161616; + return skcms_PixelFormat_RGBA_16161616BE; } else if (SkEncodedInfo::kRGB_Color == info.color()) { - return skcms_PixelFormat_RGB_161616; + return skcms_PixelFormat_RGB_161616BE; } } else if (SkEncodedInfo::kGray_Color == info.color()) { return skcms_PixelFormat_G_8; diff --git a/src/core/SkColorSpaceXform.cpp b/src/core/SkColorSpaceXform.cpp index 8596abf679..4781e902bb 100644 --- a/src/core/SkColorSpaceXform.cpp +++ b/src/core/SkColorSpaceXform.cpp @@ -49,9 +49,9 @@ static skcms_PixelFormat get_skcms_format(SkColorSpaceXform::ColorFormat fmt) { case SkColorSpaceXform::kBGRA_8888_ColorFormat: return skcms_PixelFormat_BGRA_8888; case SkColorSpaceXform::kRGB_U16_BE_ColorFormat: - return skcms_PixelFormat_RGB_161616; + return skcms_PixelFormat_RGB_161616BE; case SkColorSpaceXform::kRGBA_U16_BE_ColorFormat: - return skcms_PixelFormat_RGBA_16161616; + return skcms_PixelFormat_RGBA_16161616BE; case SkColorSpaceXform::kRGBA_F16_ColorFormat: return skcms_PixelFormat_RGBA_hhhh; case SkColorSpaceXform::kRGBA_F32_ColorFormat: