Difference between revisions of "Porting/Chromium/BE"
Jump to navigation
Jump to search
JeremyRand (talk | contribs) (Category: Ports) |
|||
(31 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
+ | The repository of all required patches for ppc64 (big endian) is available here: https://github.com/zeldin/chromium_be. | ||
+ | |||
== Changes required to Chromium to work on big endian == | == Changes required to Chromium to work on big endian == | ||
* Skia | * Skia | ||
− | :- Chromium assumes that the pixel format, when viewed as a 32-bit word, is either ARGB or ABGR. However, third_party/skia/include/core/SkImageInfo.h contains a check that the pixel format, when viewed as four 8-bit bytes, is either BGRA or RGBA. Hence either this check needs to be relaxed (Maybe it is bogus in the first place? The comments talk about "native ARGB 32-bit", yet the test goes out of its way to test the ordering as bytes and not as 32-bit words), or Chromium needs to learn about a different pixel format. | + | :- <s>Chromium assumes that the pixel format, when viewed as a 32-bit word, is either ARGB or ABGR. However, third_party/skia/include/core/SkImageInfo.h contains a check that the pixel format, when viewed as four 8-bit bytes, is either BGRA or RGBA. Hence either this check needs to be relaxed (Maybe it is bogus in the first place? The comments talk about "native ARGB 32-bit", yet the test goes out of its way to test the ordering as bytes and not as 32-bit words), or Chromium needs to learn about a different pixel format.</s> Selected BGRA component order, which works in Skia and seems to be workable in Chromium as well. |
* Datapack | * Datapack | ||
** ui/base/resource/data_pack.cc | ** ui/base/resource/data_pack.cc | ||
*:- <s>Need to byteswap metadata on input (resource file format is specified to use LE)</s> Done | *:- <s>Need to byteswap metadata on input (resource file format is specified to use LE)</s> Done | ||
** chrome/browser/themes/browser_theme_pack.cc | ** chrome/browser/themes/browser_theme_pack.cc | ||
− | *:- "datapack assumes little endian" | + | *:- <s>"datapack assumes little endian"</s> Done |
+ | * Gfx | ||
+ | ** ui/gfx/codec/jpeg_codec.cc | ||
+ | *:- <s>Selection of out_color_space when format is FORMAT_SkBitmap needs to check component order of SkPMColor as bytes, not as shift</s> Done | ||
+ | ** ui/gfx/color_analysis.cc | ||
+ | *:- <s>Functions accessing SkColor format pixels as bytes need updating for big endian.</s> Done | ||
+ | ** ui/gfx/codec/png_codec.h and ui/gfx/codec/png_codec.cc | ||
+ | *:- <s>A new FORMAT_ARGB is needed for decoding so that color_analysis can decode into in-memory SkColor on big endian.</s> Done | ||
* Net | * Net | ||
** net/cert/crl_set.cc | ** net/cert/crl_set.cc | ||
− | *:- "assumes little endian" | + | *:- <s>"assumes little endian"</s> Done |
** components/safe_browsing/db/v4_rice.cc | ** components/safe_browsing/db/v4_rice.cc | ||
*:- <s>#error The code below assumes little-endianness.</s> Done | *:- <s>#error The code below assumes little-endianness.</s> Done | ||
* Media | * Media | ||
** media/ffmpeg/ffmpeg_common.cc and media/formats/mp4/box_definitions.cc | ** media/ffmpeg/ffmpeg_common.cc and media/formats/mp4/box_definitions.cc | ||
− | *:- #error The code below assumes little-endianness. | + | *:- <s>#error The code below assumes little-endianness.</s> Removed check |
** media/renderers/paint_canvas_video_renderer.cc | ** media/renderers/paint_canvas_video_renderer.cc | ||
− | *:- Depending on choice of Skia pixel format, a new LIBYUV mapping set may be needed (see also third_party/libyuv below). | + | *:- <s>Depending on choice of Skia pixel format, a new LIBYUV mapping set may be needed (see also third_party/libyuv below).</s> Adjusted check |
* I18N | * I18N | ||
** base/i18n/icu_util.cc | ** base/i18n/icu_util.cc | ||
Line 24: | Line 33: | ||
** sandbox/linux/system_headers/linux_seccomp.h | ** sandbox/linux/system_headers/linux_seccomp.h | ||
*:- <s>The definition of the big endian variant is incorrect (contains a bogus "__AUDIO_ARCH_BE"). Also, it would be better to define two different macros AUDIT_ARCH_PPC64 and AUDIT_ARCH_PPC64LE (because that is how it actually looks in <linux/audit.h>), and choose the correct one in sandbox/linux/bpf_dsl/seccomp_macros.h instead.</s> Done | *:- <s>The definition of the big endian variant is incorrect (contains a bogus "__AUDIO_ARCH_BE"). Also, it would be better to define two different macros AUDIT_ARCH_PPC64 and AUDIT_ARCH_PPC64LE (because that is how it actually looks in <linux/audit.h>), and choose the correct one in sandbox/linux/bpf_dsl/seccomp_macros.h instead.</s> Done | ||
+ | ** sandbox/linux/bpf_dsl/seccomp_macros.h | ||
+ | *:- <s>The definitions of the macros SECCOMP_IP_MSB_IDX, SECCOMP_IP_LSB_IDX, SECCOMP_ARG_MSB_IDX, and SECCOMP_ARG_LSB_IDX need to take endianness into account</s> Done | ||
* Partition allocator | * Partition allocator | ||
** base/allocator/partition_allocator/partition_freelist_entry.h | ** base/allocator/partition_allocator/partition_freelist_entry.h | ||
− | *:- A different pointer transformation function is used on BE compared to on LE. This is not an issue in itself, but it exposes a bug that NULL pointers are sometimes not transformed when they ought to be (the LE transformation function is unity for NULL). | + | *:- <s>A different pointer transformation function is used on BE compared to on LE. This is not an issue in itself, but it exposes a bug that NULL pointers are sometimes not transformed when they ought to be (the LE transformation function is unity for NULL).</s> Done |
* Pickle | * Pickle | ||
** base/pickle.cc | ** base/pickle.cc | ||
Line 36: | Line 47: | ||
** url/url_canon_host.cc | ** url/url_canon_host.cc | ||
*:- <s>Uses a reinterpret_cast to get an unsigned char pointer into an unsigned int, for no good reason.</s> Done | *:- <s>Uses a reinterpret_cast to get an unsigned char pointer into an unsigned int, for no good reason.</s> Done | ||
+ | * Aura | ||
+ | ** ui/aura/mus/os_exchange_data_provider_mus.cc | ||
+ | *:- <s>Outputs UTF-16 in native byte order (which is probably correct), but hardcodes an LE BOM.</s> Done | ||
* Unit tests | * Unit tests | ||
** base/memory/shared_memory_mapping_unittest.cc, base/metrics/bucket_ranges_unittest.cc, and base/strings/string_number_conversions_unittest.cc | ** base/memory/shared_memory_mapping_unittest.cc, base/metrics/bucket_ranges_unittest.cc, and base/strings/string_number_conversions_unittest.cc | ||
*:- <s>These unit tests expose endianness in one way or another and need to be adjusted to run correctly on BE</s> Done | *:- <s>These unit tests expose endianness in one way or another and need to be adjusted to run correctly on BE</s> Done | ||
+ | ** ui/gfx/skbitmap_operations_unittest.cc | ||
+ | *:- <s>The CreateHSLShiftedBitmapHueOnly test uses the wrong function to set SkPMColor values, which breaks on BE (and should break on Android as well..)</s> Done | ||
+ | ** skia/ext/image_operation_unittest.cc and ui/gfx/codec/png_codec_unittest.cc | ||
+ | *:- <s>There is code here which needs to convert between SkColor and SkPMColor (which can be different, even on LE) when accessing pixels directly.</s> Done | ||
+ | ** chrome/test/chromedriver/chrome_launcher.cc and chrome/test/chromedriver/util.cc | ||
+ | *:- <s>Missing byteswaps when parsing zip and crx headers</s> Done | ||
* third_party/skia | * third_party/skia | ||
** include/private/GrTypesPriv.h | ** include/private/GrTypesPriv.h | ||
− | *:- #error "Skia gpu currently assumes little endian" | + | *:- <s>#error "Skia gpu currently assumes little endian"</s> Removed check |
+ | ** src/core/SkPixmap.cpp | ||
+ | *:- <s>getColor() needs to use something other than SkSwizzle_BGRA_to_PMColor to convert SkPMColor to SkColor, because SkColor is defined by fixed 32-bit shifts, while "BGRA" is defined by 8-bit component order in memory.</s> Done | ||
+ | ** src/core/SkUnPreMultiplyPriv.h and src/images/SkImageEncoderFns.h | ||
+ | *:- <s>The scanline transformation functions need to take endianness into account since the pixel formats are defined by memory order, but the conversion functions use 32-bit loads and hardcoded shifts.</s> Done | ||
** src/opts/Sk4px_none.h | ** src/opts/Sk4px_none.h | ||
− | *:- Sk4px::alphas, Sk4px::zeroAlphas, Sk4px::zeroColors: "This method assumes little-endian." | + | *:- <s>Sk4px::alphas, Sk4px::zeroAlphas, Sk4px::zeroColors: "This method assumes little-endian."</s> Removed check |
** src/opts/SkXfermode_opts.h | ** src/opts/SkXfermode_opts.h | ||
− | *:- a_rgb assumes specific component order | + | *:- <s>a_rgb assumes specific component order</s> Removed check |
+ | ** src/opts/SkBlitRow_opts.h | ||
+ | *:- <s>The "portable" implementation of blit_row_s32a_opaque hardcodes alpha bit position</s> Done | ||
+ | ** src/opts/SkRasterPipeline_opts.h | ||
+ | *:- <s>Pixel load and store ops need to take endianness into account</s> Done | ||
** src/utils/SkJSON.cpp and src/utils/SkJSON.h | ** src/utils/SkJSON.cpp and src/utils/SkJSON.h | ||
*:- <s>Tagged value implementation needs to be adapted for BE</s> Done | *:- <s>Tagged value implementation needs to be adapted for BE</s> Done | ||
** src/codec/SkCodecPriv.h | ** src/codec/SkCodecPriv.h | ||
*:- <s>Missing include of "SkEndian.h"</s> Done | *:- <s>Missing include of "SkEndian.h"</s> Done | ||
+ | ** src/shaders/gradients/SkGradientShaderPriv.h | ||
+ | *:- <s>getLegacyColor needs fixing for BE</s> Done | ||
+ | ** third_party/skcsm/skcms.cc | ||
+ | *:- <s>The read_big_* functions byteswap the values read even on BE</s> Done <s>Also eval_curve does this.</s> Done | ||
+ | ** third_party/skcms/src/Transform_inl.h | ||
+ | *:- <s>Pixel load and store ops need to take endianness into account</s> Done | ||
* third_party/boringssl/src | * third_party/boringssl/src | ||
** include/openssl/base.h | ** include/openssl/base.h | ||
Line 79: | Line 113: | ||
*:- <s>Does contain BE support, but a variable rename refactoring is missing from the BE code</s> Done | *:- <s>Does contain BE support, but a variable rename refactoring is missing from the BE code</s> Done | ||
** renderer/platform/image-decoders/jpeg/jpeg_image_decoder.cc | ** renderer/platform/image-decoders/jpeg/jpeg_image_decoder.cc | ||
− | *:- #error Blink assumes a little-endian target. | + | *:- <s>#error Blink assumes a little-endian target.</s> Done |
** renderer/platform/image-decoders/webp/webp_image_decoder.cc | ** renderer/platform/image-decoders/webp/webp_image_decoder.cc | ||
− | *:- #error Blink assumes a little-endian target. | + | *:- <s>#error Blink assumes a little-endian target.</s> Done |
** renderer/platform/heap/asm/SaveRegisters_ppc64.S | ** renderer/platform/heap/asm/SaveRegisters_ppc64.S | ||
*:- <s>Needs to handle ELF ABI v1</s> Done | *:- <s>Needs to handle ELF ABI v1</s> Done | ||
+ | ** renderer/platform/image-decoders/bmp/bmp_image_reader.h | ||
+ | *:- <s>Needs to byteswap BMP header fields on BE.</s> Done | ||
+ | ** renderer/platform/graphics/graphics_context_test.cc | ||
+ | *:- <s>Should use SkGetPackedA32() instead of hardcoding >>24.</s> Done | ||
+ | *:- <s>Should use SkPackARGB32NoCheck() instead of hardcoding 32-bit pixel values.</s> Done | ||
+ | ** renderer/platform/graphics/gpu/webgl_image_conversion_test.cc | ||
+ | *:- <s>The BE version of a test vector has a misspelled variable name.</s> Done | ||
+ | ** renderer/platform/graphics/highcontrast/highcontrast_classifier.cc | ||
+ | *:- <s>The TensorFlow floating point parameters are initialized from a series of bytes. Should be initialized from floating point values instead to remove endianness (and floating point format) dependencies.</s> Done | ||
+ | * third_party/flatbuffers/src | ||
+ | ** include/flatbuffers/base.h | ||
+ | *:- <s>The ByteSwap code does not work on C++11 due to the default constructor of the unions getting deleted</s> Done | ||
+ | ** include/flatbuffers/minireflect.h | ||
+ | *:- <s>IterateValue dereferences reinterpret_cast:ed pointers into LE data</s> Done | ||
* third_party/perfetto | * third_party/perfetto | ||
− | ** | + | ** include/perfetto/base/utils.h |
− | *:- | + | *:- Page size hardcoded as 4096 |
+ | *:- <s>"AssumeLittleEndian" template asserts even though never instantiated</s> Done | ||
** src/protozero/message.cc | ** src/protozero/message.cc | ||
− | *:- float and double handling need adjusting for BE (according to comment) | + | *:- <s>float and double handling need adjusting for BE (according to comment)</s> Done |
** src/protozero/proto_decoder.cc | ** src/protozero/proto_decoder.cc | ||
*:- <s>Byteswap implementations missing</s> Done | *:- <s>Byteswap implementations missing</s> Done | ||
Line 96: | Line 145: | ||
* third_party/webrtc | * third_party/webrtc | ||
** common_audio/wav_file.cc | ** common_audio/wav_file.cc | ||
− | *:- WavReader::ReadSamples and WavWriter::WriteSamples need to byteswap the samples | + | *:- <s>WavReader::ReadSamples and WavWriter::WriteSamples need to byteswap the samples</s> Done |
** common_audio/wav_header.cc | ** common_audio/wav_header.cc | ||
*:- <s>Conversion functions missing</s> Done | *:- <s>Conversion functions missing</s> Done | ||
Line 106: | Line 155: | ||
* third_party/crc32c | * third_party/crc32c | ||
** BUILD.gn | ** BUILD.gn | ||
− | *:- Needs to define BYTE_ORDER_BIG_ENDIAN=1 on BE | + | *:- <s>Needs to define BYTE_ORDER_BIG_ENDIAN=1 on BE</s> Done |
* third_party/leveldatabase | * third_party/leveldatabase | ||
** port/port_chromium.h | ** port/port_chromium.h | ||
− | *:- Needs to set kLittleEndian depending on endianness | + | *:- <s>Needs to set kLittleEndian depending on endianness</s> Done |
* third_party/libvpx | * third_party/libvpx | ||
− | :- The build system should move VSX-specific sources into a separate source set, and set the cflags "-maltivec -mvsx" for it. In the original build system the cflags were set based on a glob of the source filename, but in Googles build system it has to be done manually. | + | :- <s>The build system should move VSX-specific sources into a separate source set, and set the cflags "-maltivec -mvsx" for it. In the original build system the cflags were set based on a glob of the source filename, but in Googles build system it has to be done manually.</s> Done |
* third_party/libyuv | * third_party/libyuv | ||
:- Depending on choice of Skia pixel format, additional conversion function variants may be needed | :- Depending on choice of Skia pixel format, additional conversion function variants may be needed | ||
Line 126: | Line 175: | ||
|rowspan=1|aura_unittests | |rowspan=1|aura_unittests | ||
|OSExchangeDataProviderMusTest.TestHTML | |OSExchangeDataProviderMusTest.TestHTML | ||
− | |style="background-color:# | + | |style="background-color:#00ff00;"|OK |
|- | |- | ||
|rowspan=10|base_unittests | |rowspan=10|base_unittests | ||
Line 148: | Line 197: | ||
|- | |- | ||
|StringUtilTest.FormatBytesUnlocalized | |StringUtilTest.FormatBytesUnlocalized | ||
− | |style="background-color:# | + | |style="background-color:#00cf00;"|OK<br>(Locale dep) |
|- | |- | ||
|SysInfoTest.GetHardwareInfo | |SysInfoTest.GetHardwareInfo | ||
Line 161: | Line 210: | ||
|rowspan=32|blink_platform_unittests | |rowspan=32|blink_platform_unittests | ||
|AffineTransformTest.ToString | |AffineTransformTest.ToString | ||
− | |style="background-color:# | + | |style="background-color:#00cf00;"|OK<br>(Locale dep) |
|- | |- | ||
|BMPImageDecoderTest.isSizeAvailable | |BMPImageDecoderTest.isSizeAvailable | ||
− | |style="background-color:# | + | |style="background-color:#00ff00;"|OK |
|- | |- | ||
|BMPImageDecoderTest.mergeBuffer | |BMPImageDecoderTest.mergeBuffer | ||
− | |style="background-color:# | + | |style="background-color:#00ff00;"|OK |
|- | |- | ||
|BMPImageDecoderTest.parseAndDecode | |BMPImageDecoderTest.parseAndDecode | ||
− | |style="background-color:# | + | |style="background-color:#00ff00;"|OK |
|- | |- | ||
|BitmapImageTest.APNGDecoder19 | |BitmapImageTest.APNGDecoder19 | ||
− | |style="background-color:# | + | |style="background-color:#00ff00;"|OK |
|- | |- | ||
|BitmapImageTest.GifDecoderFrame0 | |BitmapImageTest.GifDecoderFrame0 | ||
− | |style="background-color:# | + | |style="background-color:#00ff00;"|OK |
|- | |- | ||
|BitmapImageTest.GifDecoderFrame1 | |BitmapImageTest.GifDecoderFrame1 | ||
− | |style="background-color:# | + | |style="background-color:#00ff00;"|OK |
|- | |- | ||
|BitmapImageTest.GifDecoderFrame3 | |BitmapImageTest.GifDecoderFrame3 | ||
− | |style="background-color:# | + | |style="background-color:#00ff00;"|OK |
|- | |- | ||
|BitmapImageTest.GifDecoderMultiThreaded | |BitmapImageTest.GifDecoderMultiThreaded | ||
− | |style="background-color:# | + | |style="background-color:#00ff00;"|OK |
|- | |- | ||
|BitmapImageTest.jpegHasColorProfile | |BitmapImageTest.jpegHasColorProfile | ||
− | |style="background-color:# | + | |style="background-color:#00ff00;"|OK |
|- | |- | ||
|BitmapImageTest.pngHasColorProfile | |BitmapImageTest.pngHasColorProfile | ||
− | |style="background-color:# | + | |style="background-color:#00ff00;"|OK |
|- | |- | ||
|BitmapImageTest.webpHasColorProfile | |BitmapImageTest.webpHasColorProfile | ||
− | |style="background-color:# | + | |style="background-color:#00ff00;"|OK |
|- | |- | ||
|DecodedImageTypeHistogramTest/DecodedImageTypeHistogramTest.ImageType/4 | |DecodedImageTypeHistogramTest/DecodedImageTypeHistogramTest.ImageType/4 | ||
− | |style="background-color:# | + | |style="background-color:#00ff00;"|OK |
|- | |- | ||
|DecodedImageTypeHistogramTest/DecodedImageTypeHistogramTest.ImageType/5 | |DecodedImageTypeHistogramTest/DecodedImageTypeHistogramTest.ImageType/5 | ||
− | |style="background-color:# | + | |style="background-color:#00ff00;"|OK |
|- | |- | ||
|DeferredImageDecoderTestWoPlatform.mixImagesBmp | |DeferredImageDecoderTestWoPlatform.mixImagesBmp | ||
− | |style="background-color:# | + | |style="background-color:#00ff00;"|OK |
|- | |- | ||
|DeferredImageDecoderTestWoPlatform.mixImagesIco | |DeferredImageDecoderTestWoPlatform.mixImagesIco | ||
− | |style="background-color:# | + | |style="background-color:#00ff00;"|OK |
|- | |- | ||
|DoubleRectTest.ToString | |DoubleRectTest.ToString | ||
− | |style="background-color:# | + | |style="background-color:#00cf00;"|OK<br>(Locale dep) |
|- | |- | ||
|DragImageTest.InterpolationNone | |DragImageTest.InterpolationNone | ||
− | |style="background-color:# | + | |style="background-color:#00ff00;"|OK |
|- | |- | ||
|FloatRectTest.ToString | |FloatRectTest.ToString | ||
− | |style="background-color:# | + | |style="background-color:#00cf00;"|OK<br>(Locale dep) |
|- | |- | ||
|FontDescriptionTest.ToString | |FontDescriptionTest.ToString | ||
− | |style="background-color:# | + | |style="background-color:#00cf00;"|OK<br>(Locale dep) |
|- | |- | ||
|FontSelectionTypesTest.RequestToString | |FontSelectionTypesTest.RequestToString | ||
− | |style="background-color:# | + | |style="background-color:#00cf00;"|OK<br>(Locale dep) |
|- | |- | ||
|FontSelectionTypesTest.ValueToString | |FontSelectionTypesTest.ValueToString | ||
− | |style="background-color:# | + | |style="background-color:#00cf00;"|OK<br>(Locale dep) |
|- | |- | ||
|GraphicsContextHighConstrastTest | |GraphicsContextHighConstrastTest | ||
− | |style="background-color:# | + | |style="background-color:#00ff00;"|OK |
|- | |- | ||
|GraphicsContextTest.Recording | |GraphicsContextTest.Recording | ||
− | |style="background-color:# | + | |style="background-color:#00ff00;"|OK |
|- | |- | ||
|GraphicsContextTest.UnboundedDrawsAreClipped | |GraphicsContextTest.UnboundedDrawsAreClipped | ||
− | |style="background-color:# | + | |style="background-color:#00ff00;"|OK |
|- | |- | ||
|HighContrastImageClassifierTest | |HighContrastImageClassifierTest | ||
− | |style="background-color:# | + | |style="background-color:#00ff00;"|OK |
|- | |- | ||
|ICOImageDecoderTests | |ICOImageDecoderTests | ||
− | |style="background-color:# | + | |style="background-color:#00ff00;"|OK |
|- | |- | ||
|ImageFrameTest.BlendRGBAPremultipliedF16Buffer | |ImageFrameTest.BlendRGBAPremultipliedF16Buffer | ||
− | |style="background-color:# | + | |style="background-color:#00ff00;"|OK |
|- | |- | ||
|ImageFrameTest.BlendRGBARawF16Buffer | |ImageFrameTest.BlendRGBARawF16Buffer | ||
− | |style="background-color:# | + | |style="background-color:#00ff00;"|OK |
|- | |- | ||
|StaticPNGTests.DecodeHighBitDepthPngToHalfFloat | |StaticPNGTests.DecodeHighBitDepthPngToHalfFloat | ||
− | |style="background-color:# | + | |style="background-color:#00ff00;"|OK |
|- | |- | ||
|StaticWebPTests.isSizeAvailable | |StaticWebPTests.isSizeAvailable | ||
− | |style="background-color:# | + | |style="background-color:#00ff00;"|OK |
|- | |- | ||
|TransformationMatrixTest.ToString | |TransformationMatrixTest.ToString | ||
− | |style="background-color:# | + | |style="background-color:#00cf00;"|OK<br>(Locale dep) |
|- | |- | ||
|rowspan=2|chromedriver_unittests | |rowspan=2|chromedriver_unittests | ||
|ProcessExtensions | |ProcessExtensions | ||
− | |style="background-color:# | + | |style="background-color:#00ff00;"|OK |
|- | |- | ||
|UnzipSoleFile.Entry | |UnzipSoleFile.Entry | ||
− | |style="background-color:# | + | |style="background-color:#00ff00;"|OK |
|- | |- | ||
|rowspan=28|components_unittests | |rowspan=28|components_unittests | ||
Line 386: | Line 435: | ||
|UsbDescriptorsTest.StringDescriptor | |UsbDescriptorsTest.StringDescriptor | ||
|style="background-color:#ffff00;"|Fail | |style="background-color:#ffff00;"|Fail | ||
+ | |- | ||
+ | |rowspan=11|gfx_unittests | ||
+ | |ColorAnalysisTest | ||
+ | |style="background-color:#00ff00;"|OK | ||
+ | |- | ||
+ | |ICCProfile | ||
+ | |style="background-color:#00ff00;"|OK | ||
+ | |- | ||
+ | |ImageTest.MultiResolutionImageSkiaToPNG | ||
+ | |style="background-color:#00ff00;"|OK | ||
+ | |- | ||
+ | |ImageTest.PNGEncodeFromPlatformDecodeToSkia | ||
+ | |style="background-color:#00ff00;"|OK | ||
+ | |- | ||
+ | |ImageUtilTest.JPEGEncodeAndDecode | ||
+ | |style="background-color:#00ff00;"|OK | ||
+ | |- | ||
+ | |NineImagePainterTest | ||
+ | |style="background-color:#00ff00;"|OK | ||
+ | |- | ||
+ | |PNGCodec | ||
+ | |style="background-color:#00ff00;"|OK | ||
+ | |- | ||
+ | |SimpleColorSpace | ||
+ | |style="background-color:#00ff00;"|OK | ||
+ | |- | ||
+ | |SkBitmapOperationsTest.CreateHSLShiftedBitmapHueOnly | ||
+ | |style="background-color:#00ff00;"|OK | ||
+ | |- | ||
+ | |SkBitmapOperationsTest.RotateImage | ||
+ | |style="background-color:#00ff00;"|OK | ||
+ | |- | ||
+ | |VectorIconTest.CorrectSizePainted | ||
+ | |style="background-color:#00ff00;"|OK | ||
|- | |- | ||
|rowspan=1|mojo_unittests | |rowspan=1|mojo_unittests | ||
|ValidationTest.InputParser | |ValidationTest.InputParser | ||
− | |style="background-color:# | + | |style="background-color:#00cf00;"|OK<br>(Locale dep) |
+ | |- | ||
+ | |rowspan=2|skia_unittests | ||
+ | |ImageOperations.ResizeShouldAverageColors | ||
+ | |style="background-color:#00ff00;"|OK | ||
+ | |- | ||
+ | |ImageOperations.ScaleUp | ||
+ | |style="background-color:#00ff00;"|OK | ||
|- | |- | ||
|rowspan=1|ui_base_unittests | |rowspan=1|ui_base_unittests | ||
|OSExchangeDataTest.TestHTML | |OSExchangeDataTest.TestHTML | ||
|style="background-color:#ffff00;"|Fail | |style="background-color:#ffff00;"|Fail | ||
+ | |- | ||
+ | |rowspan=26|unit_tests | ||
+ | |BackFwdMenuModelTest.FaviconLoadTest | ||
+ | |style="background-color:#00ff00;"|OK | ||
+ | |- | ||
+ | |BrowserThemePackTest.HiDpiThemeTest | ||
+ | |style="background-color:#00ff00;"|OK | ||
+ | |- | ||
+ | |BrowserViewTest.AccessibleWindowTitle | ||
+ | |style="background-color:#cfcf00;"|Fail<br>(Also on LE) | ||
+ | |- | ||
+ | |CRLSetComponentInstallerTest | ||
+ | |style="background-color:#00ff00;"|OK | ||
+ | |- | ||
+ | |CaptureVisiblePageTest.URLsCapturableWithEitherActiveTabOrAllURLs | ||
+ | |style="background-color:#cfcf00;"|Fail<br>(Also on LE) | ||
+ | |- | ||
+ | |ChromeAppIconTest.IconLifeCycle | ||
+ | |style="background-color:#ffff00;"|Fail | ||
+ | |- | ||
+ | |ChromeBrowserMainExtraPartsMetricsTest.VerifyTouchEventsEnabledIsNotRecordedAfterPostBrowserStart | ||
+ | |style="background-color:#cfcf00;"|Fail<br>(Also on LE) | ||
+ | |- | ||
+ | |ChromePaths.UserCacheDir | ||
+ | |style="background-color:#ffff00;"|Fail | ||
+ | |- | ||
+ | |DownloadItemModelTest.InterruptTooltip | ||
+ | |style="background-color:#cfcf00;"|Fail<br>(Also on LE) | ||
+ | |- | ||
+ | |DownloadItemModelTest.InterruptedStatus | ||
+ | |style="background-color:#cfcf00;"|Fail<br>(Also on LE) | ||
+ | |- | ||
+ | |DownloadProtectionServiceTest.CheckClientDownloadSampledFile | ||
+ | |style="background-color:#cfaf00;"|Crash<br>(Also on LE) | ||
+ | |- | ||
+ | |EnterpriseHardwarePlatformAPITest.GetHardwarePlatformInfoAllowed | ||
+ | |style="background-color:#cfcf00;"|Fail<br>(Also on LE) | ||
+ | |- | ||
+ | |ExtensionIconManagerTest.ScaleFactors | ||
+ | |style="background-color:#00ff00;"|OK | ||
+ | |- | ||
+ | |ExtensionInfoGeneratorUnitTest.RuntimeHostPermissionsWithoutFeature | ||
+ | |style="background-color:#cfcf00;"|Fail<br>(Also on LE) | ||
+ | |- | ||
+ | |MediaEngagementScoreTest.OverrideFieldTrial | ||
+ | |style="background-color:#ffff00;"|Fail | ||
+ | |- | ||
+ | |MurmurHash3UtilTest.MurmurHash3String | ||
+ | |style="background-color:#ffff00;"|Fail | ||
+ | |- | ||
+ | |PermissionMessageCombinationsUnittest | ||
+ | |style="background-color:#cfcf00;"|Fail<br>(Also on LE) | ||
+ | |- | ||
+ | |PermissionsTest.GetWarningMessages_DeclarativeWebRequest | ||
+ | |style="background-color:#cfcf00;"|Fail<br>(Also on LE) | ||
+ | |- | ||
+ | |PermissionsTest.GetWarningMessages_Socket_AnyHost | ||
+ | |style="background-color:#cfcf00;"|Fail<br>(Also on LE) | ||
+ | |- | ||
+ | |SessionMonitorTest | ||
+ | |style="background-color:#ffaf00;"|Crash | ||
+ | |- | ||
+ | |TabScorePredictorTest | ||
+ | |style="background-color:#ffff00;"|Fail | ||
+ | |- | ||
+ | |ThemeColorMatchesManifestTest.ThemeColor | ||
+ | |style="background-color:#ffaf00;"|Crash | ||
+ | |- | ||
+ | |TwoPhaseUploaderTest | ||
+ | |style="background-color:#ffff00;"|Fail | ||
+ | |- | ||
+ | |WebAppIconGeneratorTest.ConstrainBitmapsToSizes | ||
+ | |style="background-color:#00ff00;"|OK | ||
+ | |- | ||
+ | |WebRtcRtpDumpWriterTest | ||
+ | |style="background-color:#ffff00;"|Fail | ||
+ | |- | ||
+ | |WifiStatusMonitorTest.QueryStatusAndRecordResponse | ||
+ | |style="background-color:#ffaf00;"|Crash | ||
+ | |- | ||
+ | |rowspan=18|webkit_unit_tests | ||
+ | |All/ScrollingCoordinatorTest.setupScrollbarLayerShouldNotCrash | ||
+ | |style="background-color:#ffaf00;"|Crash | ||
+ | |- | ||
+ | |AllFields/FontBuilderAdditiveTest.OnlySetValueIsModified/7 | ||
+ | |style="background-color:#ffff00;"|Fail | ||
+ | |- | ||
+ | |CSSFontFaceSourceTest.HashCollision | ||
+ | |style="background-color:#ffff00;"|Fail | ||
+ | |- | ||
+ | |CanvasAsyncBlobCreatorTest.ColorManagedConvertToBlob | ||
+ | |style="background-color:#ffff00;"|Fail | ||
+ | |- | ||
+ | |CanvasRenderingContext2DTest.ColorManagedPutImageDataOnSRGBCanvas | ||
+ | |style="background-color:#ffff00;"|Fail | ||
+ | |- | ||
+ | |FrameSerializerTest.BlankFrames | ||
+ | |style="background-color:#ffaf00;"|Crash | ||
+ | |- | ||
+ | |FrameSerializerTest.CSS | ||
+ | |style="background-color:#ffaf00;"|Crash | ||
+ | |- | ||
+ | |ImageBitmapTest.ImageBitmapColorSpaceConversionImageData | ||
+ | |style="background-color:#ffff00;"|Fail | ||
+ | |- | ||
+ | |ImageDataTest.TestConvertPixelsFromCanvasPixelFormatToImageDataStorageFormat | ||
+ | |style="background-color:#ffff00;"|Fail | ||
+ | |- | ||
+ | |ImageDataTest.TestCreateImageDataFromStaticBitmapImage | ||
+ | |style="background-color:#ffff00;"|Fail | ||
+ | |- | ||
+ | |LazyFrameLoading/LazyLoadFramesTest.AboutBlankChildFrameNavigation | ||
+ | |style="background-color:#ffaf00;"|Crash | ||
+ | |- | ||
+ | |ListenerLeakTest | ||
+ | |style="background-color:#ffaf00;"|Crash | ||
+ | |- | ||
+ | |V8ScriptValueSerializerTest | ||
+ | |style="background-color:#ffff00;"|Fail | ||
+ | |- | ||
+ | |WebFrameSerializerSanitizationTest.RemoveIframeInHead | ||
+ | |style="background-color:#ffaf00;"|Crash | ||
+ | |- | ||
+ | |WebFrameSerializerSanitizationTest.RemoveInlineScriptInAttributes | ||
+ | |style="background-color:#ffaf00;"|Crash | ||
+ | |- | ||
+ | |WebFrameTest | ||
+ | |style="background-color:#ffaf00;"|Crash | ||
+ | |- | ||
+ | |WebViewTest | ||
+ | |style="background-color:#ffaf00;"|Crash | ||
+ | |- | ||
+ | |WindowProxyTest.ReinitializedAfterNavigation | ||
+ | |style="background-color:#ffaf00;"|Crash | ||
|} | |} | ||
Line 411: | Line 635: | ||
** [[Media:0012-V4Rice-Fix-LE-dependency.patch]] | ** [[Media:0012-V4Rice-Fix-LE-dependency.patch]] | ||
** [[Media:0013-url-Canonicalize-Remove-unportable-reinterpret_cast.patch]] | ** [[Media:0013-url-Canonicalize-Remove-unportable-reinterpret_cast.patch]] | ||
+ | ** [[Media:0014-CRLSet-Fix-LE-dependency.patch]] | ||
+ | ** [[Media:0015-BrowserThemePack-Remove-byte-order-check-since-the-o.patch]] | ||
+ | ** [[Media:0016-crc32c-Fix-definition-of-BYTE_ORDER_BIG_ENDIAN.patch]] | ||
+ | ** [[Media:0017-leveldatabase-Fix-endianness-flag.patch]] | ||
+ | ** [[Media:0018-libvpx-Add-maltivec-mvsx-to-cflags-of-VSX-code.patch]] | ||
+ | ** [[Media:0019-blink-handle-pixel-format-selection-independent-of-b.patch]] | ||
+ | ** [[Media:0020-blink-Fix-BMP-header-parsing-on-big-endian.patch]] | ||
+ | ** [[Media:0021-blink-Fix-alpha-check-in-GC-tests.patch]] | ||
+ | ** [[Media:0022-blink-Fix-typo-in-WebGL-image-conversion-test.patch]] | ||
+ | ** [[Media:0023-blink-Fix-bizarre-endianness-dependency-in-TensorFlo.patch]] | ||
+ | ** [[Media:0024-blink-Fix-RGBA-checks-in-GC-tests.patch]] | ||
+ | ** [[Media:0025-aura-Fix-UTF16-BOM.patch]] | ||
+ | ** [[Media:0026-gfx-Use-correct-function-to-create-a-SkPMColor-rathe.patch]] | ||
+ | ** [[Media:0027-skia-Fix-testcases-to-use-SkPMColor-rather-than-SkCo.patch]] | ||
+ | ** [[Media:0028-gfx-Convert-PMColor-to-Color-before-passing-it-to-BG.patch]] | ||
+ | ** [[Media:0029-gfx-select-JPEG-color-space-in-an-endian-neutral-man.patch]] | ||
+ | ** [[Media:0030-gfx-Fix-color-analysis-on-big-endian.patch]] | ||
+ | ** [[Media:0031-sandbox-Fix-SECCOMP_-_-LM-SB_IDX-for-ppc64.patch]] | ||
+ | ** [[Media:0032-media-renderers-Fix-component-order-test-to-check-by.patch]] | ||
+ | ** [[Media:0033-media-ffmpeg-Remove-error-on-endianness.patch]] | ||
+ | ** [[Media:0034-media-formats-mp4-Fix-endian-dependent-code-in-OpusS.patch]] | ||
+ | ** [[Media:0035-skia-Select-BGRA-component-order-on-big-endian.patch]] | ||
+ | ** [[Media:0036-base-allocator-Correctly-terminate-the-freelist.patch]] | ||
+ | ** [[Media:0037-chromedriver-Add-some-missing-byteswaps.patch]] | ||
* Boringssl repository | * Boringssl repository | ||
** [[Media:0001-Add-ppc64-big-endian-to-base.h.patch]] | ** [[Media:0001-Add-ppc64-big-endian-to-base.h.patch]] | ||
Line 427: | Line 675: | ||
** [[Media:0001-SkJSON-Fix-tagged-value-implementation-for-big-endia.patch]] | ** [[Media:0001-SkJSON-Fix-tagged-value-implementation-for-big-endia.patch]] | ||
** [[Media:0002-SkCodevPriv-Add-missing-include-of-SkEndian.h.patch]] | ** [[Media:0002-SkCodevPriv-Add-missing-include-of-SkEndian.h.patch]] | ||
+ | ** [[Media:0003-portable-blit_row_s32a_opaque-Respect-SK_A32_SHIFT.patch]] | ||
+ | ** [[Media:0004-skcms-skip-swap-in-read_big_u-16-32-on-BE.patch]] | ||
+ | ** [[Media:0005-skcms-Handle-endianness-in-transform-code.patch]] | ||
+ | ** [[Media:0006-SkRasterPipeline_opts-Handle-endianness-in-32-bit-pi.patch]] | ||
+ | ** [[Media:0007-SkPixmap-Fix-getColor-on-pixmaps-with-non-premul-alp.patch]] | ||
+ | ** [[Media:0008-images-Fix-scanline-transformation-functions-on-BE.patch]] | ||
+ | ** [[Media:0009-skcms-skip-swap-in-eval_curve-on-BE.patch]] | ||
+ | ** [[Media:0010-SkColor-Fix-conversion-between-SkColor4f-and-SkColor.patch]] | ||
+ | ** [[Media:0011-Remove-some-endianness-asserts.patch]] | ||
+ | ** [[Media:0012-SkGradientShaderBase-Fix-unportable-conversion-to-Sk.patch]] | ||
* Perfetto repository | * Perfetto repository | ||
** [[Media:0001-protozero-Implement-byte-swap-macros.patch]] | ** [[Media:0001-protozero-Implement-byte-swap-macros.patch]] | ||
+ | ** [[Media:0002-protozero-Swap-fixed-types.patch]] | ||
+ | ** [[Media:0003-Prevent-AssumeLittleEndian-template-from-asserting-w.patch]] | ||
* Ffmpeg repository | * Ffmpeg repository | ||
** [[Media:0001-build_ffmpeg-Recognize-ppc64.patch]] | ** [[Media:0001-build_ffmpeg-Recognize-ppc64.patch]] | ||
* Webrtc repository | * Webrtc repository | ||
** [[Media:0001-wav-Implement-be-to-le-functions.patch]] | ** [[Media:0001-wav-Implement-be-to-le-functions.patch]] | ||
+ | ** [[Media:0002-wav-Implement-sample-swapping.patch]] | ||
+ | * flatbuffers repository | ||
+ | ** [[Media:0001-EndianSwap-Use-a-copy-constructor-rather-than-assign.patch]] | ||
+ | ** [[Media:0002-IterateValue-Use-ReadScalar-instead-of-unportable-re.patch]] | ||
+ | |||
+ | [[Category:Ports]] |
Latest revision as of 23:11, 4 May 2023
The repository of all required patches for ppc64 (big endian) is available here: https://github.com/zeldin/chromium_be.
Changes required to Chromium to work on big endian
- Skia
- -
Chromium assumes that the pixel format, when viewed as a 32-bit word, is either ARGB or ABGR. However, third_party/skia/include/core/SkImageInfo.h contains a check that the pixel format, when viewed as four 8-bit bytes, is either BGRA or RGBA. Hence either this check needs to be relaxed (Maybe it is bogus in the first place? The comments talk about "native ARGB 32-bit", yet the test goes out of its way to test the ordering as bytes and not as 32-bit words), or Chromium needs to learn about a different pixel format.Selected BGRA component order, which works in Skia and seems to be workable in Chromium as well.
- Datapack
- ui/base/resource/data_pack.cc
- -
Need to byteswap metadata on input (resource file format is specified to use LE)Done
- chrome/browser/themes/browser_theme_pack.cc
- -
"datapack assumes little endian"Done
- Gfx
- ui/gfx/codec/jpeg_codec.cc
- -
Selection of out_color_space when format is FORMAT_SkBitmap needs to check component order of SkPMColor as bytes, not as shiftDone
- ui/gfx/color_analysis.cc
- -
Functions accessing SkColor format pixels as bytes need updating for big endian.Done
- ui/gfx/codec/png_codec.h and ui/gfx/codec/png_codec.cc
- -
A new FORMAT_ARGB is needed for decoding so that color_analysis can decode into in-memory SkColor on big endian.Done
- Net
- net/cert/crl_set.cc
- -
"assumes little endian"Done
- components/safe_browsing/db/v4_rice.cc
- -
#error The code below assumes little-endianness.Done
- Media
- media/ffmpeg/ffmpeg_common.cc and media/formats/mp4/box_definitions.cc
- -
#error The code below assumes little-endianness.Removed check
- media/renderers/paint_canvas_video_renderer.cc
- -
Depending on choice of Skia pixel format, a new LIBYUV mapping set may be needed (see also third_party/libyuv below).Adjusted check
- I18N
- base/i18n/icu_util.cc
- -
Needs to use "icudtb.dat" instead of "icudtl.dat" on BEDone
- Sandbox
- sandbox/linux/system_headers/linux_seccomp.h
- -
The definition of the big endian variant is incorrect (contains a bogus "__AUDIO_ARCH_BE"). Also, it would be better to define two different macros AUDIT_ARCH_PPC64 and AUDIT_ARCH_PPC64LE (because that is how it actually looks in <linux/audit.h>), and choose the correct one in sandbox/linux/bpf_dsl/seccomp_macros.h instead.Done
- sandbox/linux/bpf_dsl/seccomp_macros.h
- -
The definitions of the macros SECCOMP_IP_MSB_IDX, SECCOMP_IP_LSB_IDX, SECCOMP_ARG_MSB_IDX, and SECCOMP_ARG_LSB_IDX need to take endianness into accountDone
- Partition allocator
- base/allocator/partition_allocator/partition_freelist_entry.h
- -
A different pointer transformation function is used on BE compared to on LE. This is not an issue in itself, but it exposes a bug that NULL pointers are sometimes not transformed when they ought to be (the LE transformation function is unity for NULL).Done
- Pickle
- base/pickle.cc
- -
ReadBool accesses serialized bools as "bool" (8 bit) despite WriteBool serializing them as "int" (32 bit)Done
- SHA1
- base/sha1.cc
- -
Contains some byteswaps which should only happen on little endianDone
- Url
- url/url_canon_host.cc
- -
Uses a reinterpret_cast to get an unsigned char pointer into an unsigned int, for no good reason.Done
- Aura
- ui/aura/mus/os_exchange_data_provider_mus.cc
- -
Outputs UTF-16 in native byte order (which is probably correct), but hardcodes an LE BOM.Done
- Unit tests
- base/memory/shared_memory_mapping_unittest.cc, base/metrics/bucket_ranges_unittest.cc, and base/strings/string_number_conversions_unittest.cc
- -
These unit tests expose endianness in one way or another and need to be adjusted to run correctly on BEDone
- ui/gfx/skbitmap_operations_unittest.cc
- -
The CreateHSLShiftedBitmapHueOnly test uses the wrong function to set SkPMColor values, which breaks on BE (and should break on Android as well..)Done
- skia/ext/image_operation_unittest.cc and ui/gfx/codec/png_codec_unittest.cc
- -
There is code here which needs to convert between SkColor and SkPMColor (which can be different, even on LE) when accessing pixels directly.Done
- chrome/test/chromedriver/chrome_launcher.cc and chrome/test/chromedriver/util.cc
- -
Missing byteswaps when parsing zip and crx headersDone
- third_party/skia
- include/private/GrTypesPriv.h
- -
#error "Skia gpu currently assumes little endian"Removed check
- src/core/SkPixmap.cpp
- -
getColor() needs to use something other than SkSwizzle_BGRA_to_PMColor to convert SkPMColor to SkColor, because SkColor is defined by fixed 32-bit shifts, while "BGRA" is defined by 8-bit component order in memory.Done
- src/core/SkUnPreMultiplyPriv.h and src/images/SkImageEncoderFns.h
- -
The scanline transformation functions need to take endianness into account since the pixel formats are defined by memory order, but the conversion functions use 32-bit loads and hardcoded shifts.Done
- src/opts/Sk4px_none.h
- -
Sk4px::alphas, Sk4px::zeroAlphas, Sk4px::zeroColors: "This method assumes little-endian."Removed check
- src/opts/SkXfermode_opts.h
- -
a_rgb assumes specific component orderRemoved check
- src/opts/SkBlitRow_opts.h
- -
The "portable" implementation of blit_row_s32a_opaque hardcodes alpha bit positionDone
- src/opts/SkRasterPipeline_opts.h
- -
Pixel load and store ops need to take endianness into accountDone
- src/utils/SkJSON.cpp and src/utils/SkJSON.h
- -
Tagged value implementation needs to be adapted for BEDone
- src/codec/SkCodecPriv.h
- -
Missing include of "SkEndian.h"Done
- src/shaders/gradients/SkGradientShaderPriv.h
- -
getLegacyColor needs fixing for BEDone
- third_party/skcsm/skcms.cc
- -
The read_big_* functions byteswap the values read even on BEDoneAlso eval_curve does this.Done
- third_party/skcms/src/Transform_inl.h
- -
Pixel load and store ops need to take endianness into accountDone
- third_party/boringssl/src
- include/openssl/base.h
- -
Need to recognize BE ppc64Done
- crypto/fipsmodule/bn/bytes.c
- -
Bignum I/O functions need adaption for BEDone
- crypto/fipsmodule/ecdsa/ecdsa.c and third_party/fiat/p256.c
- -
More bignum stuff needing adaption for BEDone
- crypto/asn1/a_int.c, crypto/fipsmodule/modes/gcm.c, crypto/fipsmodule/modes/internal.h, and crypto/fipsmodule/rand/ctrdrbg.c
- -
Hardcoded swaps which need to be removed on BEDone
- crypto/fipsmodule/modes/polyval.c
- -
reverse_and_mulX_ghash does both byte-swapping and arithmetic. The order needs to be reversed on BE.Done
- crypto/poly1305/poly1305.c
- -
Defines specific LE access functions, but does not do any actual serialization or swapping in them.Done
- crypto/curve25519/spake25519.c and third_party/fiat/curve25519.c
- -
The arithmetic operations on LE data (addition, comparison) need swaps on BE.Done
- crypto/evp/scrypt.c
- -
Need to swap the input and and output blocks on BE.Done
- crypto/chacha/chacha.c
- -
LE access functions are defined, and correct, but are only used in one of the two CHACHA variants.Done
- crypto/cipher_extra/e_aesgcmsiv.c
- -
Counter and length fields need swapping on BE.Done
- crypto/compiler_test.cc
- -
There is a test which deliberately fails if the host is not LE...Done
- third_party/blink
- renderer/platform/graphics/gpu/webgl_image_conversion.cc
- -
Does contain BE support, but a variable rename refactoring is missing from the BE codeDone
- renderer/platform/graphics/logging_canvas.cc
- -
Does contain BE support, but a variable rename refactoring is missing from the BE codeDone
- renderer/platform/image-decoders/jpeg/jpeg_image_decoder.cc
- -
#error Blink assumes a little-endian target.Done
- renderer/platform/image-decoders/webp/webp_image_decoder.cc
- -
#error Blink assumes a little-endian target.Done
- renderer/platform/heap/asm/SaveRegisters_ppc64.S
- -
Needs to handle ELF ABI v1Done
- renderer/platform/image-decoders/bmp/bmp_image_reader.h
- -
Needs to byteswap BMP header fields on BE.Done
- renderer/platform/graphics/graphics_context_test.cc
- -
Should use SkGetPackedA32() instead of hardcoding >>24.Done - -
Should use SkPackARGB32NoCheck() instead of hardcoding 32-bit pixel values.Done
- renderer/platform/graphics/gpu/webgl_image_conversion_test.cc
- -
The BE version of a test vector has a misspelled variable name.Done
- renderer/platform/graphics/highcontrast/highcontrast_classifier.cc
- -
The TensorFlow floating point parameters are initialized from a series of bytes. Should be initialized from floating point values instead to remove endianness (and floating point format) dependencies.Done
- third_party/flatbuffers/src
- include/flatbuffers/base.h
- -
The ByteSwap code does not work on C++11 due to the default constructor of the unions getting deletedDone
- include/flatbuffers/minireflect.h
- -
IterateValue dereferences reinterpret_cast:ed pointers into LE dataDone
- third_party/perfetto
- include/perfetto/base/utils.h
- - Page size hardcoded as 4096
- -
"AssumeLittleEndian" template asserts even though never instantiatedDone
- src/protozero/message.cc
- -
float and double handling need adjusting for BE (according to comment)Done
- src/protozero/proto_decoder.cc
- -
Byteswap implementations missingDone
- third_party/ffmpeg
- chromium/scripts/build_ffmpeg.py
- -
Needs to recognize 'ppc64' as well as 'ppc64le'Done
- third_party/webrtc
- common_audio/wav_file.cc
- -
WavReader::ReadSamples and WavWriter::WriteSamples need to byteswap the samplesDone
- common_audio/wav_header.cc
- -
Conversion functions missingDone
- third_party/modp_b64
- BUILD.gn
- -
modp_b64 actually supports BE, but in converting to their own build system Google managed to lose the check to define WORDS_BIGENDIANDone
- modp_b64.cc
- -
The prototype of modp_b64_decode needs to be updated to use size_t instead of int for the lengths, as it has been done for the LE variantDone
- third_party/crc32c
- BUILD.gn
- -
Needs to define BYTE_ORDER_BIG_ENDIAN=1 on BEDone
- third_party/leveldatabase
- port/port_chromium.h
- -
Needs to set kLittleEndian depending on endiannessDone
- third_party/libvpx
- -
The build system should move VSX-specific sources into a separate source set, and set the cflags "-maltivec -mvsx" for it. In the original build system the cflags were set based on a glob of the source filename, but in Googles build system it has to be done manually.Done
- third_party/libyuv
- - Depending on choice of Skia pixel format, additional conversion function variants may be needed
- base/third_party/dmg_fp
- dtoa.cc
- -
Google has hardcoded little endian modeDone
Failing testcases
Testsuite | Testcase | Result |
---|---|---|
aura_unittests | OSExchangeDataProviderMusTest.TestHTML | OK |
base_unittests | OutOfMemoryDeathTest.SecurityValloc | Fail (Also on LE) |
PartitionAllocTest.DumpMemoryStats | Crash (Also on LE) | |
PartitionAllocTest.GenericAllocGetSize | Fail (Also on LE) | |
PartitionAllocTest.PurgeDiscardable | Crash (Also on LE) | |
PartitionAllocTest.Realloc | Fail (Also on LE) | |
StackTraceTest.TraceStackFramePointers | Fail (Also on LE) | |
StringUtilTest.FormatBytesUnlocalized | OK (Locale dep) | |
SysInfoTest.GetHardwareInfo | Fail (Also on LE) | |
TCMallocFreeTest.BadPointerInFirstPageOfTheLargeObject | Fail (Also on LE) | |
TCMallocFreeTest.DoubleFreeSmallObject | Fail (Also on LE) | |
blink_platform_unittests | AffineTransformTest.ToString | OK (Locale dep) |
BMPImageDecoderTest.isSizeAvailable | OK | |
BMPImageDecoderTest.mergeBuffer | OK | |
BMPImageDecoderTest.parseAndDecode | OK | |
BitmapImageTest.APNGDecoder19 | OK | |
BitmapImageTest.GifDecoderFrame0 | OK | |
BitmapImageTest.GifDecoderFrame1 | OK | |
BitmapImageTest.GifDecoderFrame3 | OK | |
BitmapImageTest.GifDecoderMultiThreaded | OK | |
BitmapImageTest.jpegHasColorProfile | OK | |
BitmapImageTest.pngHasColorProfile | OK | |
BitmapImageTest.webpHasColorProfile | OK | |
DecodedImageTypeHistogramTest/DecodedImageTypeHistogramTest.ImageType/4 | OK | |
DecodedImageTypeHistogramTest/DecodedImageTypeHistogramTest.ImageType/5 | OK | |
DeferredImageDecoderTestWoPlatform.mixImagesBmp | OK | |
DeferredImageDecoderTestWoPlatform.mixImagesIco | OK | |
DoubleRectTest.ToString | OK (Locale dep) | |
DragImageTest.InterpolationNone | OK | |
FloatRectTest.ToString | OK (Locale dep) | |
FontDescriptionTest.ToString | OK (Locale dep) | |
FontSelectionTypesTest.RequestToString | OK (Locale dep) | |
FontSelectionTypesTest.ValueToString | OK (Locale dep) | |
GraphicsContextHighConstrastTest | OK | |
GraphicsContextTest.Recording | OK | |
GraphicsContextTest.UnboundedDrawsAreClipped | OK | |
HighContrastImageClassifierTest | OK | |
ICOImageDecoderTests | OK | |
ImageFrameTest.BlendRGBAPremultipliedF16Buffer | OK | |
ImageFrameTest.BlendRGBARawF16Buffer | OK | |
StaticPNGTests.DecodeHighBitDepthPngToHalfFloat | OK | |
StaticWebPTests.isSizeAvailable | OK | |
TransformationMatrixTest.ToString | OK (Locale dep) | |
chromedriver_unittests | ProcessExtensions | OK |
UnzipSoleFile.Entry | OK | |
components_unittests | ActivationStateComputingThrottleSubFrameTest.Activate/0 | Fail (Also on LE) |
BidirectionalStreamDelayRequestHeadersUntilFlush | Fail | |
CastFramerTest.TestMessageFramerCompleteMessage | Crash | |
CastFramerTest.TestUnparsableBodyProto | Fail | |
CastTransportTest | Crash | |
ChromeCTPolicyEnforcerTest | Fail (Also on LE) | |
DataAccessorTest.Mix | Fail | |
DataReductionProxyInterceptorEndToEndTest.RedirectChainToHttps | Crash (Also on LE) | |
DocumentProviderTest.GenerateLastModifiedString | Fail (Also on LE) | |
ExpireHistoryTest | Crash | |
FaviconHandlerTest.RedownloadExpiredPageUrlFavicon | Fail | |
HistoryBackendTest | Fail | |
ImageManagerTest.GetImageForURLNetworkCacheHit | Timeout | |
ImageManagerTest.QueueImageRequest | Timeout | |
MockCastSocketTest | Crash | |
MultilingualSpellCheckTest | Fail | |
NetExportFileWriterTest.AddEventCustomPath | Fail | |
PasswordHashDataTest.CalculatePasswordHash | Fail | |
PwgRasterTest.Encode | Fail | |
QuarantineTest.FileCanBeAnnotatedWithNoGUID | Fail | |
QuarantineTest.FileCanBeOpenedForReadAfterAnnotation | Fail | |
RemoteSuggestionsProviderImplTest | Fail | |
SelectFaviconFramesTest | Fail | |
SenderPipeTest.TimeoutNoRead | Fail (Also on LE) | |
SenderPipeTest.TimeoutSmallRead | Fail (Also on LE) | |
SpellCheckTest | Fail | |
SslCastSocketTest.TestConnectEndToEndWithRealSSL | Fail | |
SubresourceFilterVerifiedRulesetDealerTest.OpenAndSetRulesetFileValidNoChecksum | Fail | |
content_unittests | BackgroundFetchDataManagerTest.GetInitializationData | Timeout |
BackgroundFetchDataManagerTest.UpdateRegistrationUI | Timeout | |
BackgroundFetchImageHelpers.SerializeRoundTrip | Timeout | |
CanvasCaptureHandlerTest.VerifyFrame | Fail | |
DOMStorageDatabaseTest.TestCanOpenAndReadWebCoreDatabase | Fail | |
PageStateSerializationTest | Fail | |
dbus_unittests | EndToEndAsyncTest.InvalidServiceName | Crash |
MessageTest.SetInvalidHeaders | Fail | |
device_unittests | OneWriterSeqLockTest.ManyThreads | Fail |
UsbDescriptorsTest.OddLengthStringDescriptor | Fail | |
UsbDescriptorsTest.ReadStringDescriptors | Fail | |
UsbDescriptorsTest.StringDescriptor | Fail | |
gfx_unittests | ColorAnalysisTest | OK |
ICCProfile | OK | |
ImageTest.MultiResolutionImageSkiaToPNG | OK | |
ImageTest.PNGEncodeFromPlatformDecodeToSkia | OK | |
ImageUtilTest.JPEGEncodeAndDecode | OK | |
NineImagePainterTest | OK | |
PNGCodec | OK | |
SimpleColorSpace | OK | |
SkBitmapOperationsTest.CreateHSLShiftedBitmapHueOnly | OK | |
SkBitmapOperationsTest.RotateImage | OK | |
VectorIconTest.CorrectSizePainted | OK | |
mojo_unittests | ValidationTest.InputParser | OK (Locale dep) |
skia_unittests | ImageOperations.ResizeShouldAverageColors | OK |
ImageOperations.ScaleUp | OK | |
ui_base_unittests | OSExchangeDataTest.TestHTML | Fail |
unit_tests | BackFwdMenuModelTest.FaviconLoadTest | OK |
BrowserThemePackTest.HiDpiThemeTest | OK | |
BrowserViewTest.AccessibleWindowTitle | Fail (Also on LE) | |
CRLSetComponentInstallerTest | OK | |
CaptureVisiblePageTest.URLsCapturableWithEitherActiveTabOrAllURLs | Fail (Also on LE) | |
ChromeAppIconTest.IconLifeCycle | Fail | |
ChromeBrowserMainExtraPartsMetricsTest.VerifyTouchEventsEnabledIsNotRecordedAfterPostBrowserStart | Fail (Also on LE) | |
ChromePaths.UserCacheDir | Fail | |
DownloadItemModelTest.InterruptTooltip | Fail (Also on LE) | |
DownloadItemModelTest.InterruptedStatus | Fail (Also on LE) | |
DownloadProtectionServiceTest.CheckClientDownloadSampledFile | Crash (Also on LE) | |
EnterpriseHardwarePlatformAPITest.GetHardwarePlatformInfoAllowed | Fail (Also on LE) | |
ExtensionIconManagerTest.ScaleFactors | OK | |
ExtensionInfoGeneratorUnitTest.RuntimeHostPermissionsWithoutFeature | Fail (Also on LE) | |
MediaEngagementScoreTest.OverrideFieldTrial | Fail | |
MurmurHash3UtilTest.MurmurHash3String | Fail | |
PermissionMessageCombinationsUnittest | Fail (Also on LE) | |
PermissionsTest.GetWarningMessages_DeclarativeWebRequest | Fail (Also on LE) | |
PermissionsTest.GetWarningMessages_Socket_AnyHost | Fail (Also on LE) | |
SessionMonitorTest | Crash | |
TabScorePredictorTest | Fail | |
ThemeColorMatchesManifestTest.ThemeColor | Crash | |
TwoPhaseUploaderTest | Fail | |
WebAppIconGeneratorTest.ConstrainBitmapsToSizes | OK | |
WebRtcRtpDumpWriterTest | Fail | |
WifiStatusMonitorTest.QueryStatusAndRecordResponse | Crash | |
webkit_unit_tests | All/ScrollingCoordinatorTest.setupScrollbarLayerShouldNotCrash | Crash |
AllFields/FontBuilderAdditiveTest.OnlySetValueIsModified/7 | Fail | |
CSSFontFaceSourceTest.HashCollision | Fail | |
CanvasAsyncBlobCreatorTest.ColorManagedConvertToBlob | Fail | |
CanvasRenderingContext2DTest.ColorManagedPutImageDataOnSRGBCanvas | Fail | |
FrameSerializerTest.BlankFrames | Crash | |
FrameSerializerTest.CSS | Crash | |
ImageBitmapTest.ImageBitmapColorSpaceConversionImageData | Fail | |
ImageDataTest.TestConvertPixelsFromCanvasPixelFormatToImageDataStorageFormat | Fail | |
ImageDataTest.TestCreateImageDataFromStaticBitmapImage | Fail | |
LazyFrameLoading/LazyLoadFramesTest.AboutBlankChildFrameNavigation | Crash | |
ListenerLeakTest | Crash | |
V8ScriptValueSerializerTest | Fail | |
WebFrameSerializerSanitizationTest.RemoveIframeInHead | Crash | |
WebFrameSerializerSanitizationTest.RemoveInlineScriptInAttributes | Crash | |
WebFrameTest | Crash | |
WebViewTest | Crash | |
WindowProxyTest.ReinitializedAfterNavigation | Crash |
Patchfiles uploaded
- Chromium repository
- Media:0001-sandbox-Fix-SECCOMP ARCH-for-ppc64.patch
- Media:0002-datapack-Byteswap-metadata-on-big-endian.patch
- Media:0003-i18n-Use-correct-ICU-data-file.patch
- Media:0004-blink-Update-variable-names-in-BE-part-of-graphics-c.patch
- Media:0005-blink-Fix-SaveRegisters_ppc64-for-ABIv1.patch
- Media:0006-modp_b64-Set-WORDS_BIGENDIAN-on-big-endian.patch
- Media:0007-modp_b64-Fix-size-datatype-for-modp_b64_decode-on-bi.patch
- Media:0008-dmg_fp-Add-endianness-check.patch
- Media:0009-pickle-Use-same-scalar-size-in-ReadBool-as-in-WriteB.patch
- Media:0010-sha1-Remove-byteswaps-on-big-endian.patch
- Media:0011-unittest-Fix-some-tests-exposing-endianness-to-work-.patch
- Media:0012-V4Rice-Fix-LE-dependency.patch
- Media:0013-url-Canonicalize-Remove-unportable-reinterpret_cast.patch
- Media:0014-CRLSet-Fix-LE-dependency.patch
- Media:0015-BrowserThemePack-Remove-byte-order-check-since-the-o.patch
- Media:0016-crc32c-Fix-definition-of-BYTE_ORDER_BIG_ENDIAN.patch
- Media:0017-leveldatabase-Fix-endianness-flag.patch
- Media:0018-libvpx-Add-maltivec-mvsx-to-cflags-of-VSX-code.patch
- Media:0019-blink-handle-pixel-format-selection-independent-of-b.patch
- Media:0020-blink-Fix-BMP-header-parsing-on-big-endian.patch
- Media:0021-blink-Fix-alpha-check-in-GC-tests.patch
- Media:0022-blink-Fix-typo-in-WebGL-image-conversion-test.patch
- Media:0023-blink-Fix-bizarre-endianness-dependency-in-TensorFlo.patch
- Media:0024-blink-Fix-RGBA-checks-in-GC-tests.patch
- Media:0025-aura-Fix-UTF16-BOM.patch
- Media:0026-gfx-Use-correct-function-to-create-a-SkPMColor-rathe.patch
- Media:0027-skia-Fix-testcases-to-use-SkPMColor-rather-than-SkCo.patch
- Media:0028-gfx-Convert-PMColor-to-Color-before-passing-it-to-BG.patch
- Media:0029-gfx-select-JPEG-color-space-in-an-endian-neutral-man.patch
- Media:0030-gfx-Fix-color-analysis-on-big-endian.patch
- Media:0031-sandbox-Fix-SECCOMP_-_-LM-SB_IDX-for-ppc64.patch
- Media:0032-media-renderers-Fix-component-order-test-to-check-by.patch
- Media:0033-media-ffmpeg-Remove-error-on-endianness.patch
- Media:0034-media-formats-mp4-Fix-endian-dependent-code-in-OpusS.patch
- Media:0035-skia-Select-BGRA-component-order-on-big-endian.patch
- Media:0036-base-allocator-Correctly-terminate-the-freelist.patch
- Media:0037-chromedriver-Add-some-missing-byteswaps.patch
- Boringssl repository
- Media:0001-Add-ppc64-big-endian-to-base.h.patch
- Media:0002-bn-Fix-I-O-on-big-endian.patch
- Media:0003-Fix-ECDSA-on-big-endian.patch
- Media:0004-asn1-Remove-swap-in-ASN1_INTEGER_set_uint64-for-big-.patch
- Media:0005-fipsmodule-Remove-unneeded-swaps-on-big-endian.patch
- Media:0006-polyval-change-order-of-swap-and-shift-in-reverse_an.patch
- Media:0007-Fix-poly1305-on-big-endian.patch
- Media:0008-Fix-curve25519-on-big-endian.patch
- Media:0009-Fix-scrypt-on-big-endian.patch
- Media:0010-Fix-chacha20-on-big-endian.patch
- Media:0011-Fix-aes-gcm-siv-on-big-endian.patch
- Media:0012-Fixed-last-failing-test-on-big-endian.patch
- Skia repository
- Media:0001-SkJSON-Fix-tagged-value-implementation-for-big-endia.patch
- Media:0002-SkCodevPriv-Add-missing-include-of-SkEndian.h.patch
- Media:0003-portable-blit_row_s32a_opaque-Respect-SK_A32_SHIFT.patch
- Media:0004-skcms-skip-swap-in-read_big_u-16-32-on-BE.patch
- Media:0005-skcms-Handle-endianness-in-transform-code.patch
- Media:0006-SkRasterPipeline_opts-Handle-endianness-in-32-bit-pi.patch
- Media:0007-SkPixmap-Fix-getColor-on-pixmaps-with-non-premul-alp.patch
- Media:0008-images-Fix-scanline-transformation-functions-on-BE.patch
- Media:0009-skcms-skip-swap-in-eval_curve-on-BE.patch
- Media:0010-SkColor-Fix-conversion-between-SkColor4f-and-SkColor.patch
- Media:0011-Remove-some-endianness-asserts.patch
- Media:0012-SkGradientShaderBase-Fix-unportable-conversion-to-Sk.patch
- Perfetto repository
- Ffmpeg repository
- Webrtc repository
- flatbuffers repository