Skip to content

Commit 11bfece

Browse files
authored
Merge pull request #2103 from Shopify/m121
⬆️ Upgrade to m121
2 parents 4d06877 + 50ad5f5 commit 11bfece

File tree

10 files changed

+31
-70
lines changed

10 files changed

+31
-70
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[submodule "externals/skia"]
22
path = externals/skia
33
url = https://chromium.googlesource.com/skia/
4-
branch = chrome/m119
4+
branch = chrome/m121
55
[submodule "externals/depot_tools"]
66
path = externals/depot_tools
77
url = https://chromium.googlesource.com/chromium/tools/depot_tools.git
25.2 KB
Loading

externals/skia

Submodule skia updated from 89907a0 to e8d7db9
-2.75 KB
Loading
9.94 KB
Loading

package/src/renderer/__tests__/e2e/SVG.spec.tsx

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@ const tiger = new SVGAsset(
5555
800
5656
);
5757

58+
// const text = new SVGAsset(
59+
// `<svg viewBox='0 0 290 500' width='290' height='325' xmlns='http://www.w3.org/2000/svg'>
60+
// <circle cx='31' cy='325' r='120px' fill='#c02aaa'/>
61+
// <text x="20" y="35" fill="black">My Text</text>
62+
// </svg>`,
63+
// 290,
64+
// 500
65+
// );
66+
5867
const svgWithoutSize = {
5968
__typename__: "SVG" as const,
6069
width() {
@@ -66,7 +75,7 @@ const svgWithoutSize = {
6675
dispose() {},
6776
source() {
6877
return `<svg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'>
69-
<circle cx='10' cy='10' r='10' fill='#00FFFF'/>
78+
<circle cx='10' cy='10' r='10' fill='#00FFFF' />
7079
</svg>`;
7180
},
7281
};
@@ -195,4 +204,14 @@ describe("Displays SVGs", () => {
195204
);
196205
checkImage(image, docPath("opacity-tiger.png"));
197206
});
207+
208+
// itRunsE2eOnly("can render text", async () => {
209+
// const image = await surface.draw(
210+
// <>
211+
// <Fill color="white" />
212+
// <ImageSVG svg={text} x={0} y={0} width={800} height={800} />
213+
// </>
214+
// );
215+
// checkImage(image, "snapshots/svg/text.png");
216+
// });
198217
});

scripts/build-libgrapheme-ios.ts

Lines changed: 0 additions & 48 deletions
This file was deleted.

scripts/build-skia-ios.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import { configurations } from "./skia-configuration";
2-
import { executeCmd } from "./utils";
2+
import { executeCmd, executeCmdSync } from "./utils";
33

44
const configuration = configurations.ios;
55

6-
console.log("Building skia for iOS...");
76
let command = "";
87

98
Object.keys(configuration.targets).forEach((targetKey) => {
@@ -12,6 +11,7 @@ Object.keys(configuration.targets).forEach((targetKey) => {
1211
`yarn ts-node ./scripts/build-skia.ts ios ${targetKey}`;
1312
});
1413

14+
console.log("Building skia for iOS...");
1515
executeCmd(command, "iOS", () => {
1616
console.log(`Done building skia for iOS.`);
1717
});

scripts/build-skia.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { executeCmd, executeCmdSync } from "./utils";
22
import { exit } from "process";
33
import { commonArgs, configurations, PlatformName } from "./skia-configuration";
4+
45
const fs = require("fs");
56
const typedKeys = <T extends object>(obj: T) => Object.keys(obj) as (keyof T)[];
67

@@ -189,13 +190,12 @@ try {
189190
executeCmdSync("PATH=../depot_tools/:$PATH python3 tools/git-sync-deps");
190191
console.log("gclient sync done");
191192

192-
// lets check for any dependencies
193-
if (platform.dependencies) {
194-
console.log(`Found dependencies for platform ${SelectedPlatform}`);
195-
platform.dependencies.forEach((dep) => {
196-
console.log(`Running dependency ${dep.name}`);
197-
dep.executable();
198-
});
193+
194+
// Generate libgrapheme headers
195+
if (SelectedPlatform === "ios") {
196+
console.log("Generating libgrapheme headers...");
197+
const libgraphemeDir = `./third_party/externals/libgrapheme`;
198+
executeCmdSync(`cd ${libgraphemeDir} && ./configure && make clean && make`);
199199
}
200200

201201
try {

scripts/skia-configuration.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import { buildLibGraphemeiOS } from "./build-libgrapheme-ios";
2-
import { executeCmdSync } from "./utils";
3-
41
const NdkDir: string = process.env.ANDROID_NDK ?? "";
52

63
export const BUILD_WITH_PARAGRAPH = true;
@@ -73,7 +70,6 @@ export type Platform = {
7370
outputRoot: string;
7471
outputNames: string[];
7572
options?: Arg[];
76-
dependencies?: { name: string; executable: () => void }[];
7773
};
7874

7975
export const configurations: Configuration = {
@@ -164,11 +160,5 @@ export const configurations: Configuration = {
164160
"libsksg.a",
165161
...ParagraphOutputs,
166162
],
167-
dependencies: [
168-
{
169-
name: "libgrapheme",
170-
executable: buildLibGraphemeiOS,
171-
},
172-
],
173163
},
174164
};

0 commit comments

Comments
 (0)