Skip to content

Commit

Permalink
build: various build system fixes (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
fathyb authored Jan 29, 2023
1 parent cd84b0d commit f43e023
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 7 deletions.
11 changes: 9 additions & 2 deletions scripts/patches.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ chromium_upstream="111.0.5511.1"
skia_upstream="486deb23bc2a4d3d09c66fef52c2ad64d8b4f761"

if [[ "$1" == "apply" ]]; then
if [[ -d carbonyl ]]; then
git add -A carbonyl
fi

echo "Stashing Chromium changes.."
git add -A carbonyl

git stash
git checkout "$chromium_upstream"
echo "Applying Chromium patches.."
Expand All @@ -26,8 +30,11 @@ if [[ "$1" == "apply" ]]; then

echo "Patches successfully applied"
elif [[ "$1" == "save" ]]; then
if [[ -d carbonyl ]]; then
git add -A carbonyl
fi

echo "Updating Chromium patch.."
git add -A carbonyl
git diff "$chromium_upstream" > ../../src/chromium.patch

echo "Updating Skia patch.."
Expand Down
18 changes: 13 additions & 5 deletions src/chromium.patch
Original file line number Diff line number Diff line change
Expand Up @@ -584,18 +584,26 @@ index 74749758894a2..4eb891c32b474 100644
// Clean up keyboard lock state when navigating.
CancelKeyboardLock(keyboard_lock_widget_);
diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn
index 2a2410d4a46c1..5f903d27ecd45 100644
index 2a2410d4a46c1..6ad6ced4fd64e 100644
--- a/content/renderer/BUILD.gn
+++ b/content/renderer/BUILD.gn
@@ -237,6 +237,7 @@ target(link_target_type, "renderer") {
@@ -227,6 +227,7 @@ target(link_target_type, "renderer") {
deps = [
"//base",
"//base:i18n",
+ "//carbonyl/src/browser:mojom",
"//build:chromecast_buildflags",
"//build:chromeos_buildflags",
"//cc",
@@ -237,6 +238,7 @@ target(link_target_type, "renderer") {
"//components/discardable_memory/client",
"//components/metrics",
"//components/metrics:single_sample_metrics",
+ "//components/paint_preview/common",
"//components/url_formatter",
"//components/variations:variations_mojom",
"//components/variations/net",
@@ -302,6 +303,7 @@ target(link_target_type, "renderer") {
@@ -302,6 +304,7 @@ target(link_target_type, "renderer") {
"//third_party/boringssl",
"//third_party/icu",
"//third_party/libyuv",
Expand Down Expand Up @@ -948,7 +956,7 @@ index 9e09c5342699e..2778389c22b56 100644
->is_in_back_forward_cache);
SCOPED_CRASH_KEY_BOOL(
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 3b558293121ce..fae44b36b82b9 100644
index 3b558293121ce..675ad6891ddb9 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -15,6 +15,7 @@
Expand All @@ -971,7 +979,7 @@ index 3b558293121ce..fae44b36b82b9 100644
#include "content/common/pepper_plugin.mojom.h"
#endif

+#include "carbonyl/src/mojom/carbonyl.mojom.h"
+#include "carbonyl/src/browser/carbonyl.mojom.h"
+
namespace blink {
namespace scheduler {
Expand Down
52 changes: 52 additions & 0 deletions src/skia.patch
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
diff --git a/include/utils/SkBase64.h b/include/utils/SkBase64.h
index e01028543a..beddbd2c95 100644
--- a/include/utils/SkBase64.h
+++ b/include/utils/SkBase64.h
@@ -12,7 +12,7 @@

#include <cstddef>

-struct SkBase64 {
+struct SK_API SkBase64 {
public:
enum Error {
kNoError,
diff --git a/src/core/SkBitmapDevice.cpp b/src/core/SkBitmapDevice.cpp
index b497d690f7..5e4ee2b1ce 100644
--- a/src/core/SkBitmapDevice.cpp
Expand All @@ -13,3 +26,42 @@ index b497d690f7..5e4ee2b1ce 100644
}

void SkBitmapDevice::drawVertices(const SkVertices* vertices,
diff --git a/src/core/SkClipStackDevice.h b/src/core/SkClipStackDevice.h
index eff1f1a440..a8d6b4fe07 100644
--- a/src/core/SkClipStackDevice.h
+++ b/src/core/SkClipStackDevice.h
@@ -11,7 +11,7 @@
#include "src/core/SkClipStack.h"
#include "src/core/SkDevice.h"

-class SkClipStackDevice : public SkBaseDevice {
+class SK_API SkClipStackDevice : public SkBaseDevice {
public:
SkClipStackDevice(const SkImageInfo& info, const SkSurfaceProps& props)
: SkBaseDevice(info, props)
diff --git a/src/core/SkDevice.h b/src/core/SkDevice.h
index e0fed94b9b..c7194f9c1c 100644
--- a/src/core/SkDevice.h
+++ b/src/core/SkDevice.h
@@ -54,7 +54,7 @@ struct SkStrikeDeviceInfo {
const sktext::gpu::SDFTControl* const fSDFTControl;
};

-class SkBaseDevice : public SkRefCnt, public SkMatrixProvider {
+class SK_API SkBaseDevice : public SkRefCnt, public SkMatrixProvider {
public:
SkBaseDevice(const SkImageInfo&, const SkSurfaceProps&);

diff --git a/src/core/SkFontPriv.h b/src/core/SkFontPriv.h
index 95ca905bf1..a31aba8e2b 100644
--- a/src/core/SkFontPriv.h
+++ b/src/core/SkFontPriv.h
@@ -16,7 +16,7 @@
class SkReadBuffer;
class SkWriteBuffer;

-class SkFontPriv {
+class SK_API SkFontPriv {
public:
/* This is the size we use when we ask for a glyph's path. We then
* post-transform it as we draw to match the request.

0 comments on commit f43e023

Please sign in to comment.