Skip to content

Commit

Permalink
[skia] Update to 134 (microsoft#43913)
Browse files Browse the repository at this point in the history
  • Loading branch information
nlogozzo authored Feb 20, 2025
1 parent 2148f03 commit b7a701c
Show file tree
Hide file tree
Showing 12 changed files with 61 additions and 45 deletions.
2 changes: 1 addition & 1 deletion ports/skia/bentleyottmann-build.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/modules/bentleyottmann/BUILD.gn b/modules/bentleyottmann/BUILD.gn
index 8a6725592f..fa0d03334c 100644
index 8a6725592f..40e4ac7bec 100644
--- a/modules/bentleyottmann/BUILD.gn
+++ b/modules/bentleyottmann/BUILD.gn
@@ -31,4 +31,9 @@ if (skia_enable_bentleyottmann) {
Expand Down
18 changes: 9 additions & 9 deletions ports/skia/disable-msvc-env-setup.patch
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
diff --git a/gn/toolchain/BUILD.gn b/gn/toolchain/BUILD.gn
index ba85c3d..901ba99 100644
index 4d4abc952f..5800f30bd9 100644
--- a/gn/toolchain/BUILD.gn
+++ b/gn/toolchain/BUILD.gn
@@ -94,6 +94,7 @@ toolchain("msvc") {
# ARM64 compiler is incomplete - it relies on DLLs located in the host toolchain directory.
env_setup = "$shell set \"PATH=%PATH%;$win_vc\\Tools\\MSVC\\$win_toolchain_version\\bin\\HostX64\\x64\" && "
}
+ env_setup = "" # overwrite
cl_m32_flag = ""
@@ -96,6 +96,7 @@ template("msvc_toolchain") {
# ARM64 compiler is incomplete - it relies on DLLs located in the host toolchain directory.
env_setup = "$shell set \"PATH=%PATH%;$win_vc\\Tools\\MSVC\\$win_toolchain_version\\bin\\HostX64\\x64\" && "
}
+ env_setup = "" # overwrite

cl_m32_flag = ""

2 changes: 1 addition & 1 deletion ports/skia/graphite.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/include/gpu/graphite/Recorder.h b/include/gpu/graphite/Recorder.h
index 64e9fad..44a9aca 100644
index 24f1483f46..2a6d93e4c4 100644
--- a/include/gpu/graphite/Recorder.h
+++ b/include/gpu/graphite/Recorder.h
@@ -11,6 +11,7 @@
Expand Down
6 changes: 3 additions & 3 deletions ports/skia/pdfsubsetfont-uwp.diff
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
diff --git a/src/pdf/SkPDFSubsetFont.cpp b/src/pdf/SkPDFSubsetFont.cpp
index 09d4aed799..009c2762a3 100644
index 307c4304a2..db723bcd42 100644
--- a/src/pdf/SkPDFSubsetFont.cpp
+++ b/src/pdf/SkPDFSubsetFont.cpp
@@ -111,6 +111,7 @@ sk_sp<SkData> SkPDFSubsetFont(const SkTypeface& typeface, const SkPDFGlyphUse& g

#else

+#include "include/core/SkData.h"
sk_sp<SkData> SkPDFSubsetFont(const SkTypeface&, const SkPDFGlyphUse&) {
return nullptr;
Expand Down
18 changes: 12 additions & 6 deletions ports/skia/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ include("${CMAKE_CURRENT_LIST_DIR}/skia-functions.cmake")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO google/skia
REF "501e9efaa2fc929ec67c44da6dbaf9335264b559"
SHA512 978af9894d23d7b97d95d402bbf6c0c1401d63990361aae80166b620b0aa06d9dc2c75537850ff4c2df539735b4a12713cb29840613a15cbbff68590c48c4fac
REF "chrome/m${VERSION}"
SHA512 3147cdd4636feeba1f3a1c9026b8d5d9e500e5cc4d99281a6f7fc36962e5365cbc45d358732381bd42ee8c721ca2c8ba963e5ba1344750c9e3a54be697f0e0f9
PATCHES
disable-msvc-env-setup.patch
# disable-dev-test.patch
Expand Down Expand Up @@ -33,12 +33,12 @@ declare_external_from_git(d3d12allocator
)
declare_external_from_git(dawn
URL "https://dawn.googlesource.com/dawn.git"
REF "db1fa936ad0a58846f179c81cdf60f55267099b9"
REF "acd89d9f169a9d09b9ada09d1bd80350376b8544"
LICENSE_FILE LICENSE
)
declare_external_from_git(dng_sdk
URL "https://android.googlesource.com/platform/external/dng_sdk.git"
REF "679499cc9b92cfb0ae1dccbfd7e97ce719d23576"
REF "c8d0c9b1d16bfda56f15165d39e0ffa360a11123"
LICENSE_FILE LICENSE
)
declare_external_from_git(jinja2
Expand All @@ -51,6 +51,11 @@ declare_external_from_git(markupsafe
REF "0bad08bb207bbfc1d6f3bbc82b9242b0c50e5794"
LICENSE_FILE LICENSE
)
declare_external_from_git(partition_alloc
URL "https://chromium.googlesource.com/chromium/src/base/allocator/partition_allocator.git"
REF "ce13777cb731e0a60c606d1741091fd11a0574d7"
LICENSE_FILE LICENSE
)
declare_external_from_git(piex
URL "https://android.googlesource.com/platform/external/piex.git"
REF "bb217acdca1cc0c16b704669dd6f91a1b509c406"
Expand All @@ -63,12 +68,12 @@ declare_external_from_git(spirv-cross
)
declare_external_from_git(spirv-headers
URL "https://github.com/KhronosGroup/SPIRV-Headers.git"
REF "1b75a4ae0b4289014b4c369301dc925c366f78a6"
REF "e7294a8ebed84f8c5bd3686c68dbe12a4e65b644"
LICENSE_FILE LICENSE
)
declare_external_from_git(spirv-tools
URL "https://github.com/KhronosGroup/SPIRV-Tools.git"
REF "87fcbaf1bc8346469e178711eff27cfd20aa1960"
REF "ce37fd67f83cd1e8793b988d2e4126bbf72b19dd"
LICENSE_FILE LICENSE
)
declare_external_from_git(wuffs
Expand Down Expand Up @@ -228,6 +233,7 @@ They can be installed on Debian based systems via
## Remove
abseil-cpp
## REMOVE ^
partition_alloc
dawn
)
file(REMOVE_RECURSE "${SOURCE_PATH}/third_party/externals/opengl-registry")
Expand Down
8 changes: 6 additions & 2 deletions ports/skia/skia-functions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,12 @@ function(get_externals)
file(RENAME "${staging_dir}" "${SOURCE_PATH}/${dir}")

set(license_file "${SOURCE_PATH}/${dir}/${skia_external_license_${name}}")
cmake_path(GET license_file FILENAME filename)
file(COPY_FILE "${license_file}" "${licenses_dir}/## ${name} ${filename}")
if(NOT EXISTS "${license_file}") # partition_alloc does not have a license file
message(WARNING "Missing license file: ${license_file}")
else()
cmake_path(GET license_file FILENAME filename)
file(COPY_FILE "${license_file}" "${licenses_dir}/## ${name} ${filename}")
endif()
endforeach()
foreach(name IN LISTS from_pkgconfig)
third_party_from_pkgconfig("${name}" ${skia_external_pkgconfig_${name}})
Expand Down
10 changes: 6 additions & 4 deletions ports/skia/skia-include-string.patch
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
--- a/src/gpu/ganesh/d3d/GrD3DUtil.h 2024-01-23 22:09:34
+++ b/src/gpu/ganesh/d3d/GrD3DUtil.h 2024-02-01 18:09:20
diff --git a/src/gpu/ganesh/d3d/GrD3DUtil.h b/src/gpu/ganesh/d3d/GrD3DUtil.h
index 7a1078b629..bd5605ae91 100644
--- a/src/gpu/ganesh/d3d/GrD3DUtil.h
+++ b/src/gpu/ganesh/d3d/GrD3DUtil.h
@@ -8,6 +8,8 @@
#ifndef GrD3DUtil_DEFINED
#define GrD3DUtil_DEFINED

+#include <string>
+
#include "include/core/SkImage.h"
#include "include/gpu/GrTypes.h"
#include "include/gpu/d3d/GrD3DTypes.h"
#include "include/gpu/ganesh/GrTypes.h"
#include "include/gpu/ganesh/d3d/GrD3DTypes.h"
14 changes: 7 additions & 7 deletions ports/skia/skparagraph-dllexport.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/modules/skparagraph/BUILD.gn b/modules/skparagraph/BUILD.gn
index 801bbae0b5..399c8a809e 100644
index 283eeacebd..742fe4552f 100644
--- a/modules/skparagraph/BUILD.gn
+++ b/modules/skparagraph/BUILD.gn
@@ -20,6 +20,9 @@ if (skia_enable_skparagraph && skia_enable_skshaper && skia_enable_skunicode &&
Expand All @@ -14,14 +14,14 @@ index 801bbae0b5..399c8a809e 100644
skia_component("skparagraph") {
@@ -27,6 +30,7 @@ if (skia_enable_skparagraph && skia_enable_skshaper && skia_enable_skunicode &&
public_configs = [ ":public_config" ]
public = skparagraph_public
sources = skparagraph_sources
public = skparagraph_core_public
sources = skparagraph_core_sources
+ defines = [ "SKPARAGRAPH_IMPLEMENTATION=1" ]
public_deps = [
"../..:skia",
"../skunicode",
diff --git a/modules/skparagraph/include/FontCollection.h b/modules/skparagraph/include/FontCollection.h
index ae2f9922d0..96c0fad8a1 100644
index ae2f9922d0..5b77e997bc 100644
--- a/modules/skparagraph/include/FontCollection.h
+++ b/modules/skparagraph/include/FontCollection.h
@@ -16,9 +16,29 @@
Expand Down Expand Up @@ -56,7 +56,7 @@ index ae2f9922d0..96c0fad8a1 100644
FontCollection();

diff --git a/modules/skparagraph/include/ParagraphBuilder.h b/modules/skparagraph/include/ParagraphBuilder.h
index feac5622bb..9dab883a6d 100644
index feac5622bb..72712e121d 100644
--- a/modules/skparagraph/include/ParagraphBuilder.h
+++ b/modules/skparagraph/include/ParagraphBuilder.h
@@ -16,7 +16,27 @@
Expand Down Expand Up @@ -89,7 +89,7 @@ index feac5622bb..9dab883a6d 100644
ParagraphBuilder() {}

diff --git a/modules/skparagraph/include/ParagraphStyle.h b/modules/skparagraph/include/ParagraphStyle.h
index 98ec228ffb..0e1625ae6a 100644
index 98ec228ffb..63e973c7db 100644
--- a/modules/skparagraph/include/ParagraphStyle.h
+++ b/modules/skparagraph/include/ParagraphStyle.h
@@ -18,6 +18,26 @@
Expand Down Expand Up @@ -129,7 +129,7 @@ index 98ec228ffb..0e1625ae6a 100644

bool operator==(const ParagraphStyle& rhs) const {
diff --git a/modules/skparagraph/include/TextStyle.h b/modules/skparagraph/include/TextStyle.h
index 4bc2fb9dbc..25774c6665 100644
index 4bc2fb9dbc..4bee210fb7 100644
--- a/modules/skparagraph/include/TextStyle.h
+++ b/modules/skparagraph/include/TextStyle.h
@@ -21,6 +21,26 @@
Expand Down
3 changes: 1 addition & 2 deletions ports/skia/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "skia",
"version": "129",
"port-version": 3,
"version": "134",
"description": [
"Skia is an open source 2D graphics library which provides common APIs that work across a variety of hardware and software platforms.",
"It serves as the graphics engine for Google Chrome and Chrome OS, Android, Mozilla Firefox and Firefox OS, and many other products.",
Expand Down
16 changes: 8 additions & 8 deletions ports/skia/vulkan-headers.patch
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
diff --git a/BUILD.gn b/BUILD.gn
index 04ab422..5ae82e5 100644
index 3626895824..31a7fdbc33 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -913,6 +913,7 @@ optional("gpu_shared") {
@@ -938,6 +938,7 @@ optional("gpu_shared") {
}

if (skia_use_vulkan) {
+ public_deps += [ "//third_party/externals/vulkan-headers:vulkan_headers" ]
public_defines += [ "SK_VULKAN" ]
sources += skia_shared_vk_sources
if (skia_enable_vulkan_debug_layers) {
configs += [ ":use_skia_vulkan_headers" ]
diff --git a/include/private/gpu/vk/SkiaVulkan.h b/include/private/gpu/vk/SkiaVulkan.h
index 412dbf535f..93608dc2be 100644
index 1e962ad60a..535ac6b88f 100644
--- a/include/private/gpu/vk/SkiaVulkan.h
+++ b/include/private/gpu/vk/SkiaVulkan.h
@@ -12,6 +12,10 @@

// IWYU pragma: begin_exports

+#ifndef SK_USE_EXTERNAL_VULKAN_HEADERS
+# define SK_USE_EXTERNAL_VULKAN_HEADERS
+#ifdef SK_USE_INTERNAL_VULKAN_HEADERS
+# undef SK_USE_INTERNAL_VULKAN_HEADERS
+#endif
+
#if (SKIA_IMPLEMENTATION || !defined(SK_VULKAN)) && !defined(SK_USE_EXTERNAL_VULKAN_HEADERS)
#if defined(SK_USE_INTERNAL_VULKAN_HEADERS) && !defined(SK_BUILD_FOR_GOOGLE3)
#include "include/third_party/vulkan/vulkan/vulkan_core.h"
#else
diff --git a/src/gpu/vk/vulkanmemoryallocator/VulkanMemoryAllocatorWrapper.h b/src/gpu/vk/vulkanmemoryallocator/VulkanMemoryAllocatorWrapper.h
index 487ea7c..9662c8c 100644
index 487ea7cee4..9662c8cbf6 100644
--- a/src/gpu/vk/vulkanmemoryallocator/VulkanMemoryAllocatorWrapper.h
+++ b/src/gpu/vk/vulkanmemoryallocator/VulkanMemoryAllocatorWrapper.h
@@ -39,7 +39,11 @@
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -8505,8 +8505,8 @@
"port-version": 0
},
"skia": {
"baseline": "129",
"port-version": 3
"baseline": "134",
"port-version": 0
},
"skyr-url": {
"baseline": "1.13.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/s-/skia.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "5a4b4ce7f523b0ce686476844b3eb047ce661596",
"version": "134",
"port-version": 0
},
{
"git-tree": "dc9da53ed051cba6b6172dc743b6c691adccd9c9",
"version": "129",
Expand Down

0 comments on commit b7a701c

Please # to comment.