From 5ead7e1e84da8ee6657047f7ae0969dde44123c9 Mon Sep 17 00:00:00 2001 From: Leon Scroggins Date: Wed, 28 Apr 2021 13:41:38 -0400 Subject: [PATCH] Update version of libjpeg-turbo used by Skia's test infra libjpeg-turbo recently released 2.1, and Chromium is now using that version. Update tests to use the same to verify everything works as expected. Update BUILD.gn Change-Id: I751fb376b4a532d740122f8a4acd0100c42f984e Reviewed-on: https://skia-review.googlesource.com/c/skia/+/402276 Commit-Queue: Leon Scroggins Auto-Submit: Leon Scroggins Reviewed-by: Derek Sollenberger --- DEPS | 2 +- third_party/libjpeg-turbo/BUILD.gn | 49 ++++++++++++++++-------------- 2 files changed, 28 insertions(+), 23 deletions(-) diff --git a/DEPS b/DEPS index f652a30bc3..04efc0bde2 100644 --- a/DEPS +++ b/DEPS @@ -28,7 +28,7 @@ deps = { "third_party/externals/icu" : "https://chromium.googlesource.com/chromium/deps/icu.git@dbd3825b31041d782c5b504c59dcfb5ac7dda08c", "third_party/externals/imgui" : "https://skia.googlesource.com/external/github.com/ocornut/imgui.git@9418dcb69355558f70de260483424412c5ca2fce", "third_party/externals/libgifcodec" : "https://skia.googlesource.com/libgifcodec@fd59fa92a0c86788dcdd84d091e1ce81eda06a77", - "third_party/externals/libjpeg-turbo" : "https://chromium.googlesource.com/chromium/deps/libjpeg_turbo.git@64fc43d52351ed52143208ce6a656c03db56462b", + "third_party/externals/libjpeg-turbo" : "https://chromium.googlesource.com/chromium/deps/libjpeg_turbo.git@24e310554f07c0fdb8ee52e3e708e4f3e9eb6e20", "third_party/externals/libpng" : "https://skia.googlesource.com/third_party/libpng.git@386707c6d19b974ca2e3db7f5c61873813c6fe44", "third_party/externals/libwebp" : "https://chromium.googlesource.com/webm/libwebp.git@fedac6cc69cda3e9e04b780d324cf03921fb3ff4", "third_party/externals/lua" : "https://skia.googlesource.com/external/github.com/lua/lua.git@e354c6355e7f48e087678ec49e340ca0696725b1", diff --git a/third_party/libjpeg-turbo/BUILD.gn b/third_party/libjpeg-turbo/BUILD.gn index 5abeef92c5..b342a22e96 100644 --- a/third_party/libjpeg-turbo/BUILD.gn +++ b/third_party/libjpeg-turbo/BUILD.gn @@ -83,30 +83,35 @@ if (skia_use_system_libjpeg_turbo) { "../externals/libjpeg-turbo/jutils.c", ] - if (current_cpu == "arm" && !is_win) { + if (!is_win && (current_cpu == "arm" || current_cpu == "arm64")) { + defines += [ "NEON_INTRINSICS" ] sources += [ - "../externals/libjpeg-turbo/simd/arm/arm/jsimd.c", - "../externals/libjpeg-turbo/simd/arm/arm/jsimd_neon.S", - "../externals/libjpeg-turbo/simd/arm/common/jcsample-neon.c", - "../externals/libjpeg-turbo/simd/arm/common/jdcolor-neon.c", - "../externals/libjpeg-turbo/simd/arm/common/jdmerge-neon.c", - "../externals/libjpeg-turbo/simd/arm/common/jdsample-neon.c", - "../externals/libjpeg-turbo/simd/arm/common/jidctfst-neon.c", - "../externals/libjpeg-turbo/simd/arm/common/jidctint-neon.c", - "../externals/libjpeg-turbo/simd/arm/common/jidctred-neon.c", - ] - } else if (current_cpu == "arm64" && !is_win) { - sources += [ - "../externals/libjpeg-turbo/simd/arm/arm64/jsimd.c", - "../externals/libjpeg-turbo/simd/arm/arm64/jsimd_neon.S", - "../externals/libjpeg-turbo/simd/arm/common/jcsample-neon.c", - "../externals/libjpeg-turbo/simd/arm/common/jdcolor-neon.c", - "../externals/libjpeg-turbo/simd/arm/common/jdmerge-neon.c", - "../externals/libjpeg-turbo/simd/arm/common/jdsample-neon.c", - "../externals/libjpeg-turbo/simd/arm/common/jidctfst-neon.c", - "../externals/libjpeg-turbo/simd/arm/common/jidctint-neon.c", - "../externals/libjpeg-turbo/simd/arm/common/jidctred-neon.c", + "../externals/libjpeg-turbo/simd/arm/jccolor-neon.c", + "../externals/libjpeg-turbo/simd/arm/jcgray-neon.c", + "../externals/libjpeg-turbo/simd/arm/jcphuff-neon.c", + "../externals/libjpeg-turbo/simd/arm/jcsample-neon.c", + "../externals/libjpeg-turbo/simd/arm/jdcolor-neon.c", + "../externals/libjpeg-turbo/simd/arm/jdmerge-neon.c", + "../externals/libjpeg-turbo/simd/arm/jdsample-neon.c", + "../externals/libjpeg-turbo/simd/arm/jfdctfst-neon.c", + "../externals/libjpeg-turbo/simd/arm/jfdctint-neon.c", + "../externals/libjpeg-turbo/simd/arm/jidctfst-neon.c", + "../externals/libjpeg-turbo/simd/arm/jidctint-neon.c", + "../externals/libjpeg-turbo/simd/arm/jidctred-neon.c", + "../externals/libjpeg-turbo/simd/arm/jquanti-neon.c", ] + include_dirs = [ "../externals/libjpeg-turbo/simd/arm" ] + if (current_cpu == "arm") { + sources += [ + "../externals/libjpeg-turbo/simd/arm/aarch32/jchuff-neon.c", + "../externals/libjpeg-turbo/simd/arm/aarch32/jsimd.c", + ] + } else if (current_cpu == "arm64") { + sources += [ + "../externals/libjpeg-turbo/simd/arm/aarch64/jchuff-neon.c", + "../externals/libjpeg-turbo/simd/arm/aarch64/jsimd.c", + ] + } } else { sources += [ "../externals/libjpeg-turbo/jsimd_none.c" ] }