summaryrefslogtreecommitdiff
path: root/chromium/skia
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/skia')
-rw-r--r--chromium/skia/BUILD.gn51
-rw-r--r--chromium/skia/config/SkUserConfig.h7
-rw-r--r--chromium/skia/ext/fontmgr_default_fuchsia.cc5
-rw-r--r--chromium/skia/ext/skia_commit_hash.h2
-rw-r--r--chromium/skia/ext/test_fonts_fuchsia.cc5
-rw-r--r--chromium/skia/skia_resources.grd29
6 files changed, 84 insertions, 15 deletions
diff --git a/chromium/skia/BUILD.gn b/chromium/skia/BUILD.gn
index 7015ef36ec6..cbdf2c52e77 100644
--- a/chromium/skia/BUILD.gn
+++ b/chromium/skia/BUILD.gn
@@ -13,6 +13,7 @@ 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") {
@@ -39,10 +40,12 @@ buildflag_header("buildflags") {
# 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" ]
@@ -53,7 +56,7 @@ config("skia_config") {
configs = [ "//third_party/vulkan_headers:vulkan_headers_config" ]
}
- defines = [
+ defines += [
"SK_CODEC_DECODES_PNG",
"SK_CODEC_DECODES_WEBP",
"SK_ENCODE_PNG",
@@ -433,8 +436,13 @@ component("skia") {
if (is_mac || is_ios) {
set_sources_assignment_filter([])
sources += [
- "//third_party/skia/src/ports/SkFontHost_mac.cpp",
- "//third_party/skia/src/utils/mac/SkStream_mac.cpp",
+ "//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",
]
set_sources_assignment_filter(sources_assignment_filter)
}
@@ -564,7 +572,13 @@ component("skia") {
if (is_ios) {
libs = [ "ImageIO.framework" ]
set_sources_assignment_filter([])
- sources += [ "//third_party/skia/src/utils/mac/SkCreateCGImageRef.cpp" ]
+ sources += [
+ "//third_party/skia/src/utils/mac/SkCGBase.h",
+ "//third_party/skia/src/utils/mac/SkCGGeometry.h",
+ "//third_party/skia/src/utils/mac/SkCTFontSmoothBehavior.cpp",
+ "//third_party/skia/src/utils/mac/SkCTFontSmoothBehavior.h",
+ "//third_party/skia/src/utils/mac/SkCreateCGImageRef.cpp",
+ ]
set_sources_assignment_filter(sources_assignment_filter)
}
@@ -731,6 +745,16 @@ if (current_cpu == "x86" || current_cpu == "x64") {
}
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") {
@@ -744,6 +768,7 @@ skia_source_set("skia_opts") {
deps += [
":skia_opts_avx",
":skia_opts_hsw",
+ ":skia_opts_skx",
":skia_opts_sse3",
":skia_opts_sse41",
":skia_opts_sse42",
@@ -953,3 +978,21 @@ if (!is_ios) {
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" ]
+}
diff --git a/chromium/skia/config/SkUserConfig.h b/chromium/skia/config/SkUserConfig.h
index 1ff9bcb88dc..ba72dec42c4 100644
--- a/chromium/skia/config/SkUserConfig.h
+++ b/chromium/skia/config/SkUserConfig.h
@@ -207,10 +207,6 @@ SK_API void SkDebugf_FileLine(const char* file,
#define SK_USE_LEGACY_GPU_BLUR
#endif
-#ifndef SK_SUPPORT_LEGACY_MATRIX44
-#define SK_SUPPORT_LEGACY_MATRIX44
-#endif
-
// Max. verb count for paths rendered by the edge-AA tessellating path renderer.
#define GR_AA_TESSELLATOR_MAX_VERB_COUNT 100
@@ -221,6 +217,9 @@ SK_API void SkDebugf_FileLine(const char* file,
// Staging for lowp::bilerp_clamp_8888, and for planned misc. others.
#define SK_DISABLE_LOWP_BILERP_CLAMP_CLAMP_STAGE
+// Staging for migrating SkDeferredDisplayList from unique_ptr to sk_sp.
+#define SK_DDL_IS_UNIQUE_POINTER
+
///////////////////////// Imported from BUILD.gn and skia_common.gypi
/* In some places Skia can use static initializers for global initialization,
diff --git a/chromium/skia/ext/fontmgr_default_fuchsia.cc b/chromium/skia/ext/fontmgr_default_fuchsia.cc
index 6126c292e71..0a1030af44a 100644
--- a/chromium/skia/ext/fontmgr_default_fuchsia.cc
+++ b/chromium/skia/ext/fontmgr_default_fuchsia.cc
@@ -7,7 +7,7 @@
#include <fuchsia/fonts/cpp/fidl.h>
#include <lib/sys/cpp/component_context.h>
-#include "base/fuchsia/default_context.h"
+#include "base/fuchsia/process_context.h"
#include "third_party/skia/include/core/SkFontMgr.h"
#include "third_party/skia/include/ports/SkFontMgr_fuchsia.h"
@@ -15,8 +15,7 @@ namespace skia {
SK_API sk_sp<SkFontMgr> CreateDefaultSkFontMgr() {
fuchsia::fonts::ProviderSyncPtr provider;
- base::fuchsia::ComponentContextForCurrentProcess()->svc()->Connect(
- provider.NewRequest());
+ base::ComponentContextForProcess()->svc()->Connect(provider.NewRequest());
return SkFontMgr_New_Fuchsia(std::move(provider));
}
diff --git a/chromium/skia/ext/skia_commit_hash.h b/chromium/skia/ext/skia_commit_hash.h
index 650f12c59c1..d6de73a67e4 100644
--- a/chromium/skia/ext/skia_commit_hash.h
+++ b/chromium/skia/ext/skia_commit_hash.h
@@ -3,6 +3,6 @@
#ifndef SKIA_EXT_SKIA_COMMIT_HASH_H_
#define SKIA_EXT_SKIA_COMMIT_HASH_H_
-#define SKIA_COMMIT_HASH "e50772b2a25e98419dc884cc5cdd2138e1dfd43e"
+#define SKIA_COMMIT_HASH "8ae885386e910cff8c543ae0d952a2c43f46e4ad"
#endif // SKIA_EXT_SKIA_COMMIT_HASH_H_
diff --git a/chromium/skia/ext/test_fonts_fuchsia.cc b/chromium/skia/ext/test_fonts_fuchsia.cc
index b9bb644c38c..509cfb43573 100644
--- a/chromium/skia/ext/test_fonts_fuchsia.cc
+++ b/chromium/skia/ext/test_fonts_fuchsia.cc
@@ -10,8 +10,8 @@
#include <lib/fidl/cpp/interface_handle.h>
#include <lib/sys/cpp/component_context.h>
-#include "base/fuchsia/default_context.h"
#include "base/fuchsia/file_utils.h"
+#include "base/fuchsia/process_context.h"
#include "base/logging.h"
#include "base/no_destructor.h"
#include "base/path_service.h"
@@ -46,8 +46,7 @@ fuchsia::fonts::ProviderSyncPtr RunTestProviderWithTestFonts(
font_provider_services_dir.NewRequest().TakeChannel();
fuchsia::sys::LauncherSyncPtr launcher;
- base::fuchsia::ComponentContextForCurrentProcess()->svc()->Connect(
- launcher.NewRequest());
+ base::ComponentContextForProcess()->svc()->Connect(launcher.NewRequest());
launcher->CreateComponent(std::move(launch_info),
controller_out->NewRequest());
diff --git a/chromium/skia/skia_resources.grd b/chromium/skia/skia_resources.grd
new file mode 100644
index 00000000000..982a7bdb141
--- /dev/null
+++ b/chromium/skia/skia_resources.grd
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<grit latest_public_release="0" current_release="1" output_all_resource_defines="false">
+ <outputs>
+ <output filename="grit/skia_resources.h" type="rc_header">
+ <emit emit_type='prepend'></emit>
+ </output>
+ <output filename="grit/skia_resources_map.h"
+ type="resource_map_header" />
+ <output filename="grit/skia_resources_map.cc"
+ type="resource_map_source" />
+ <output filename="skia_resources.pak" type="data_package" />
+ </outputs>
+ <release seq="1">
+ <includes>
+ <include name="IDR_SKIA_BITMAP_MOJOM_LITE_JS"
+ file="${root_gen_dir}/skia/public/mojom/bitmap.mojom-lite.js"
+ use_base_dir="false"
+ type="BINDATA" />
+ <include name="IDR_SKIA_IMAGE_INFO_MOJOM_LITE_JS"
+ file="${root_gen_dir}/skia/public/mojom/image_info.mojom-lite.js"
+ use_base_dir="false"
+ type="BINDATA" />
+ <include name="IDR_SKIA_SKCOLOR_MOJOM_LITE_JS"
+ file="${root_gen_dir}/skia/public/mojom/skcolor.mojom-lite.js"
+ use_base_dir="false"
+ type="BINDATA" />
+ </includes>
+ </release>
+</grit> \ No newline at end of file