Differential D22184 Diff 64134 www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_image-decoders_webp_webp__image__decoder.cc
Changeset View
Changeset View
Standalone View
Standalone View
www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_blink_renderer_platform_image-decoders_webp_webp__image__decoder.cc
- This file was added.
Property | Old Value | New Value |
---|---|---|
fbsd:nokeywords | null | yes \ No newline at end of property |
svn:eol-style | null | native \ No newline at end of property |
svn:mime-type | null | text/plain \ No newline at end of property |
--- src/3rdparty/chromium/third_party/blink/renderer/platform/image-decoders/webp/webp_image_decoder.cc.orig 2019-05-23 12:39:34 UTC | |||||
+++ src/3rdparty/chromium/third_party/blink/renderer/platform/image-decoders/webp/webp_image_decoder.cc | |||||
@@ -32,18 +32,20 @@ | |||||
#include "third_party/blink/renderer/platform/histogram.h" | |||||
#include "third_party/skia/include/core/SkData.h" | |||||
-#if defined(ARCH_CPU_BIG_ENDIAN) | |||||
-#error Blink assumes a little-endian target. | |||||
-#endif | |||||
- | |||||
-#if SK_B32_SHIFT // Output little-endian RGBA pixels (Android). | |||||
+#if SK_PMCOLOR_BYTE_ORDER(R, G, B, A) | |||||
inline WEBP_CSP_MODE outputMode(bool hasAlpha) { | |||||
return hasAlpha ? MODE_rgbA : MODE_RGBA; | |||||
} | |||||
-#else // Output little-endian BGRA pixels. | |||||
+#elif SK_PMCOLOR_BYTE_ORDER(B, G, R, A) | |||||
inline WEBP_CSP_MODE outputMode(bool hasAlpha) { | |||||
return hasAlpha ? MODE_bgrA : MODE_BGRA; | |||||
} | |||||
+#elif SK_PMCOLOR_BYTE_ORDER(A, R, G, B) | |||||
+inline WEBP_CSP_MODE outputMode(bool hasAlpha) { | |||||
+ return hasAlpha ? MODE_Argb : MODE_ARGB; | |||||
+} | |||||
+#else | |||||
+#error Component order not supported by libwebp | |||||
#endif | |||||
namespace { |