Index: qtwebengine/src/3rdparty/chromium/skia/BUILD.gn
===================================================================
--- qtwebengine/src/3rdparty/chromium/skia/BUILD.gn (nonexistent)
+++ qtwebengine/src/3rdparty/chromium/skia/BUILD.gn (revision 5)
@@ -0,0 +1,1009 @@
+# Copyright (c) 2013 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/buildflag_header.gni")
+import("//build/config/compiler/compiler.gni")
+import("//build/config/features.gni")
+import("//build/config/freetype/freetype.gni")
+import("//build/config/sanitizers/sanitizers.gni")
+import("//gpu/vulkan/features.gni")
+import("//printing/buildflags/buildflags.gni")
+import("//testing/test.gni")
+import("//third_party/libgifcodec/libgifcodec.gni")
+import("//third_party/skia/gn/shared_sources.gni")
+import("//third_party/skia/third_party/skcms/skcms.gni")
+import("//tools/grit/grit_rule.gni")
+import("features.gni")
+
+if (current_cpu == "arm") {
+ import("//build/config/arm.gni")
+}
+if (current_cpu == "mipsel" || current_cpu == "mips64el") {
+ import("//build/config/mips.gni")
+}
+
+skia_support_gpu = !is_ios
+skia_support_pdf = !is_ios && enable_basic_printing
+skia_support_skottie = true
+
+declare_args() {
+ enable_skia_wuffs_gif = false
+}
+
+# Generate a buildflag header for compile-time checking of Dawn support.
+buildflag_header("buildflags") {
+ header = "buildflags.h"
+ flags = [ "SKIA_USE_DAWN=$skia_use_dawn" ]
+}
+
+# External-facing config for dependent code.
+config("skia_config") {
+ defines = []
+ include_dirs = [ "//third_party/skia" ]
+
+ if (!is_ios) {
+ if (enable_skia_wuffs_gif) {
+ defines += [ "SK_FAVOR_WUFFS_V_0_3_OVER_V_0_2" ]
+ include_dirs += [ "//third_party/wuffs/src/release/c" ]
+ } else {
+ include_dirs += [ "//third_party/libgifcodec" ]
+ }
+ }
+ if (enable_vulkan) {
+ include_dirs += [ "//third_party/vulkan/include" ]
+ configs = [ "//third_party/vulkan_headers:vulkan_headers_config" ]
+ }
+
+ defines += [
+ "SK_CODEC_DECODES_PNG",
+ "SK_CODEC_DECODES_WEBP",
+ "SK_ENCODE_PNG",
+ "SK_ENCODE_WEBP",
+ "SK_USER_CONFIG_HEADER=\"../../skia/config/SkUserConfig.h\"",
+ ]
+
+ if (skia_use_gl) {
+ defines += [ "SK_GL" ]
+ }
+
+ if (!is_ios) {
+ defines += [
+ "SK_CODEC_DECODES_JPEG",
+ "SK_ENCODE_JPEG",
+ ]
+ if (enable_skia_wuffs_gif) {
+ defines += [ "SK_HAS_WUFFS_LIBRARY" ]
+ } else {
+ defines += [ "SK_USE_LIBGIFCODEC" ]
+ }
+ }
+ if (enable_vulkan) {
+ defines += [
+ "SK_VULKAN_HEADER=\"../../skia/config/SkVulkanConfig.h\"",
+ "SK_VULKAN=1",
+ ]
+ }
+ if (skia_use_dawn) {
+ defines += [ "SK_DAWN" ]
+ }
+
+ if (is_component_build) {
+ defines += [ "SKIA_DLL" ]
+ if (is_win) {
+ defines += [ "SKCMS_API=__declspec(dllexport)" ]
+ } else {
+ defines += [ "SKCMS_API=__attribute__((visibility(\"default\")))" ]
+ }
+ }
+
+ if (skia_support_gpu) {
+ workaround_header = "gpu/config/gpu_driver_bug_workaround_autogen.h"
+ defines += [
+ "SK_SUPPORT_GPU=1",
+ "SK_GPU_WORKAROUNDS_HEADER=\"$workaround_header\"",
+ ]
+ } else {
+ defines += [ "SK_SUPPORT_GPU=0" ]
+ }
+
+ if (is_android) {
+ defines += [
+ "SK_BUILD_FOR_ANDROID",
+ "USE_CHROMIUM_SKIA",
+ ]
+ }
+
+ if (is_mac) {
+ defines += [
+ "SK_BUILD_FOR_MAC",
+ "SK_METAL",
+ ]
+ }
+
+ if (is_win) {
+ defines += [ "GR_GL_FUNCTION_TYPE=__stdcall" ]
+ }
+}
+
+# Internal-facing config for Skia library code.
+config("skia_library_config") {
+ defines = []
+
+ if (!is_ios && !use_system_freetype) {
+ defines += [ "SK_FREETYPE_MINIMUM_RUNTIME_VERSION=(((FREETYPE_MAJOR) * 0x01000000) | ((FREETYPE_MINOR) * 0x00010000) | ((FREETYPE_PATCH) * 0x00000100))" ]
+ }
+
+ defines += [ "SKIA_IMPLEMENTATION=1" ]
+
+ if (current_cpu == "arm") {
+ if (arm_use_neon) {
+ defines += [ "SK_ARM_HAS_NEON" ]
+ } else if (arm_optionally_use_neon) {
+ defines += [ "SK_ARM_HAS_OPTIONAL_NEON" ]
+ }
+ }
+
+ # Settings for text blitting, chosen to approximate the system browser.
+ if (is_linux || is_chromeos) {
+ defines += [
+ "SK_GAMMA_EXPONENT=1.2",
+ "SK_GAMMA_CONTRAST=0.2",
+ ]
+ } else if (is_android) {
+ defines += [
+ "SK_GAMMA_APPLY_TO_A8",
+ "SK_GAMMA_EXPONENT=1.4",
+ "SK_GAMMA_CONTRAST=0.0",
+ ]
+ } else if (is_win) {
+ defines += [
+ "SK_GAMMA_SRGB",
+ "SK_GAMMA_CONTRAST=0.5",
+ ]
+ } else if (is_mac) {
+ defines += [
+ "SK_GAMMA_SRGB",
+ "SK_GAMMA_CONTRAST=0.0",
+ ]
+ }
+
+ if (is_android) {
+ defines += [
+ # Android devices are typically more memory constrained, so default to a
+ # smaller glyph cache (it may be overriden at runtime when the renderer
+ # starts up, depending on the actual device memory).
+ "SK_DEFAULT_FONT_CACHE_LIMIT=1048576", # 1024 * 1024
+ ]
+ } else {
+ defines += [ "SK_DEFAULT_FONT_CACHE_LIMIT=20971520" ] # 20 * 1024 * 1024
+ }
+
+ if (is_win) {
+ defines += [
+ # On windows, GDI handles are a scarse system-wide resource so we have to
+ # keep the glyph cache, which holds up to 4 GDI handles per entry, to a
+ # fairly small size. http://crbug.com/314387
+ "SK_DEFAULT_FONT_CACHE_COUNT_LIMIT=256",
+ ]
+
+ cflags = [
+ "/wd4244", # conversion from 'type1( __int64)' to 'type2 (unsigned int)'
+ "/wd4267", # conversion from 'size_t' (64 bit) to 'type'(32 bit).
+ "/wd4341", # signed value is out of range for enum constant.
+ "/wd4345", # Object is default-initialized if initialization is omitted.
+ "/wd4390", # ';'empty statement found in looping;is it what was intended?
+ "/wd4554", # 'operator' : check operator precedence for possible error
+ "/wd4748", # compiler will disable optimizations if a function has inline
+ # assembly code contains flow control(jmp or jcc) statements.
+
+ "/wd4800", # forcing value to bool 'true/false'(assigning int to bool).
+ "/wd5041", # out-of-line definition for constexpr static data member is
+ # not needed and is deprecated in C++17
+ ]
+ cflags_cc = [ "/std:c++17" ]
+ } else {
+ cflags_cc = [ "-std=c++17" ]
+ cflags_objcc = [ "-std=c++17" ]
+ }
+}
+
+source_set("skcms") {
+ cflags = []
+ if (!is_win || is_clang) {
+ cflags += [
+ "-w",
+ "-std=c11",
+ ]
+ }
+
+ # LLVM automatically sets the equivalent of GCC's -mfp16-format=ieee on ARM
+ # builds by default, while GCC itself does not. We need it to enable support
+ # for half-precision floating point data types used by SKCMS on ARM.
+ if ((is_linux || is_chromeos) && !is_clang && current_cpu == "arm") {
+ cflags += [ "-mfp16-format=ieee" ]
+ }
+
+ public = [ "//third_party/skia/include/third_party/skcms/skcms.h" ]
+ include_dirs = [ "//third_party/skia/include/third_party/skcms" ]
+ sources =
+ rebase_path(skcms_sources, ".", "//third_party/skia/third_party/skcms")
+}
+
+component("skia") {
+ deps = []
+ sources = [
+ # Chrome sources.
+ "config/SkUserConfig.h",
+ "config/sk_ref_cnt_ext_debug.h",
+ "config/sk_ref_cnt_ext_release.h",
+ "ext/SkDiscardableMemory_chrome.cc",
+ "ext/SkDiscardableMemory_chrome.h",
+ "ext/SkMemory_new_handler.cpp",
+ "ext/benchmarking_canvas.cc",
+ "ext/benchmarking_canvas.h",
+ "ext/convolver.cc",
+ "ext/convolver.h",
+ "ext/event_tracer_impl.cc",
+ "ext/event_tracer_impl.h",
+ "ext/google_logging.cc",
+ "ext/image_operations.cc",
+ "ext/image_operations.h",
+ "ext/opacity_filter_canvas.cc",
+ "ext/opacity_filter_canvas.h",
+ "ext/recursive_gaussian_convolution.cc",
+ "ext/recursive_gaussian_convolution.h",
+ "ext/skia_histogram.cc",
+ "ext/skia_histogram.h",
+ "ext/skia_memory_dump_provider.cc",
+ "ext/skia_memory_dump_provider.h",
+ "ext/skia_trace_memory_dump_impl.cc",
+ "ext/skia_trace_memory_dump_impl.h",
+ "ext/skia_utils_base.cc",
+ "ext/skia_utils_base.h",
+ ]
+ if (!is_apple) {
+ sources += [
+ "ext/fontmgr_default.cc",
+ "ext/fontmgr_default.h",
+ ]
+ }
+ if (is_android) {
+ sources += [ "ext/fontmgr_default_android.cc" ]
+ }
+ if (is_linux || is_chromeos) {
+ sources += [ "ext/fontmgr_default_linux.cc" ]
+ }
+ if (is_ios) {
+ sources += [
+ "ext/skia_utils_ios.h",
+ "ext/skia_utils_ios.mm",
+ ]
+ }
+ if (is_mac) {
+ sources += [
+ "ext/skia_utils_mac.h",
+ "ext/skia_utils_mac.mm",
+ ]
+ }
+ if (is_win) {
+ sources += [
+ "ext/fontmgr_default_win.cc",
+ "ext/skia_utils_win.cc",
+ "ext/skia_utils_win.h",
+ ]
+ }
+
+ if (!is_ios) {
+ sources += [
+ "ext/platform_canvas.cc",
+ "ext/platform_canvas.h",
+ ]
+ }
+ if (!is_ios && (current_cpu == "x86" || current_cpu == "x64")) {
+ sources += [
+ "ext/convolver_SSE2.cc",
+ "ext/convolver_SSE2.h",
+ ]
+ } else if (current_cpu == "mipsel" && mips_dsp_rev >= 2) {
+ sources += [
+ "ext/convolver_mips_dspr2.cc",
+ "ext/convolver_mips_dspr2.h",
+ ]
+ } else if (current_cpu == "arm" || current_cpu == "arm64") {
+ if (arm_use_neon) {
+ sources += [
+ "ext/convolver_neon.cc",
+ "ext/convolver_neon.h",
+ ]
+ }
+ }
+
+ if (is_win) {
+ sources += [
+ # Select the right BitmapPlatformDevice.
+ "ext/raster_handle_allocator_win.cc",
+ ]
+ }
+
+ # The *_public variables should be added to 'public' not 'sources'.
+ # However, Skia does not export enough *_public variables to make Chromium
+ # 'gn check' clean. Until that can be done add the *_public variables to
+ # 'sources' so that the buildbot 'analyze' step is aware of their existence.
+ sources += skia_core_public
+ sources += skia_utils_public
+ sources += skia_effects_public
+ sources += skia_effects_imagefilter_public
+
+ # The imported Skia gni source paths are made absolute by gn.
+ defines = skia_core_defines
+ sources += skia_sksl_sources
+ sources += skia_utils_sources
+ sources += skia_xps_sources
+ sources += [
+ "//third_party/skia/src/fonts/SkFontMgr_indirect.cpp",
+ "//third_party/skia/src/fonts/SkRemotableFontMgr.cpp",
+ "//third_party/skia/src/images/SkImageEncoder.cpp",
+ "//third_party/skia/src/images/SkPngEncoder.cpp",
+ "//third_party/skia/src/images/SkWebpEncoder.cpp",
+ "//third_party/skia/src/ports/SkGlobalInitialization_default.cpp",
+ "//third_party/skia/src/ports/SkImageGenerator_none.cpp",
+ "//third_party/skia/src/ports/SkOSFile_stdio.cpp",
+ "//third_party/skia/src/sfnt/SkOTTable_name.cpp",
+ "//third_party/skia/src/sfnt/SkOTUtils.cpp",
+ ]
+ if (!is_ios) {
+ sources -= [ "//third_party/skia/src/ports/SkImageGenerator_none.cpp" ]
+ sources += [
+ "//third_party/skia/src/codec/SkBmpBaseCodec.cpp",
+ "//third_party/skia/src/codec/SkBmpCodec.cpp",
+ "//third_party/skia/src/codec/SkBmpMaskCodec.cpp",
+ "//third_party/skia/src/codec/SkBmpRLECodec.cpp",
+ "//third_party/skia/src/codec/SkBmpStandardCodec.cpp",
+ "//third_party/skia/src/codec/SkCodec.cpp",
+ "//third_party/skia/src/codec/SkCodecImageGenerator.cpp",
+ "//third_party/skia/src/codec/SkColorTable.cpp",
+ "//third_party/skia/src/codec/SkEncodedInfo.cpp",
+ "//third_party/skia/src/codec/SkIcoCodec.cpp",
+ "//third_party/skia/src/codec/SkJpegCodec.cpp",
+ "//third_party/skia/src/codec/SkJpegDecoderMgr.cpp",
+ "//third_party/skia/src/codec/SkJpegUtility.cpp",
+ "//third_party/skia/src/codec/SkMaskSwizzler.cpp",
+ "//third_party/skia/src/codec/SkMasks.cpp",
+ "//third_party/skia/src/codec/SkParseEncodedOrigin.cpp",
+ "//third_party/skia/src/codec/SkPngCodec.cpp",
+ "//third_party/skia/src/codec/SkSampler.cpp",
+ "//third_party/skia/src/codec/SkStreamBuffer.cpp",
+ "//third_party/skia/src/codec/SkSwizzler.cpp",
+ "//third_party/skia/src/codec/SkWbmpCodec.cpp",
+ "//third_party/skia/src/codec/SkWebpCodec.cpp",
+ "//third_party/skia/src/images/SkJPEGWriteUtility.cpp",
+ "//third_party/skia/src/images/SkJpegEncoder.cpp",
+ "//third_party/skia/src/ports/SkImageGenerator_skia.cpp",
+ ]
+
+ if (enable_skia_wuffs_gif) {
+ deps += [ "//third_party/wuffs" ]
+ sources += [ "//third_party/skia/src/codec/SkWuffsCodec.cpp" ]
+ } else {
+ sources += rebase_path(libgifcodec_sources + libgifcodec_public,
+ ".",
+ "//third_party/libgifcodec")
+ }
+ }
+
+ if (current_cpu == "arm") {
+ sources += [ "//third_party/skia/src/core/SkUtilsArm.cpp" ]
+ }
+
+ # Remove unused util sources.
+ sources -= [
+ "//third_party/skia/src/utils/SkInterpolator.cpp",
+ "//third_party/skia/src/utils/SkParsePath.cpp",
+ ]
+
+ if (is_win) {
+ sources -= [
+ # Keeping _win.cpp
+ "//third_party/skia/src/utils/SkThreadUtils_pthread.cpp",
+ ]
+ libs = [ "fontsub.lib" ]
+ } else {
+ sources -= [
+ # Keeping _pthread.cpp
+ "//third_party/skia/src/utils/SkThreadUtils_win.cpp",
+ ]
+ }
+
+ # need separate win section to handle chromes auto gn filter
+ # (build/config/BUILDCONFIG.gn)
+ if (is_win) {
+ sources -= [
+ #windows
+ "//third_party/skia/src/utils/win/SkWGL_win.cpp",
+ ]
+ }
+
+ # Select Skia ports.
+
+ # FreeType is needed everywhere (except on iOS), on Linux and Android as main
+ # font backend, on Windows and Mac as fallback backend for Variations.
+ if (!is_ios) {
+ sources += [
+ "//third_party/skia/src/ports/SkFontHost_FreeType.cpp",
+ "//third_party/skia/src/ports/SkFontHost_FreeType_common.cpp",
+ ]
+ }
+
+ if (is_win) {
+ sources += [
+ "//third_party/skia/src/ports/SkFontHost_win.cpp",
+ "//third_party/skia/src/ports/SkFontMgr_win_dw.cpp",
+ "//third_party/skia/src/ports/SkOSFile_win.cpp",
+ "//third_party/skia/src/ports/SkRemotableFontMgr_win_dw.cpp",
+ "//third_party/skia/src/ports/SkScalerContext_win_dw.cpp",
+ "//third_party/skia/src/ports/SkTLS_win.cpp",
+ "//third_party/skia/src/ports/SkTypeface_win_dw.cpp",
+ ]
+ } else {
+ sources += [
+ "//third_party/skia/src/ports/SkOSFile_posix.cpp",
+ "//third_party/skia/src/ports/SkTLS_pthread.cpp",
+ ]
+ }
+
+ if (is_apple) {
+ sources += [
+ "//third_party/skia/include/ports/SkFontMgr_mac_ct.h",
+ "//third_party/skia/src/ports/SkFontMgr_mac_ct.cpp",
+ "//third_party/skia/src/ports/SkFontMgr_mac_ct_factory.cpp",
+ "//third_party/skia/src/ports/SkScalerContext_mac_ct.cpp",
+ "//third_party/skia/src/ports/SkScalerContext_mac_ct.h",
+ "//third_party/skia/src/ports/SkTypeface_mac_ct.cpp",
+ "//third_party/skia/src/ports/SkTypeface_mac_ct.h",
+ ]
+ }
+
+ if (is_linux || is_chromeos) {
+ sources += [
+ "//third_party/skia/src/ports/SkFontConfigInterface.cpp",
+ "//third_party/skia/src/ports/SkFontConfigInterface_direct.cpp",
+ "//third_party/skia/src/ports/SkFontConfigInterface_direct_factory.cpp",
+ "//third_party/skia/src/ports/SkFontMgr_FontConfigInterface.cpp",
+ ]
+ }
+
+ if (is_linux || is_chromeos || is_android) {
+ sources += [
+ # Retain the files for the SkFontMgr_Android on linux to emulate android
+ # fonts. See content/zygote/zygote_main_linux.cc
+ # Note that this requires expat.
+ "//third_party/skia/src/ports/SkFontMgr_android.cpp",
+ "//third_party/skia/src/ports/SkFontMgr_android_parser.cpp",
+ ]
+ }
+
+ if (is_win || is_mac) {
+ sources += [
+ # Add the FreeType custom font manager as a fallback backend for variable fonts.
+ "//third_party/skia/src/ports/SkFontMgr_custom.cpp",
+ "//third_party/skia/src/ports/SkFontMgr_custom_empty.cpp",
+ ]
+ }
+
+ if (is_fuchsia) {
+ sources += [
+ "//third_party/skia/src/ports/SkFontMgr_custom.cpp",
+ "//third_party/skia/src/ports/SkFontMgr_fuchsia.cpp",
+ "ext/fontmgr_default_fuchsia.cc",
+ ]
+ deps += [
+ "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.fonts",
+ "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.io",
+ "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.sys",
+ "//third_party/fuchsia-sdk/sdk/pkg/sys_cpp",
+ "//third_party/fuchsia-sdk/sdk/pkg/zx",
+ "//third_party/icu:icuuc",
+ ]
+ }
+
+ if (is_clang && !is_nacl) {
+ # Skia won't compile with some of the more strict clang warnings.
+ # e.g. it does:
+ # SkASSERT(!"sk_out_of_memory");
+ configs -= [ "//build/config/clang:extra_warnings" ]
+ }
+
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ ":skia_config",
+ ":skia_library_config",
+ "//build/config/compiler:no_chromium_code",
+ ]
+ public_configs = [ ":skia_config" ]
+
+ deps += [
+ ":skcms",
+ ":skia_opts",
+ "//base",
+ "//base/third_party/dynamic_annotations",
+ "//third_party/libpng",
+ "//third_party/libwebp",
+ "//third_party/libwebp:libwebp_webp",
+ ]
+ public_deps = [
+ ":buildflags",
+ ":skia_core_and_effects",
+ ]
+ if (skia_use_dawn) {
+ public_deps += [ "//third_party/dawn/src/dawn:dawncpp_headers" ]
+ deps += [
+ "//third_party/dawn/src/dawn:dawn_proc",
+ "//third_party/dawn/src/dawn:dawncpp",
+ "//third_party/dawn/src/dawn_native",
+ ]
+ }
+
+ if (!is_ios) {
+ deps += [
+ "//build/config/freetype",
+ "//third_party:jpeg",
+ ]
+ }
+
+ if (is_linux || is_chromeos) {
+ deps += [
+ "//third_party/expat",
+ "//third_party/fontconfig",
+ "//third_party/icu:icuuc",
+ ]
+ }
+
+ if (is_android) {
+ deps += [
+ "//third_party/android_ndk:cpu_features",
+ "//third_party/expat",
+ ]
+ }
+
+ if (!is_debug) {
+ configs -= [ "//build/config/compiler:default_optimization" ]
+ configs += [ "//build/config/compiler:optimize_max" ]
+ }
+
+ if (is_mac) {
+ deps += [ ":skia_metal" ]
+ defines += [ "SK_METAL" ]
+ frameworks = [
+ "AppKit.framework",
+ "CoreFoundation.framework",
+ "CoreGraphics.framework",
+ "CoreText.framework",
+ "Metal.framework",
+ "Foundation.framework",
+ ]
+ }
+ if (skia_use_dawn) {
+ sources += skia_dawn_sources
+ }
+ if (is_ios) {
+ frameworks = [ "ImageIO.framework" ]
+ }
+
+ if (is_fuchsia) {
+ deps += [ "//third_party/expat" ]
+ }
+
+ if (skia_support_gpu) {
+ sources += skia_gpu_sources
+ sources += skia_null_gpu_sources
+ sources += skia_sksl_gpu_sources
+ if (skia_use_gl) {
+ sources += skia_gl_gpu_sources
+ }
+ if (enable_vulkan) {
+ sources += skia_vk_sources
+ }
+ deps += [ "//gpu/config:workaround_list" ]
+ }
+
+ if (skia_support_pdf) {
+ deps += [
+ "//third_party:freetype_harfbuzz",
+ "//third_party/zlib",
+ ]
+ sources += skia_pdf_sources
+ } else {
+ sources += [ "//third_party/skia/src/pdf/SkDocument_PDF_None.cpp" ]
+ }
+
+ if (skia_support_skottie) {
+ import("//third_party/skia/modules/skottie/skottie.gni")
+ import("//third_party/skia/modules/skresources/skresources.gni")
+ import("//third_party/skia/modules/sksg/sksg.gni")
+ import("//third_party/skia/modules/skshaper/skshaper.gni")
+ sources += skia_skottie_sources + skia_skottie_public
+ sources += skia_skresources_sources
+ sources += skia_sksg_sources
+ sources += skia_shaper_primitive_sources
+ }
+}
+
+# Template for things that are logically part of :skia, but need to be split out
+# so custom compile flags can be applied.
+#
+# These are all opted out of check_includes, due to (logically) being part of
+# skia.
+template("skia_source_set") {
+ source_set(target_name) {
+ forward_variables_from(invoker, "*")
+
+ check_includes = false
+
+ if (!is_debug) {
+ configs -= [ "//build/config/compiler:default_optimization" ]
+ configs += [ "//build/config/compiler:optimize_max" ]
+ }
+
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ ":skia_config",
+ ":skia_library_config",
+ "//build/config/compiler:no_chromium_code",
+ ]
+ public_configs = [ ":skia_config" ]
+
+ # Android, the only user of mismatched sample files (for now), gets a small
+ # binary size decrease by using AFDO to optimize for size in these
+ # source_sets. However, that also comes at a relatively big performance
+ # cost.
+ if (using_mismatched_sample_profile) {
+ configs -= [ "//build/config/compiler:afdo_optimize_size" ]
+ }
+ if (is_win) {
+ cflags_cc = [
+ "/std:c++17",
+ "/wd5041", # out-of-line definition for constexpr static data member is
+ # not needed and is deprecated in C++17
+ ]
+ } else {
+ cflags_cc = [ "-std=c++17" ]
+ }
+ }
+}
+
+# Split out for targeted removal of the afdo_optimize_size config on Android.
+skia_source_set("skia_core_and_effects") {
+ defines = skia_core_defines
+ sources = skia_core_sources
+ sources += skia_effects_sources
+ sources += skia_effects_imagefilter_sources
+ if (skia_support_gpu) {
+ deps = [ "//gpu/config:workaround_list" ]
+ }
+ if (skia_use_dawn) {
+ deps += [ "//third_party/dawn/src/dawn:dawncpp_headers" ]
+ }
+
+ visibility = [ ":skia" ]
+}
+
+# Bits that involve special vector-y hardware.
+if (current_cpu == "arm64") {
+ skia_source_set("skia_opts_crc32") {
+ sources = skia_opts.crc32_sources
+ cflags = [ "-march=armv8-a+crc" ]
+ visibility = [ ":skia_opts" ]
+ }
+}
+if (current_cpu == "x86" || current_cpu == "x64") {
+ skia_source_set("skia_opts_sse3") {
+ sources = skia_opts.ssse3_sources
+ if (!is_win || is_clang) {
+ cflags = [ "-mssse3" ]
+ }
+ if (is_win) {
+ defines = [ "SK_CPU_SSE_LEVEL=31" ]
+ }
+ visibility = [ ":skia_opts" ]
+ }
+ skia_source_set("skia_opts_sse41") {
+ sources = skia_opts.sse41_sources
+ if (!is_win || is_clang) {
+ cflags = [ "-msse4.1" ]
+ }
+ if (is_win) {
+ defines = [ "SK_CPU_SSE_LEVEL=41" ]
+ }
+ visibility = [ ":skia_opts" ]
+ }
+ skia_source_set("skia_opts_sse42") {
+ sources = skia_opts.sse42_sources
+ if (!is_win || is_clang) {
+ cflags = [ "-msse4.2" ]
+ }
+ if (is_win) {
+ defines = [ "SK_CPU_SSE_LEVEL=42" ]
+ }
+ visibility = [ ":skia_opts" ]
+ }
+ skia_source_set("skia_opts_avx") {
+ sources = skia_opts.avx_sources
+ if (!is_win) {
+ cflags = [ "-mavx" ]
+ }
+ if (is_win) {
+ cflags = [ "/arch:AVX" ]
+ }
+ visibility = [ ":skia_opts" ]
+ }
+ skia_source_set("skia_opts_hsw") {
+ sources = skia_opts.hsw_sources
+ if (!is_win) {
+ cflags = [
+ "-mavx2",
+ "-mbmi",
+ "-mbmi2",
+ "-mf16c",
+ "-mfma",
+ ]
+ }
+ if (is_win) {
+ cflags = [ "/arch:AVX2" ]
+ }
+ visibility = [ ":skia_opts" ]
+ }
+ skia_source_set("skia_opts_skx") {
+ sources = skia_opts.skx_sources
+ if (!is_win) {
+ cflags = [ "-march=skylake-avx512" ]
+ }
+ if (is_win) {
+ cflags = [ "/arch:AVX512" ]
+ }
+ visibility = [ ":skia_opts" ]
+ }
+}
+
+skia_source_set("skia_opts") {
+ cflags = []
+ defines = []
+
+ deps = [ "//base" ]
+
+ if (current_cpu == "x86" || current_cpu == "x64") {
+ sources = skia_opts.sse2_sources
+ deps += [
+ ":skia_opts_avx",
+ ":skia_opts_hsw",
+ ":skia_opts_skx",
+ ":skia_opts_sse3",
+ ":skia_opts_sse41",
+ ":skia_opts_sse42",
+ ]
+ } else if (current_cpu == "arm") {
+ # The assembly uses the frame pointer register (r7 in Thumb/r11 in
+ # ARM), the compiler doesn't like that.
+ if (!is_ios) {
+ cflags += [ "-fomit-frame-pointer" ]
+ }
+
+ if (arm_version >= 7) {
+ sources = skia_opts.armv7_sources
+ if (arm_use_neon || arm_optionally_use_neon) {
+ sources += skia_opts.neon_sources
+
+ # Root build config sets -mfpu=$arm_fpu, which we expect to be neon
+ # when running this.
+# if (!arm_use_neon) {
+# configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
+# cflags += [ "-mfpu=neon" ]
+# }
+ }
+ } else {
+ sources = skia_opts.none_sources
+ }
+ } else if (current_cpu == "arm64") {
+ sources = skia_opts.arm64_sources
+ deps += [ ":skia_opts_crc32" ]
+ } else if (current_cpu == "mipsel") {
+ cflags += [ "-fomit-frame-pointer" ]
+
+ if (mips_dsp_rev >= 1) {
+ sources = skia_opts.mips_dsp_sources
+ } else {
+ sources = skia_opts.none_sources
+ }
+ } else if (current_cpu == "mips64el") {
+ cflags += [ "-fomit-frame-pointer" ]
+ sources = skia_opts.none_sources
+ } else if (current_cpu == "ppc64") {
+ sources = skia_opts.none_sources
+ } else if (current_cpu == "s390x") {
+ sources = skia_opts.none_sources
+ } else {
+ assert(false, "Need to port cpu specific stuff from skia_library_opts.gyp")
+ }
+
+ visibility = [ ":skia" ]
+}
+
+# Split out metal sources, because they require ARC.
+if (is_mac) {
+ skia_source_set("skia_metal") {
+ defines = [ "SK_METAL" ]
+ sources = skia_metal_sources
+ cflags_objcc = [
+ "-Wno-unguarded-availability",
+ "-fobjc-arc",
+ ]
+ deps = [ "//gpu/config:workaround_list" ]
+ if (skia_use_dawn) {
+ deps += [ "//third_party/dawn/src/dawn:dawncpp_headers" ]
+ }
+ }
+}
+
+# Font copies.
+if (is_fuchsia) {
+ copy("copy_fuchsia_fonts_manifest") {
+ sources = [ "ext/data/test_fonts/fuchsia_test_fonts_manifest.json" ]
+ outputs = [ "$root_out_dir/test_fonts/{{source_file_part}}" ]
+ }
+}
+if (is_apple) {
+ bundle_data("test_fonts_bundle_data") {
+ public_deps = [ "//third_party/test_fonts" ]
+
+ sources = [
+ "$root_out_dir/test_fonts/Ahem.ttf",
+ "ext/data/test_fonts/ChromiumAATTest.ttf",
+ ]
+
+ outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
+ }
+}
+
+group("test_fonts_resources") {
+ deps = []
+ data_deps = []
+
+ if (is_apple) {
+ deps += [ ":test_fonts_bundle_data" ]
+ data_deps += [ ":test_fonts_bundle_data" ]
+ } else {
+ deps += [ "//third_party/test_fonts" ]
+ data_deps += [ "//third_party/test_fonts" ]
+ }
+
+ if (is_fuchsia) {
+ deps += [ ":copy_fuchsia_fonts_manifest" ]
+ data_deps += [ ":copy_fuchsia_fonts_manifest" ]
+ }
+}
+
+source_set("test_fonts") {
+ testonly = true
+
+ sources = [ "ext/test_fonts.h" ]
+ deps = [
+ ":test_fonts_resources",
+ "//base/test:test_support",
+ "//skia",
+ ]
+
+ if (is_fuchsia) {
+ sources += [
+ "ext/test_fonts_fuchsia.cc",
+ "ext/test_fonts_fuchsia.h",
+ ]
+ deps += [
+ "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.fonts",
+ "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.io",
+ "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.sys",
+ "//third_party/fuchsia-sdk/sdk/pkg/sys_cpp",
+ ]
+ }
+ if (is_mac) {
+ sources += [ "ext/test_fonts_mac.mm" ]
+ }
+}
+
+test("skia_unittests") {
+ sources = [
+ "ext/convolver_unittest.cc",
+ "ext/image_operations_unittest.cc",
+ "ext/platform_canvas_unittest.cc",
+ "ext/recursive_gaussian_convolution_unittest.cc",
+ "ext/skia_memory_dump_provider_unittest.cc",
+ ]
+ if (is_ios) {
+ sources += [ "ext/skia_utils_ios_unittest.mm" ]
+ }
+ if (is_mac) {
+ sources += [ "ext/skia_utils_mac_unittest.mm" ]
+ }
+
+ if (!is_win) {
+ sources -= [ "ext/platform_canvas_unittest.cc" ]
+ }
+
+ deps = [
+ ":skia",
+ ":test_fonts",
+ "//base",
+ "//base/test:test_support",
+ "//mojo/core/test:run_all_unittests",
+ "//testing/gtest",
+ "//ui/gfx",
+ "//ui/gfx/geometry",
+ ]
+
+ if (!is_ios) {
+ sources += [ "public/mojom/test/mojom_traits_unittest.cc" ]
+ deps += [
+ "//mojo/public/cpp/bindings",
+ "//mojo/public/cpp/test_support:test_utils",
+ "//skia/public/mojom",
+ ]
+ }
+
+ if (is_fuchsia) {
+ sources += [ "ext/fontmgr_fuchsia_unittest.cc" ]
+ deps += [
+ "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.fonts",
+ "//third_party/test_fonts",
+ ]
+ data_deps = [ "//third_party/test_fonts" ]
+ }
+
+ if (skia_support_skottie) {
+ sources += [ "ext/skottie_unittest.cc" ]
+ }
+}
+
+if (!is_ios) {
+ executable("image_operations_bench") {
+ sources = [ "ext/image_operations_bench.cc" ]
+
+ deps = [
+ ":skia",
+ "//base",
+ "//build/win:default_exe_manifest",
+ ]
+ }
+
+ executable("filter_fuzz_stub") {
+ testonly = true
+ sources = [ "tools/filter_fuzz_stub/filter_fuzz_stub.cc" ]
+
+ deps = [
+ ":skia",
+ "//base",
+ "//base/test:test_support",
+ "//build/win:default_exe_manifest",
+ ]
+ }
+}
+
+group("fuzzers") {
+ deps = [ "//skia/tools/fuzzers" ]
+}
+
+grit("skia_resources") {
+ source = "skia_resources.grd"
+
+ outputs = [
+ "grit/skia_resources.h",
+ "grit/skia_resources_map.cc",
+ "grit/skia_resources_map.h",
+ "skia_resources.pak",
+ ]
+
+ grit_flags = [
+ "-E",
+ "root_gen_dir=" + rebase_path(root_gen_dir, root_build_dir),
+ ]
+
+ deps = [ "public/mojom:mojom_js" ]
+}
Index: qtwebengine/src/3rdparty/chromium/skia
===================================================================
--- qtwebengine/src/3rdparty/chromium/skia (nonexistent)
+++ qtwebengine/src/3rdparty/chromium/skia (revision 5)
Property changes on: qtwebengine/src/3rdparty/chromium/skia
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: qtwebengine/src/3rdparty/chromium/third_party/skia/src/utils/SkParseColor.cpp
===================================================================
--- qtwebengine/src/3rdparty/chromium/third_party/skia/src/utils/SkParseColor.cpp (nonexistent)
+++ qtwebengine/src/3rdparty/chromium/third_party/skia/src/utils/SkParseColor.cpp (revision 5)
@@ -0,0 +1,383 @@
+/*
+ * Copyright 2006 The Android Open Source Project
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+
+#include "include/utils/SkParse.h"
+
+#include <string>
+
+static constexpr const char* gColorNames[] = {
+ "aliceblue",
+ "antiquewhite",
+ "aqua",
+ "aquamarine",
+ "azure",
+ "beige",
+ "bisque",
+ "black",
+ "blanchedalmond",
+ "blue",
+ "blueviolet",
+ "brown",
+ "burlywood",
+ "cadetblue",
+ "chartreuse",
+ "chocolate",
+ "coral",
+ "cornflowerblue",
+ "cornsilk",
+ "crimson",
+ "cyan",
+ "darkblue",
+ "darkcyan",
+ "darkgoldenrod",
+ "darkgray",
+ "darkgreen",
+ "darkkhaki",
+ "darkmagenta",
+ "darkolivegreen",
+ "darkorange",
+ "darkorchid",
+ "darkred",
+ "darksalmon",
+ "darkseagreen",
+ "darkslateblue",
+ "darkslategray",
+ "darkturquoise",
+ "darkviolet",
+ "deeppink",
+ "deepskyblue",
+ "dimgray",
+ "dodgerblue",
+ "firebrick",
+ "floralwhite",
+ "forestgreen",
+ "fuchsia",
+ "gainsboro",
+ "ghostwhite",
+ "gold",
+ "goldenrod",
+ "gray",
+ "green",
+ "greenyellow",
+ "honeydew",
+ "hotpink",
+ "indianred",
+ "indigo",
+ "ivory",
+ "khaki",
+ "lavender",
+ "lavenderblush",
+ "lawngreen",
+ "lemonchiffon",
+ "lightblue",
+ "lightcoral",
+ "lightcyan",
+ "lightgoldenrodyellow",
+ "lightgreen",
+ "lightgrey",
+ "lightpink",
+ "lightsalmon",
+ "lightseagreen",
+ "lightskyblue",
+ "lightslategray",
+ "lightsteelblue",
+ "lightyellow",
+ "lime",
+ "limegreen",
+ "linen",
+ "magenta",
+ "maroon",
+ "mediumaquamarine",
+ "mediumblue",
+ "mediumorchid",
+ "mediumpurple",
+ "mediumseagreen",
+ "mediumslateblue",
+ "mediumspringgreen",
+ "mediumturquoise",
+ "mediumvioletred",
+ "midnightblue",
+ "mintcream",
+ "mistyrose",
+ "moccasin",
+ "navajowhite",
+ "navy",
+ "oldlace",
+ "olive",
+ "olivedrab",
+ "orange",
+ "orangered",
+ "orchid",
+ "palegoldenrod",
+ "palegreen",
+ "paleturquoise",
+ "palevioletred",
+ "papayawhip",
+ "peachpuff",
+ "peru",
+ "pink",
+ "plum",
+ "powderblue",
+ "purple",
+ "red",
+ "rosybrown",
+ "royalblue",
+ "saddlebrown",
+ "salmon",
+ "sandybrown",
+ "seagreen",
+ "seashell",
+ "sienna",
+ "silver",
+ "skyblue",
+ "slateblue",
+ "slategray",
+ "snow",
+ "springgreen",
+ "steelblue",
+ "tan",
+ "teal",
+ "thistle",
+ "tomato",
+ "turquoise",
+ "violet",
+ "wheat",
+ "white",
+ "whitesmoke",
+ "yellow",
+ "yellowgreen",
+};
+
+static constexpr struct ColorRec {
+ uint8_t r, g, b;
+} gColors[] = {
+ { 0xf0,0xf8,0xff }, // aliceblue
+ { 0xfa,0xeb,0xd7 }, // antiquewhite
+ { 0x00,0xff,0xff }, // aqua
+ { 0x7f,0xff,0xd4 }, // aquamarine
+ { 0xf0,0xff,0xff }, // azure
+ { 0xf5,0xf5,0xdc }, // beige
+ { 0xff,0xe4,0xc4 }, // bisque
+ { 0x00,0x00,0x00 }, // black
+ { 0xff,0xeb,0xcd }, // blanchedalmond
+ { 0x00,0x00,0xff }, // blue
+ { 0x8a,0x2b,0xe2 }, // blueviolet
+ { 0xa5,0x2a,0x2a }, // brown
+ { 0xde,0xb8,0x87 }, // burlywood
+ { 0x5f,0x9e,0xa0 }, // cadetblue
+ { 0x7f,0xff,0x00 }, // chartreuse
+ { 0xd2,0x69,0x1e }, // chocolate
+ { 0xff,0x7f,0x50 }, // coral
+ { 0x64,0x95,0xed }, // cornflowerblue
+ { 0xff,0xf8,0xdc }, // cornsilk
+ { 0xdc,0x14,0x3c }, // crimson
+ { 0x00,0xff,0xff }, // cyan
+ { 0x00,0x00,0x8b }, // darkblue
+ { 0x00,0x8b,0x8b }, // darkcyan
+ { 0xb8,0x86,0x0b }, // darkgoldenrod
+ { 0xa9,0xa9,0xa9 }, // darkgray
+ { 0x00,0x64,0x00 }, // darkgreen
+ { 0xbd,0xb7,0x6b }, // darkkhaki
+ { 0x8b,0x00,0x8b }, // darkmagenta
+ { 0x55,0x6b,0x2f }, // darkolivegreen
+ { 0xff,0x8c,0x00 }, // darkorange
+ { 0x99,0x32,0xcc }, // darkorchid
+ { 0x8b,0x00,0x00 }, // darkred
+ { 0xe9,0x96,0x7a }, // darksalmon
+ { 0x8f,0xbc,0x8f }, // darkseagreen
+ { 0x48,0x3d,0x8b }, // darkslateblue
+ { 0x2f,0x4f,0x4f }, // darkslategray
+ { 0x00,0xce,0xd1 }, // darkturquoise
+ { 0x94,0x00,0xd3 }, // darkviolet
+ { 0xff,0x14,0x93 }, // deeppink
+ { 0x00,0xbf,0xff }, // deepskyblue
+ { 0x69,0x69,0x69 }, // dimgray
+ { 0x1e,0x90,0xff }, // dodgerblue
+ { 0xb2,0x22,0x22 }, // firebrick
+ { 0xff,0xfa,0xf0 }, // floralwhite
+ { 0x22,0x8b,0x22 }, // forestgreen
+ { 0xff,0x00,0xff }, // fuchsia
+ { 0xdc,0xdc,0xdc }, // gainsboro
+ { 0xf8,0xf8,0xff }, // ghostwhite
+ { 0xff,0xd7,0x00 }, // gold
+ { 0xda,0xa5,0x20 }, // goldenrod
+ { 0x80,0x80,0x80 }, // gray
+ { 0x00,0x80,0x00 }, // green
+ { 0xad,0xff,0x2f }, // greenyellow
+ { 0xf0,0xff,0xf0 }, // honeydew
+ { 0xff,0x69,0xb4 }, // hotpink
+ { 0xcd,0x5c,0x5c }, // indianred
+ { 0x4b,0x00,0x82 }, // indigo
+ { 0xff,0xff,0xf0 }, // ivory
+ { 0xf0,0xe6,0x8c }, // khaki
+ { 0xe6,0xe6,0xfa }, // lavender
+ { 0xff,0xf0,0xf5 }, // lavenderblush
+ { 0x7c,0xfc,0x00 }, // lawngreen
+ { 0xff,0xfa,0xcd }, // lemonchiffon
+ { 0xad,0xd8,0xe6 }, // lightblue
+ { 0xf0,0x80,0x80 }, // lightcoral
+ { 0xe0,0xff,0xff }, // lightcyan
+ { 0xfa,0xfa,0xd2 }, // lightgoldenrodyellow
+ { 0x90,0xee,0x90 }, // lightgreen
+ { 0xd3,0xd3,0xd3 }, // lightgrey
+ { 0xff,0xb6,0xc1 }, // lightpink
+ { 0xff,0xa0,0x7a }, // lightsalmon
+ { 0x20,0xb2,0xaa }, // lightseagreen
+ { 0x87,0xce,0xfa }, // lightskyblue
+ { 0x77,0x88,0x99 }, // lightslategray
+ { 0xb0,0xc4,0xde }, // lightsteelblue
+ { 0xff,0xff,0xe0 }, // lightyellow
+ { 0x00,0xff,0x00 }, // lime
+ { 0x32,0xcd,0x32 }, // limegreen
+ { 0xfa,0xf0,0xe6 }, // linen
+ { 0xff,0x00,0xff }, // magenta
+ { 0x80,0x00,0x00 }, // maroon
+ { 0x66,0xcd,0xaa }, // mediumaquamarine
+ { 0x00,0x00,0xcd }, // mediumblue
+ { 0xba,0x55,0xd3 }, // mediumorchid
+ { 0x93,0x70,0xdb }, // mediumpurple
+ { 0x3c,0xb3,0x71 }, // mediumseagreen
+ { 0x7b,0x68,0xee }, // mediumslateblue
+ { 0x00,0xfa,0x9a }, // mediumspringgreen
+ { 0x48,0xd1,0xcc }, // mediumturquoise
+ { 0xc7,0x15,0x85 }, // mediumvioletred
+ { 0x19,0x19,0x70 }, // midnightblue
+ { 0xf5,0xff,0xfa }, // mintcream
+ { 0xff,0xe4,0xe1 }, // mistyrose
+ { 0xff,0xe4,0xb5 }, // moccasin
+ { 0xff,0xde,0xad }, // navajowhite
+ { 0x00,0x00,0x80 }, // navy
+ { 0xfd,0xf5,0xe6 }, // oldlace
+ { 0x80,0x80,0x00 }, // olive
+ { 0x6b,0x8e,0x23 }, // olivedrab
+ { 0xff,0xa5,0x00 }, // orange
+ { 0xff,0x45,0x00 }, // orangered
+ { 0xda,0x70,0xd6 }, // orchid
+ { 0xee,0xe8,0xaa }, // palegoldenrod
+ { 0x98,0xfb,0x98 }, // palegreen
+ { 0xaf,0xee,0xee }, // paleturquoise
+ { 0xdb,0x70,0x93 }, // palevioletred
+ { 0xff,0xef,0xd5 }, // papayawhip
+ { 0xff,0xda,0xb9 }, // peachpuff
+ { 0xcd,0x85,0x3f }, // peru
+ { 0xff,0xc0,0xcb }, // pink
+ { 0xdd,0xa0,0xdd }, // plum
+ { 0xb0,0xe0,0xe6 }, // powderblue
+ { 0x80,0x00,0x80 }, // purple
+ { 0xff,0x00,0x00 }, // red
+ { 0xbc,0x8f,0x8f }, // rosybrown
+ { 0x41,0x69,0xe1 }, // royalblue
+ { 0x8b,0x45,0x13 }, // saddlebrown
+ { 0xfa,0x80,0x72 }, // salmon
+ { 0xf4,0xa4,0x60 }, // sandybrown
+ { 0x2e,0x8b,0x57 }, // seagreen
+ { 0xff,0xf5,0xee }, // seashell
+ { 0xa0,0x52,0x2d }, // sienna
+ { 0xc0,0xc0,0xc0 }, // silver
+ { 0x87,0xce,0xeb }, // skyblue
+ { 0x6a,0x5a,0xcd }, // slateblue
+ { 0x70,0x80,0x90 }, // slategray
+ { 0xff,0xfa,0xfa }, // snow
+ { 0x00,0xff,0x7f }, // springgreen
+ { 0x46,0x82,0xb4 }, // steelblue
+ { 0xd2,0xb4,0x8c }, // tan
+ { 0x00,0x80,0x80 }, // teal
+ { 0xd8,0xbf,0xd8 }, // thistle
+ { 0xff,0x63,0x47 }, // tomato
+ { 0x40,0xe0,0xd0 }, // turquoise
+ { 0xee,0x82,0xee }, // violet
+ { 0xf5,0xde,0xb3 }, // wheat
+ { 0xff,0xff,0xff }, // white
+ { 0xf5,0xf5,0xf5 }, // whitesmoke
+ { 0xff,0xff,0x00 }, // yellow
+ { 0x9a,0xcd,0x32 }, // yellowgreen
+};
+
+const char* SkParse::FindNamedColor(const char* name, size_t len, SkColor* color) {
+ const auto rec = std::lower_bound(std::begin(gColorNames),
+ std::end (gColorNames),
+ name, // key
+ [](const char* name, const char* key) {
+ return strcmp(name, key) < 0;
+ });
+
+ if (rec == std::end(gColorNames) || 0 != strcmp(name, *rec)) {
+ return nullptr;
+ }
+
+ if (color) {
+ int index = rec - gColorNames;
+ *color = SkColorSetRGB(gColors[index].r, gColors[index].g, gColors[index].b);
+ }
+
+ return name + strlen(*rec);
+}
+
+// !!! move to char utilities
+//static int count_separators(const char* str, const char* sep) {
+// char c;
+// int separators = 0;
+// while ((c = *str++) != '\0') {
+// if (strchr(sep, c) == nullptr)
+// continue;
+// do {
+// if ((c = *str++) == '\0')
+// goto goHome;
+// } while (strchr(sep, c) != nullptr);
+// separators++;
+// }
+//goHome:
+// return separators;
+//}
+
+static inline unsigned nib2byte(unsigned n)
+{
+ SkASSERT((n & ~0xF) == 0);
+ return (n << 4) | n;
+}
+
+const char* SkParse::FindColor(const char* value, SkColor* colorPtr) {
+ unsigned int oldAlpha = SkColorGetA(*colorPtr);
+ if (value[0] == '#') {
+ uint32_t hex;
+ const char* end = SkParse::FindHex(value + 1, &hex);
+// SkASSERT(end);
+ if (end == nullptr)
+ return end;
+ size_t len = end - value - 1;
+ if (len == 3 || len == 4) {
+ unsigned a = len == 4 ? nib2byte(hex >> 12) : oldAlpha;
+ unsigned r = nib2byte((hex >> 8) & 0xF);
+ unsigned g = nib2byte((hex >> 4) & 0xF);
+ unsigned b = nib2byte(hex & 0xF);
+ *colorPtr = SkColorSetARGB(a, r, g, b);
+ return end;
+ } else if (len == 6 || len == 8) {
+ if (len == 6)
+ hex |= oldAlpha << 24;
+ *colorPtr = hex;
+ return end;
+ } else {
+// SkASSERT(0);
+ return nullptr;
+ }
+// } else if (strchr(value, ',')) {
+// SkScalar array[4];
+// int count = count_separators(value, ",") + 1; // !!! count commas, add 1
+// SkASSERT(count == 3 || count == 4);
+// array[0] = SK_Scalar1 * 255;
+// const char* end = SkParse::FindScalars(value, &array[4 - count], count);
+// if (end == nullptr)
+// return nullptr;
+ // !!! range check for errors?
+// *colorPtr = SkColorSetARGB(SkScalarRoundToInt(array[0]), SkScalarRoundToInt(array[1]),
+// SkScalarRoundToInt(array[2]), SkScalarRoundToInt(array[3]));
+// return end;
+ } else
+ return FindNamedColor(value, strlen(value), colorPtr);
+}
Index: qtwebengine/src/3rdparty/chromium/third_party/skia/src/utils
===================================================================
--- qtwebengine/src/3rdparty/chromium/third_party/skia/src/utils (nonexistent)
+++ qtwebengine/src/3rdparty/chromium/third_party/skia/src/utils (revision 5)
Property changes on: qtwebengine/src/3rdparty/chromium/third_party/skia/src/utils
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: qtwebengine/src/3rdparty/chromium/third_party/skia/src
===================================================================
--- qtwebengine/src/3rdparty/chromium/third_party/skia/src (nonexistent)
+++ qtwebengine/src/3rdparty/chromium/third_party/skia/src (revision 5)
Property changes on: qtwebengine/src/3rdparty/chromium/third_party/skia/src
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: qtwebengine/src/3rdparty/chromium/third_party/skia
===================================================================
--- qtwebengine/src/3rdparty/chromium/third_party/skia (nonexistent)
+++ qtwebengine/src/3rdparty/chromium/third_party/skia (revision 5)
Property changes on: qtwebengine/src/3rdparty/chromium/third_party/skia
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: qtwebengine/src/3rdparty/chromium/third_party
===================================================================
--- qtwebengine/src/3rdparty/chromium/third_party (nonexistent)
+++ qtwebengine/src/3rdparty/chromium/third_party (revision 5)
Property changes on: qtwebengine/src/3rdparty/chromium/third_party
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: qtwebengine/src/3rdparty/chromium
===================================================================
--- qtwebengine/src/3rdparty/chromium (nonexistent)
+++ qtwebengine/src/3rdparty/chromium (revision 5)
Property changes on: qtwebengine/src/3rdparty/chromium
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: qtwebengine/src/3rdparty
===================================================================
--- qtwebengine/src/3rdparty (nonexistent)
+++ qtwebengine/src/3rdparty (revision 5)
Property changes on: qtwebengine/src/3rdparty
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: qtwebengine/src
===================================================================
--- qtwebengine/src (nonexistent)
+++ qtwebengine/src (revision 5)
Property changes on: qtwebengine/src
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: qtwebengine
===================================================================
--- qtwebengine (nonexistent)
+++ qtwebengine (revision 5)
Property changes on: qtwebengine
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: .
===================================================================
--- . (nonexistent)
+++ . (revision 5)
Property changes on: .
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~