@blotch/angular-lynx-native 22.2.10 → 22.2.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -23,7 +23,7 @@ Both register the native modules the runtime's services call, which Lynx Explore
23
23
 
24
24
  Both link Lynx's XElement library, which holds `<input>`, `<textarea>`, `<overlay>`, `<svg>`, `<blur-view>`, `<viewpager>`, `<refresh>`, the `<scroll-coordinator>` family, `<webview>` and `<video>`. Lynx's core doesn't include these, and a host that doesn't register them renders nothing for those tags (on Android, nothing after them either). XElement's AnimaX and Markdown elements are left out: the runtime doesn't support them. On iOS, `<blur-view>` is XElement's with more of UIKit in it (`App/BlurView.swift`): a `blur-material` attribute for UIKit's adaptive blur materials, which the glass components draw their design before iOS 26 on (Lynx's blur-view has only the styles from before iOS 13); Liquid Glass that materializes, dissolves and eases between effects inside a `glass-container`, where Lynx's sets its effect at once; and a `glass-effect-id` attribute that pairs two glass shapes across a change so one morphs into the other (`App/GlassTransitions.swift`).
25
25
 
26
- Both have `<canvas>` with WebGL2 (issue #211), which Lynx doesn't: a `canvas` element (`App/AngularLynxWebGL.m`'s `AngularLynxCanvas`, a `CAEAGLLayer` view; `CanvasUI.kt`, a `TextureView`) and the `AngularLynxWebGL` module the runtime's WebGL2 context sends its calls to, which runs them on OpenGL ES 3.0 (`App/AngularLynxWebGLContext.m`, `WebGLContext.kt`). The runtime runs on Lynx's main thread and WebGL needs answers synchronously, so both turn on main-thread modules (`enableMTSModule`): the config's modules are then callable from main-thread JavaScript as `lynx.module(name)`. `AngularLynxAssets` (`App/AssetsModule.swift`, `AssetsModule.kt`) reads a file the app bundles for the main thread's `fetch`, which has no page URL to resolve `/static/...` against. The command numbers the WebGL module reads (`App/AngularLynxWebGLOps.h`, `WebGLOps.kt`) are generated from the runtime's `canvas/webgl-ops.ts` with `npm run generate:webgl-ops -w packages/native`; `scripts/webgl-ops.test.ts` fails when they're stale. OpenGL ES is deprecated on iOS but still in the SDK; `GLES_SILENCE_DEPRECATION` keeps each call from warning.
26
+ Both have `<canvas>` with WebGL2 (issue #211), which Lynx doesn't: a `canvas` element (`App/AngularLynxWebGL.m`'s `AngularLynxCanvas`, a `CAMetalLayer` view; `CanvasUI.kt`, a `TextureView`) and the `AngularLynxWebGL` module the runtime's WebGL2 context sends its calls to, which runs them on OpenGL ES 3.0 (`App/AngularLynxWebGLContext.m`, `WebGLContext.kt`). On iOS that's [ANGLE](https://chromium.googlesource.com/angle/angle)'s OpenGL ES, on Metal, which Safari draws WebGL with too: iOS's own OpenGL ES is deprecated, and the Simulator runs it on the CPU, at seconds a frame for a lit three.js scene (issue #238), where Metal draws on the Mac's GPU. ANGLE's `libEGL` and `libGLESv2` frameworks, and its headers, come in the Lynx frameworks zip (below). Android's OpenGL ES is the phone's, which the emulator already runs on the Mac's GPU. The runtime runs on Lynx's main thread and WebGL needs answers synchronously, so both turn on main-thread modules (`enableMTSModule`): the config's modules are then callable from main-thread JavaScript as `lynx.module(name)`. `AngularLynxAssets` (`App/AssetsModule.swift`, `AssetsModule.kt`) reads a file the app bundles for the main thread's `fetch`, which has no page URL to resolve `/static/...` against. The command numbers the WebGL module reads (`App/AngularLynxWebGLOps.h`, `WebGLOps.kt`) are generated from the runtime's `canvas/webgl-ops.ts` with `npm run generate:webgl-ops -w packages/native`; `scripts/webgl-ops.test.ts` fails when they're stale. UIKit's module imports Apple's OpenGL ES headers into every file, so `AngularLynxWebGLContext.m` turns off their deprecation warnings, which land on ANGLE's functions of the same names; the explicit link to `libGLESv2` comes before UIKit's automatic one to OpenGLES, so those calls bind to ANGLE.
27
27
 
28
28
  | | iOS | Android |
29
29
  | ---------------- | ---------------------------------------------------- | -------------------------------------------------------- |
@@ -35,12 +35,14 @@ Both have `<canvas>` with WebGL2 (issue #211), which Lynx doesn't: a `canvas` el
35
35
 
36
36
  ## Lynx for iOS
37
37
 
38
- Lynx publishes iOS only as source pods, which take minutes to compile and need CocoaPods (and so Ruby). `scripts/build-lynx-ios-frameworks.sh` compiles them once into XCFrameworks (about 26 MB zipped, with debug symbols in a separate zip): Lynx, PrimJS, XElement and their dependencies. The builder downloads the zip pinned in `src/ios/frameworks.ts` (URL and SHA-256) on first use and caches it in `~/.cache/angular-lynx/lynx-ios/<version>-<build>`.
38
+ Lynx publishes iOS only as source pods, which take minutes to compile and need CocoaPods (and so Ruby). `scripts/build-lynx-ios-frameworks.sh` compiles them once into XCFrameworks (about 32 MB zipped, with debug symbols in a separate zip): Lynx, PrimJS, XElement and their dependencies, and ANGLE's `libEGL` and `libGLESv2`, with ANGLE's headers in `ANGLE/include`. The builder downloads the zip pinned in `src/ios/frameworks.ts` (URL and SHA-256) on first use and caches it in `~/.cache/angular-lynx/lynx-ios/<version>-<build>`.
39
39
 
40
- The zip for Lynx 4.1.0 is the [`lynx-ios-4.1.0-2` release](https://github.com/Blotch-Smart-Frames/AngularLynx/releases/tag/lynx-ios-4.1.0-2). The build number counts rebuilds of one Lynx version whose frameworks changed (2 added XElement), and is part of the cache folder, so machines with an older zip download the new one. For a new Lynx version, bump the versions in the script and reset `BUILD` to 1; to change the frameworks of the same version, bump `BUILD` (in the script and in `LYNX_IOS`). Then run the **Lynx iOS frameworks** workflow with `publish` (or the script locally), and pin the new zip's URL and SHA-256. To test a locally built folder before publishing it:
40
+ ANGLE only builds with Chromium's tooling (depot_tools, GN and Ninja), so the Lynx script runs `scripts/build-angle-ios-frameworks.sh`, which checks out the ANGLE revision a Chrome stable release shipped (`ANGLE_REVISION`), builds its Metal backend alone for the device and both Simulator architectures, with ANGLE's own Metal shaders prebuilt (otherwise it compiles them when an app first makes a context, which took 5.7 s on a fresh install in the Simulator), and leaves out the dependencies ANGLE's DEPS fetches for its tests and other backends. The checkout is about 5 GB and the three builds take about a minute and a half together; run it alone (`npm run build:angle-ios-frameworks -w packages/native`) to try a new revision. ANGLE adds about 6 MB to an app (2 MB compressed in the `.ipa`), against Lynx's 34 MB, and every app links it, so `<canvas>` works in every build.
41
+
42
+ The zip for Lynx 4.1.0 is the [`lynx-ios-4.1.0-3` release](https://github.com/Blotch-Smart-Frames/AngularLynx/releases/tag/lynx-ios-4.1.0-3). The build number counts rebuilds of one Lynx version whose frameworks changed (2 added XElement, 3 ANGLE), and is part of the cache folder, so machines with an older zip download the new one. For a new Lynx version, bump the versions in the script and reset `BUILD` to 1; to change the frameworks of the same version, bump `BUILD` (in the script and in `LYNX_IOS`). Then run the **Lynx iOS frameworks** workflow with `publish` (or the script locally), and pin the new zip's URL and SHA-256. To test a locally built folder before publishing it:
41
43
 
42
44
  ```sh
43
- npm run build:lynx-ios-frameworks -w packages/native # needs Xcode, and Ruby >= 2.7 with Bundler for CocoaPods
45
+ npm run build:lynx-ios-frameworks -w packages/native # needs Xcode, Ruby >= 2.7 with Bundler for CocoaPods, and Python 3 for ANGLE (the script downloads Xcode's Metal toolchain if it's missing)
44
46
  export ANGULAR_LYNX_IOS_FRAMEWORKS=$PWD/packages/native/.lynx-ios-build/out/LynxFrameworks
45
47
  ```
46
48
 
@@ -1,30 +1,46 @@
1
1
  /**
2
- * The prebuilt Lynx XCFrameworks the iOS shell links.
2
+ * The prebuilt Lynx XCFrameworks the iOS shell links, with ANGLE's.
3
3
  *
4
4
  * Lynx publishes iOS only as source pods, and compiling them takes minutes and
5
5
  * needs CocoaPods (and so Ruby). scripts/build-lynx-ios-frameworks.sh compiles
6
- * them once per Lynx version in CI; the zip it produces is attached to a
7
- * GitHub release and pinned here by SHA-256, so every user links the same
8
- * binaries we tested.
6
+ * them once per Lynx version in CI, along with ANGLE (which needs Chromium's
7
+ * tooling, so is no easier to build on a user's Mac); the zip it produces is
8
+ * attached to a GitHub release and pinned here by SHA-256, so every user
9
+ * links the same binaries we tested.
9
10
  */
10
11
  export declare const LYNX_IOS: {
11
12
  readonly version: "4.1.0";
12
13
  /**
13
14
  * Counts rebuilds of one Lynx version whose frameworks changed (2 added
14
- * XElement); BUILD in the script. It's part of the cache folder, so a
15
- * machine that cached an older zip downloads the new one instead of
15
+ * XElement, 3 ANGLE); BUILD in the script. It's part of the cache folder,
16
+ * so a machine that cached an older zip downloads the new one instead of
16
17
  * linking frameworks the shell no longer matches.
17
18
  */
18
- readonly build: 2;
19
- readonly url: "https://github.com/Blotch-Smart-Frames/AngularLynx/releases/download/lynx-ios-4.1.0-2/lynx-ios-4.1.0-2.zip";
19
+ readonly build: 3;
20
+ readonly url: "https://github.com/Blotch-Smart-Frames/AngularLynx/releases/download/lynx-ios-4.1.0-3/lynx-ios-4.1.0-3.zip";
20
21
  readonly sha256: string | undefined;
21
22
  };
22
23
  /**
23
- * The frameworks in the zip. The template project (APP_PROJECT in
24
- * scripts/generate-ios-project.ts) and the frameworks build both read this
25
- * list, so it is the only place to change it.
24
+ * The frameworks the zip has from Lynx's pods. The frameworks build reads
25
+ * this list, so it is the only place to change it.
26
26
  */
27
27
  export declare const LYNX_IOS_FRAMEWORKS: readonly ["Lynx", "LynxBase", "LynxServiceAPI", "LynxService", "PrimJS", "SDWebImage", "SDWebImageWebPCoder", "libwebp", "XElement", "ServalSVG", "MJRefresh"];
28
+ /**
29
+ * ANGLE's frameworks, which the shell's `<canvas>` draws WebGL with: OpenGL
30
+ * ES 3.0 on Metal (scripts/build-angle-ios-frameworks.sh). libEGL loads
31
+ * libGLESv2 from the app's Frameworks folder.
32
+ */
33
+ export declare const ANGLE_IOS_FRAMEWORKS: readonly ["libEGL", "libGLESv2"];
34
+ /**
35
+ * Every framework in the zip, which the template project (APP_PROJECT in
36
+ * scripts/generate-ios-project.ts) links and embeds.
37
+ */
38
+ export declare const IOS_FRAMEWORKS: readonly ["Lynx", "LynxBase", "LynxServiceAPI", "LynxService", "PrimJS", "SDWebImage", "SDWebImageWebPCoder", "libwebp", "XElement", "ServalSVG", "MJRefresh", "libEGL", "libGLESv2"];
39
+ /**
40
+ * ANGLE's EGL and OpenGL ES headers, in the zip next to the frameworks: its
41
+ * frameworks have none, and the shell's WebGL context compiles against them.
42
+ */
43
+ export declare const ANGLE_IOS_HEADERS = "ANGLE/include";
28
44
  /**
29
45
  * Overrides the download with a local folder of XCFrameworks, e.g. the
30
46
  * `out/LynxFrameworks` folder build-lynx-ios-frameworks.sh writes. For testing
@@ -1 +1 @@
1
- {"version":3,"file":"frameworks.d.ts","sourceRoot":"","sources":["../../src/ios/frameworks.ts"],"names":[],"mappings":"AAcA;;;;;;;;GAQG;AACH,eAAO,MAAM,QAAQ;;IAEnB;;;;;OAKG;;;qBAIC,MAAM,GACN,SAAS;CACL,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,gKAYtB,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,cAAc,gCAAgC,CAAC;AAS5D,+EAA+E;AAC/E,eAAO,MAAM,qBAAqB,GAChC,SAAS,MAAM,EACf,KAAK,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,KAC7B,OAAO,CAAC,MAAM,CAmDhB,CAAC;AAaF,uEAAuE;AACvE,eAAO,MAAM,qBAAqB,GAAI,KAAK,MAAM,KAAG,MAAM,GAAG,SAM5D,CAAC"}
1
+ {"version":3,"file":"frameworks.d.ts","sourceRoot":"","sources":["../../src/ios/frameworks.ts"],"names":[],"mappings":"AAcA;;;;;;;;;GASG;AACH,eAAO,MAAM,QAAQ;;IAEnB;;;;;OAKG;;;qBAIC,MAAM,GACN,SAAS;CACL,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,mBAAmB,gKAYtB,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,kCAAmC,CAAC;AAErE;;;GAGG;AACH,eAAO,MAAM,cAAc,uLAGjB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,iBAAiB,kBAAkB,CAAC;AAEjD;;;;GAIG;AACH,eAAO,MAAM,cAAc,gCAAgC,CAAC;AAS5D,+EAA+E;AAC/E,eAAO,MAAM,qBAAqB,GAChC,SAAS,MAAM,EACf,KAAK,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,KAC7B,OAAO,CAAC,MAAM,CAmDhB,CAAC;AAmBF,uEAAuE;AACvE,eAAO,MAAM,qBAAqB,GAAI,KAAK,MAAM,KAAG,MAAM,GAAG,SAM5D,CAAC"}
@@ -4,30 +4,30 @@ import os from 'node:os';
4
4
  import path from 'node:path';
5
5
  import { run } from "../process.js";
6
6
  /**
7
- * The prebuilt Lynx XCFrameworks the iOS shell links.
7
+ * The prebuilt Lynx XCFrameworks the iOS shell links, with ANGLE's.
8
8
  *
9
9
  * Lynx publishes iOS only as source pods, and compiling them takes minutes and
10
10
  * needs CocoaPods (and so Ruby). scripts/build-lynx-ios-frameworks.sh compiles
11
- * them once per Lynx version in CI; the zip it produces is attached to a
12
- * GitHub release and pinned here by SHA-256, so every user links the same
13
- * binaries we tested.
11
+ * them once per Lynx version in CI, along with ANGLE (which needs Chromium's
12
+ * tooling, so is no easier to build on a user's Mac); the zip it produces is
13
+ * attached to a GitHub release and pinned here by SHA-256, so every user
14
+ * links the same binaries we tested.
14
15
  */
15
16
  export const LYNX_IOS = {
16
17
  version: '4.1.0',
17
18
  /**
18
19
  * Counts rebuilds of one Lynx version whose frameworks changed (2 added
19
- * XElement); BUILD in the script. It's part of the cache folder, so a
20
- * machine that cached an older zip downloads the new one instead of
20
+ * XElement, 3 ANGLE); BUILD in the script. It's part of the cache folder,
21
+ * so a machine that cached an older zip downloads the new one instead of
21
22
  * linking frameworks the shell no longer matches.
22
23
  */
23
- build: 2,
24
- url: 'https://github.com/Blotch-Smart-Frames/AngularLynx/releases/download/lynx-ios-4.1.0-2/lynx-ios-4.1.0-2.zip',
25
- sha256: '88d0bbea842da734c3513df2a14e641d85cac645d3f432781af0da7c035e4646',
24
+ build: 3,
25
+ url: 'https://github.com/Blotch-Smart-Frames/AngularLynx/releases/download/lynx-ios-4.1.0-3/lynx-ios-4.1.0-3.zip',
26
+ sha256: 'bc47a48227c9eebb1606ae17d23c0ff4ccc483e667a4e89b47dcb0590fdf0be1',
26
27
  };
27
28
  /**
28
- * The frameworks in the zip. The template project (APP_PROJECT in
29
- * scripts/generate-ios-project.ts) and the frameworks build both read this
30
- * list, so it is the only place to change it.
29
+ * The frameworks the zip has from Lynx's pods. The frameworks build reads
30
+ * this list, so it is the only place to change it.
31
31
  */
32
32
  export const LYNX_IOS_FRAMEWORKS = [
33
33
  'Lynx',
@@ -42,6 +42,25 @@ export const LYNX_IOS_FRAMEWORKS = [
42
42
  'ServalSVG',
43
43
  'MJRefresh',
44
44
  ];
45
+ /**
46
+ * ANGLE's frameworks, which the shell's `<canvas>` draws WebGL with: OpenGL
47
+ * ES 3.0 on Metal (scripts/build-angle-ios-frameworks.sh). libEGL loads
48
+ * libGLESv2 from the app's Frameworks folder.
49
+ */
50
+ export const ANGLE_IOS_FRAMEWORKS = ['libEGL', 'libGLESv2'];
51
+ /**
52
+ * Every framework in the zip, which the template project (APP_PROJECT in
53
+ * scripts/generate-ios-project.ts) links and embeds.
54
+ */
55
+ export const IOS_FRAMEWORKS = [
56
+ ...LYNX_IOS_FRAMEWORKS,
57
+ ...ANGLE_IOS_FRAMEWORKS,
58
+ ];
59
+ /**
60
+ * ANGLE's EGL and OpenGL ES headers, in the zip next to the frameworks: its
61
+ * frameworks have none, and the shell's WebGL context compiles against them.
62
+ */
63
+ export const ANGLE_IOS_HEADERS = 'ANGLE/include';
45
64
  /**
46
65
  * Overrides the download with a local folder of XCFrameworks, e.g. the
47
66
  * `out/LynxFrameworks` folder build-lynx-ios-frameworks.sh writes. For testing
@@ -94,9 +113,16 @@ export const resolveLynxFrameworks = async (logFile, log) => {
94
113
  return frameworks;
95
114
  };
96
115
  const assertComplete = (dir, source) => {
97
- const missing = LYNX_IOS_FRAMEWORKS.filter((name) => !existsSync(path.join(dir, `${name}.xcframework`, 'Info.plist')));
116
+ const missing = [
117
+ ...IOS_FRAMEWORKS.filter((name) => !existsSync(path.join(dir, `${name}.xcframework`, 'Info.plist'))).map((name) => `${name}.xcframework`),
118
+ // A folder from before ANGLE (build 2) has every Lynx framework but
119
+ // these, and the shell wouldn't compile against it.
120
+ ...(existsSync(path.join(dir, ANGLE_IOS_HEADERS, 'EGL/egl.h'))
121
+ ? []
122
+ : [ANGLE_IOS_HEADERS]),
123
+ ];
98
124
  if (missing.length > 0) {
99
- throw new Error(`${source} is missing ${missing.map((name) => `${name}.xcframework`).join(', ')}.`);
125
+ throw new Error(`${source} is missing ${missing.join(', ')}.`);
100
126
  }
101
127
  };
102
128
  /** The Lynx version a frameworks folder was built from, if it says. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blotch/angular-lynx-native",
3
- "version": "22.2.10",
3
+ "version": "22.2.11",
4
4
  "description": "Builds AngularLynx apps into iOS and Android binaries",
5
5
  "homepage": "https://github.com/Blotch-Smart-Frames/AngularLynx#readme",
6
6
  "bugs": {
@@ -40,6 +40,7 @@
40
40
  "generate:ios-project": "vite build",
41
41
  "generate:webgl-ops": "node scripts/webgl-ops.ts",
42
42
  "build:lynx-ios-frameworks": "scripts/build-lynx-ios-frameworks.sh",
43
+ "build:angle-ios-frameworks": "scripts/build-angle-ios-frameworks.sh",
43
44
  "publish:local": "yalc publish --push"
44
45
  },
45
46
  "devDependencies": {
@@ -9,24 +9,25 @@
9
9
  // (`enableMTSModule`). The runtime batches the calls into one `run` per frame;
10
10
  // see packages/runtime/src/lib/canvas/webgl-bridge.ts for the protocol.
11
11
  //
12
- // OpenGL ES is deprecated on iOS but still in the SDK, and its shading
13
- // language, GLSL ES 3.00, is WebGL2's, so three.js's shaders compile as they
14
- // are. GLES_SILENCE_DEPRECATION keeps each GL call from warning.
15
-
16
- #define GLES_SILENCE_DEPRECATION 1
12
+ // The OpenGL ES 3.0 is ANGLE's, on Metal (libEGL and libGLESv2, prebuilt
13
+ // with Lynx's frameworks by scripts/build-angle-ios-frameworks.sh), rather
14
+ // than iOS's own OpenGL ES. Apple deprecated that in iOS 12, and the
15
+ // Simulator runs it on the CPU, where a lit three.js scene took seconds a
16
+ // frame; Metal draws on the GPU on a phone and in the Simulator alike.
17
+ // ANGLE is also what Safari draws WebGL with. Its shading language, GLSL ES
18
+ // 3.00, is WebGL2's, so three.js's shaders compile as they are.
17
19
 
18
20
  #import <Foundation/Foundation.h>
19
21
  #import <Lynx/LynxModule.h>
20
22
  #import <Lynx/LynxUI.h>
21
- #import <OpenGLES/EAGL.h>
22
23
  #import <UIKit/UIKit.h>
23
24
 
24
25
  NS_ASSUME_NONNULL_BEGIN
25
26
 
26
27
  @class AngularLynxCanvasView;
27
28
 
28
- /// The drawing surface: a view backed by a CAEAGLLayer, which the context
29
- /// copies each finished frame into.
29
+ /// The drawing surface: a view backed by a CAMetalLayer, which the context
30
+ /// copies each finished frame into (an EGL window surface on the layer).
30
31
  @interface AngularLynxCanvasView : UIView
31
32
  @property(nonatomic, copy, nullable) NSString *canvasId;
32
33
  @end
@@ -47,8 +48,9 @@ NS_ASSUME_NONNULL_BEGIN
47
48
  + (nullable AngularLynxDecodedImage *)imageWithId:(NSInteger)imageId;
48
49
  @end
49
50
 
50
- /// One WebGL context: an EAGLContext with an offscreen default framebuffer
51
- /// the size of the canvas's `width` and `height`.
51
+ /// One WebGL context: an EGL context on ANGLE's Metal display, with an
52
+ /// offscreen default framebuffer the size of the canvas's `width` and
53
+ /// `height`.
52
54
  @interface AngularLynxWebGLContext : NSObject
53
55
  @property(nonatomic, readonly, copy) NSString *canvasId;
54
56
  - (nullable instancetype)initWithCanvasId:(NSString *)canvasId
@@ -58,8 +60,6 @@ NS_ASSUME_NONNULL_BEGIN
58
60
  - (NSArray *)run:(NSArray *)commands;
59
61
  /// Shows frames in this view, or nowhere while it's nil.
60
62
  - (void)attachView:(nullable AngularLynxCanvasView *)view;
61
- /// The view's size changed: the next frame reallocates its layer's storage.
62
- - (void)viewDidResize;
63
63
  - (void)destroy;
64
64
  @end
65
65
 
@@ -276,18 +276,15 @@ static AngularLynxDecodedImage *decodeImage(NSData *bytes, NSDictionary *options
276
276
  @implementation AngularLynxCanvasView
277
277
 
278
278
  + (Class)layerClass {
279
- return [CAEAGLLayer class];
279
+ return [CAMetalLayer class];
280
280
  }
281
281
 
282
282
  - (instancetype)initWithFrame:(CGRect)frame {
283
283
  if ((self = [super initWithFrame:frame])) {
284
- CAEAGLLayer *layer = (CAEAGLLayer *)self.layer;
285
- // A new drawable each frame, as WebGL's preserveDrawingBuffer: false.
286
- layer.drawableProperties = @{
287
- kEAGLDrawablePropertyRetainedBacking : @NO,
288
- kEAGLDrawablePropertyColorFormat : kEAGLColorFormatRGBA8,
289
- };
290
- layer.opaque = NO;
284
+ // ANGLE sets the layer's device and pixel format when it makes the
285
+ // window surface, and sizes its drawables from the layer's bounds and
286
+ // scale, so the frame copied into it is at the screen's resolution.
287
+ self.layer.opaque = NO;
291
288
  self.opaque = NO;
292
289
  self.contentScaleFactor = UIScreen.mainScreen.scale;
293
290
  // Lynx dispatches touches itself, from the LynxView.
@@ -305,11 +302,6 @@ static AngularLynxDecodedImage *decodeImage(NSData *bytes, NSDictionary *options
305
302
  if (_canvasId) [AngularLynxCanvasRegistry setView:self forCanvasId:_canvasId];
306
303
  }
307
304
 
308
- - (void)layoutSubviews {
309
- [super layoutSubviews];
310
- if (_canvasId) [[AngularLynxCanvasRegistry contextForCanvasId:_canvasId] viewDidResize];
311
- }
312
-
313
305
  - (void)dealloc {
314
306
  // The registry holds the view weakly; a context still showing frames in it
315
307
  // stops.
@@ -1,11 +1,19 @@
1
1
  #import "AngularLynxWebGL.h"
2
2
 
3
- #import <OpenGLES/ES3/gl.h>
4
- #import <OpenGLES/ES3/glext.h>
3
+ #import <EGL/egl.h>
4
+ #import <EGL/eglext.h>
5
+ #import <EGL/eglext_angle.h>
6
+ #import <GLES3/gl3.h>
5
7
  #import <QuartzCore/QuartzCore.h>
6
8
 
7
9
  #import "AngularLynxWebGLOps.h"
8
10
 
11
+ // UIKit's module brings Apple's OpenGL ES headers into every file, and their
12
+ // declarations, marked deprecated, merge with ANGLE's of the same names. The
13
+ // calls still go to ANGLE: the app links libGLESv2 explicitly, ahead of the
14
+ // OpenGLES framework UIKit links automatically.
15
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
16
+
9
17
  NSData *AngularLynxBytesFromWords(NSArray *words);
10
18
 
11
19
  // WebGL's names for the default framebuffer's buffers, which GLES gives to
@@ -103,6 +111,23 @@ static NSArray *wordsFromBytes(const void *bytes, NSUInteger length) {
103
111
  return words;
104
112
  }
105
113
 
114
+ /// ANGLE's display on Metal, made once and shared by every context. Nothing
115
+ /// else in the app draws with ANGLE, so it's never terminated.
116
+ static EGLDisplay metalDisplay(void) {
117
+ static EGLDisplay display = EGL_NO_DISPLAY;
118
+ static dispatch_once_t once;
119
+ dispatch_once(&once, ^{
120
+ const EGLAttrib attributes[] = {EGL_PLATFORM_ANGLE_TYPE_ANGLE,
121
+ EGL_PLATFORM_ANGLE_TYPE_METAL_ANGLE, EGL_NONE};
122
+ EGLDisplay candidate =
123
+ eglGetPlatformDisplay(EGL_PLATFORM_ANGLE_ANGLE, (void *)EGL_DEFAULT_DISPLAY, attributes);
124
+ if (candidate != EGL_NO_DISPLAY && eglInitialize(candidate, NULL, NULL)) {
125
+ display = candidate;
126
+ }
127
+ });
128
+ return display;
129
+ }
130
+
106
131
  static NSString *glString(GLenum name) {
107
132
  const GLubyte *value = glGetString(name);
108
133
  return value ? [NSString stringWithUTF8String:(const char *)value] : @"";
@@ -138,7 +163,9 @@ static NSUInteger componentsOf(GLenum format) {
138
163
  }
139
164
 
140
165
  @implementation AngularLynxWebGLContext {
141
- EAGLContext *_context;
166
+ EGLDisplay _display;
167
+ EGLConfig _config;
168
+ EGLContext _context;
142
169
  BOOL _alpha;
143
170
  BOOL _depth;
144
171
  BOOL _stencil;
@@ -155,13 +182,10 @@ static NSUInteger componentsOf(GLenum format) {
155
182
  GLsizei _width;
156
183
  GLsizei _height;
157
184
 
158
- // The view's layer, as a framebuffer each frame is copied into.
185
+ // The view's layer, as a window surface each frame is copied into. Made
186
+ // when a frame is first shown in the view, as the surface's framebuffer 0.
159
187
  __weak AngularLynxCanvasView *_view;
160
- GLuint _layerFramebuffer;
161
- GLuint _layerBuffer;
162
- GLint _layerWidth;
163
- GLint _layerHeight;
164
- BOOL _layerStale;
188
+ EGLSurface _surface;
165
189
  /// A frame was finished before there was a view to show it in.
166
190
  BOOL _framePending;
167
191
 
@@ -181,11 +205,49 @@ static NSUInteger componentsOf(GLenum format) {
181
205
  error:(NSString **)error {
182
206
  if (!(self = [super init])) return nil;
183
207
  _canvasId = [canvasId copy];
184
- _context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES3];
185
- if (!_context) {
186
- *error = @"This device has no OpenGL ES 3.0";
208
+ _display = metalDisplay();
209
+ if (_display == EGL_NO_DISPLAY) {
210
+ *error = @"ANGLE could not start on Metal";
211
+ return nil;
212
+ }
213
+ // The window surface only receives finished frames: the default
214
+ // framebuffer the app draws to, with its depth, stencil and samples, is
215
+ // the offscreen one below. So the surface needs color and nothing else.
216
+ const EGLint configAttributes[] = {
217
+ EGL_RED_SIZE, 8,
218
+ EGL_GREEN_SIZE, 8,
219
+ EGL_BLUE_SIZE, 8,
220
+ EGL_ALPHA_SIZE, 8,
221
+ EGL_DEPTH_SIZE, 0,
222
+ EGL_STENCIL_SIZE, 0,
223
+ EGL_SAMPLES, 0,
224
+ EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
225
+ EGL_RENDERABLE_TYPE, EGL_OPENGL_ES3_BIT,
226
+ EGL_NONE,
227
+ };
228
+ EGLint configCount = 0;
229
+ if (!eglChooseConfig(_display, configAttributes, &_config, 1, &configCount) ||
230
+ configCount < 1) {
231
+ *error = @"ANGLE has no RGBA8 window config";
187
232
  return nil;
188
233
  }
234
+ // Robust resource initialization makes textures, renderbuffers and
235
+ // buffers made without data read as zeros, as WebGL requires and as
236
+ // browsers get it from ANGLE, rather than as whatever the memory held.
237
+ const EGLint contextAttributes[] = {
238
+ EGL_CONTEXT_MAJOR_VERSION, 3,
239
+ EGL_CONTEXT_MINOR_VERSION, 0,
240
+ EGL_ROBUST_RESOURCE_INITIALIZATION_ANGLE, EGL_TRUE,
241
+ EGL_NONE,
242
+ };
243
+ _context = eglCreateContext(_display, _config, EGL_NO_CONTEXT, contextAttributes);
244
+ if (_context == EGL_NO_CONTEXT) {
245
+ *error = [NSString
246
+ stringWithFormat:@"ANGLE could not make an OpenGL ES 3.0 context (EGL error 0x%x)",
247
+ eglGetError()];
248
+ return nil;
249
+ }
250
+ _surface = EGL_NO_SURFACE;
189
251
  _alpha = ![attributes[@"alpha"] isEqual:@NO];
190
252
  _depth = ![attributes[@"depth"] isEqual:@NO];
191
253
  _stencil = [attributes[@"stencil"] isEqual:@YES];
@@ -194,8 +256,7 @@ static NSUInteger componentsOf(GLenum format) {
194
256
  _namesCapacity = 256;
195
257
  _names = calloc(_namesCapacity, sizeof(GLuint));
196
258
 
197
- EAGLContext *previous = [EAGLContext currentContext];
198
- [EAGLContext setCurrentContext:_context];
259
+ [self makeCurrent];
199
260
  if ([attributes[@"antialias"] isEqual:@NO]) {
200
261
  _samples = 0;
201
262
  } else {
@@ -210,14 +271,10 @@ static NSUInteger componentsOf(GLenum format) {
210
271
  glGenFramebuffers(1, &_resolveFramebuffer);
211
272
  glGenRenderbuffers(1, &_resolveBuffer);
212
273
  }
213
- glGenFramebuffers(1, &_layerFramebuffer);
214
- glGenRenderbuffers(1, &_layerBuffer);
215
- _layerStale = YES;
216
274
  _drawFramebuffer = _framebuffer;
217
275
  _readFramebuffer = _framebuffer;
218
276
  [self allocateDrawingBufferWidth:1 height:1];
219
277
  glBindFramebuffer(GL_FRAMEBUFFER, _framebuffer);
220
- [EAGLContext setCurrentContext:previous];
221
278
  return self;
222
279
  }
223
280
 
@@ -227,20 +284,40 @@ static NSUInteger componentsOf(GLenum format) {
227
284
  }
228
285
 
229
286
  - (void)destroy {
230
- if (!_context) return;
231
- EAGLContext *previous = [EAGLContext currentContext];
232
- [EAGLContext setCurrentContext:_context];
287
+ if (_context == EGL_NO_CONTEXT) return;
288
+ [self makeCurrent];
233
289
  glDeleteFramebuffers(1, &_framebuffer);
234
290
  glDeleteRenderbuffers(1, &_colorBuffer);
235
291
  if (_depthStencilBuffer) glDeleteRenderbuffers(1, &_depthStencilBuffer);
236
292
  if (_resolveFramebuffer) glDeleteFramebuffers(1, &_resolveFramebuffer);
237
293
  if (_resolveBuffer) glDeleteRenderbuffers(1, &_resolveBuffer);
238
- glDeleteFramebuffers(1, &_layerFramebuffer);
239
- glDeleteRenderbuffers(1, &_layerBuffer);
240
294
  for (NSValue *sync in _syncs.allValues) glDeleteSync(sync.pointerValue);
241
295
  [_syncs removeAllObjects];
242
- [EAGLContext setCurrentContext:previous == _context ? nil : previous];
243
- _context = nil;
296
+ // The objects the app made go with the context.
297
+ eglMakeCurrent(_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
298
+ if (_surface != EGL_NO_SURFACE) eglDestroySurface(_display, _surface);
299
+ _surface = EGL_NO_SURFACE;
300
+ eglDestroyContext(_display, _context);
301
+ _context = EGL_NO_CONTEXT;
302
+ }
303
+
304
+ /// Makes this the thread's context, drawing to the view's surface when there
305
+ /// is one (ANGLE has surfaceless contexts for the rest). Nothing else in the
306
+ /// app uses ANGLE, so the context stays current after a batch, and the next
307
+ /// batch for the same canvas skips the switch.
308
+ - (void)makeCurrent {
309
+ if (eglGetCurrentContext() == _context && eglGetCurrentSurface(EGL_DRAW) == _surface) return;
310
+ eglMakeCurrent(_display, _surface, _surface, _context);
311
+ }
312
+
313
+ /// Lets go of the view's surface, which holds its layer.
314
+ - (void)releaseSurface {
315
+ if (_surface == EGL_NO_SURFACE) return;
316
+ if (eglGetCurrentSurface(EGL_DRAW) == _surface) {
317
+ eglMakeCurrent(_display, EGL_NO_SURFACE, EGL_NO_SURFACE, _context);
318
+ }
319
+ eglDestroySurface(_display, _surface);
320
+ _surface = EGL_NO_SURFACE;
244
321
  }
245
322
 
246
323
  #pragma mark - Default framebuffer
@@ -343,49 +420,43 @@ static NSUInteger componentsOf(GLenum format) {
343
420
  }
344
421
 
345
422
  - (void)attachView:(AngularLynxCanvasView *)view {
346
- if (_view == view) return;
423
+ // A view that went away has already turned _view (weak) to nil, but its
424
+ // layer lives on in the surface until the surface is let go of here.
425
+ if (_view == view && (view || _surface == EGL_NO_SURFACE)) return;
426
+ [self releaseSurface];
347
427
  _view = view;
348
- _layerStale = YES;
349
428
  if (view) {
350
- CAEAGLLayer *layer = (CAEAGLLayer *)view.layer;
351
- layer.opaque = !_alpha;
429
+ view.layer.opaque = !_alpha;
352
430
  view.opaque = !_alpha;
353
431
  if (_framePending) [self present];
354
432
  }
355
433
  }
356
434
 
357
- - (void)viewDidResize {
358
- _layerStale = YES;
359
- }
360
-
361
435
  /// Shows the finished frame: copies the default framebuffer (resolving it
362
436
  /// when it's multisampled) into the view's layer, scaled to its size, and
363
437
  /// presents it. Without a laid-out view, the frame waits for one.
364
438
  - (void)present {
365
439
  AngularLynxCanvasView *view = _view;
366
440
  CGSize size = view.bounds.size;
367
- if (!view || size.width < 1 || size.height < 1) {
441
+ // ANGLE sizes the layer's next drawable from its bounds and scale, as
442
+ // here, when the blit below first draws to it.
443
+ CGFloat scale = view.layer.contentsScale;
444
+ GLint layerWidth = (GLint)(size.width * scale);
445
+ GLint layerHeight = (GLint)(size.height * scale);
446
+ if (!view || layerWidth < 1 || layerHeight < 1) {
368
447
  _framePending = YES;
369
448
  return;
370
449
  }
371
- EAGLContext *previous = [EAGLContext currentContext];
372
- [EAGLContext setCurrentContext:_context];
373
- CAEAGLLayer *layer = (CAEAGLLayer *)view.layer;
374
- if (_layerStale) {
375
- _layerStale = NO;
376
- glBindRenderbuffer(GL_RENDERBUFFER, _layerBuffer);
377
- [_context renderbufferStorage:GL_RENDERBUFFER fromDrawable:layer];
378
- glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &_layerWidth);
379
- glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &_layerHeight);
380
- glBindFramebuffer(GL_FRAMEBUFFER, _layerFramebuffer);
381
- glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, _layerBuffer);
382
- }
383
- if (_layerWidth < 1 || _layerHeight < 1) {
384
- _framePending = YES;
385
- [self restoreBindings];
386
- [EAGLContext setCurrentContext:previous];
387
- return;
450
+ if (_surface == EGL_NO_SURFACE) {
451
+ _surface = eglCreateWindowSurface(_display, _config, (__bridge EGLNativeWindowType)view.layer,
452
+ NULL);
453
+ if (_surface == EGL_NO_SURFACE) {
454
+ NSLog(@"[AngularLynxWebGL] No window surface for the canvas (EGL error 0x%x)", eglGetError());
455
+ _framePending = YES;
456
+ return;
457
+ }
388
458
  }
459
+ [self makeCurrent];
389
460
  // A blit is clipped by the scissor test, and skipped with rasterizer
390
461
  // discard on, so both are off while the frame is copied.
391
462
  GLboolean scissor = glIsEnabled(GL_SCISSOR_TEST);
@@ -402,12 +473,14 @@ static NSUInteger componentsOf(GLenum format) {
402
473
  }
403
474
  glBindFramebuffer(GL_READ_FRAMEBUFFER, source);
404
475
  glReadBuffer(GL_COLOR_ATTACHMENT0);
405
- glBindFramebuffer(GL_DRAW_FRAMEBUFFER, _layerFramebuffer);
406
- BOOL sameSize = _layerWidth == _width && _layerHeight == _height;
407
- glBlitFramebuffer(0, 0, _width, _height, 0, 0, _layerWidth, _layerHeight, GL_COLOR_BUFFER_BIT,
476
+ // Framebuffer 0 is the window surface's.
477
+ glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
478
+ BOOL sameSize = layerWidth == _width && layerHeight == _height;
479
+ glBlitFramebuffer(0, 0, _width, _height, 0, 0, layerWidth, layerHeight, GL_COLOR_BUFFER_BIT,
408
480
  sameSize ? GL_NEAREST : GL_LINEAR);
409
- glBindRenderbuffer(GL_RENDERBUFFER, _layerBuffer);
410
- [_context presentRenderbuffer:GL_RENDERBUFFER];
481
+ if (!eglSwapBuffers(_display, _surface)) {
482
+ NSLog(@"[AngularLynxWebGL] Showing a frame failed (EGL error 0x%x)", eglGetError());
483
+ }
411
484
  _framePending = NO;
412
485
  if (scissor) glEnable(GL_SCISSOR_TEST);
413
486
  if (discard) glEnable(GL_RASTERIZER_DISCARD);
@@ -415,7 +488,6 @@ static NSUInteger componentsOf(GLenum format) {
415
488
  // asked to keep it.
416
489
  if (!_preserveDrawingBuffer) [self clearDrawingBuffer];
417
490
  [self restoreBindings];
418
- [EAGLContext setCurrentContext:previous];
419
491
  }
420
492
 
421
493
  - (void)restoreBindings {
@@ -888,9 +960,8 @@ static BOOL isUnsignedUniform(GLenum type) {
888
960
  #pragma mark - Running a batch
889
961
 
890
962
  - (NSArray *)run:(NSArray *)commands {
891
- if (!_context) return @[];
892
- EAGLContext *previous = [EAGLContext currentContext];
893
- if (previous != _context) [EAGLContext setCurrentContext:_context];
963
+ if (_context == EGL_NO_CONTEXT) return @[];
964
+ [self makeCurrent];
894
965
  NSUInteger count = commands.count;
895
966
  __unsafe_unretained id *items = (__unsafe_unretained id *)malloc(sizeof(id) * MAX(count, 1));
896
967
  [commands getObjects:items range:NSMakeRange(0, count)];
@@ -907,7 +978,6 @@ static BOOL isUnsignedUniform(GLenum type) {
907
978
  }
908
979
  }
909
980
  free(items);
910
- if (previous != _context) [EAGLContext setCurrentContext:previous];
911
981
  return results;
912
982
  }
913
983
 
@@ -8,7 +8,10 @@
8
8
 
9
9
  /* Begin PBXBuildFile section */
10
10
  09889B93414D48EE3B7BB794 /* LynxBase.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 03FA19016485E5D5DFE1595F /* LynxBase.xcframework */; };
11
+ 0B58C4F5F3898537062D124A /* libEGL.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 6B2DE55E1200251D6DCD0354 /* libEGL.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
11
12
  0E3870431039EBF246629EDC /* LynxBase.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 03FA19016485E5D5DFE1595F /* LynxBase.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
13
+ 117B6E6F235D4E5FB80B4B57 /* libGLESv2.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = A914047A607EB6B4F7C19081 /* libGLESv2.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
14
+ 242E051136C9D8C89FC082A9 /* libGLESv2.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = A914047A607EB6B4F7C19081 /* libGLESv2.xcframework */; };
12
15
  24F6F7C0ED16226B5F4CEC64 /* libwebp.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 22AE3F7CF67B188787336BFA /* libwebp.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
13
16
  3222B5E4F829B616E7F195E6 /* LynxService.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 59F6406B1F8C89E22DDE0B86 /* LynxService.xcframework */; };
14
17
  333153D6D20AE3F4F4F0F232 /* XElement.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = CA3E9DB48B8E7102AFB3F9D3 /* XElement.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
@@ -30,6 +33,7 @@
30
33
  E0F04E5FF5F7548B94615806 /* MJRefresh.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = A479BE709FC284B487B4B3EE /* MJRefresh.xcframework */; };
31
34
  ED8182CEA14283E4D2AB28E9 /* SDWebImageWebPCoder.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 938799E9025522AF0DB08F41 /* SDWebImageWebPCoder.xcframework */; };
32
35
  F9F12589EAE493E887916AB0 /* XElement.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA3E9DB48B8E7102AFB3F9D3 /* XElement.xcframework */; };
36
+ FE42BAC83F5CAE91DD170387 /* libEGL.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6B2DE55E1200251D6DCD0354 /* libEGL.xcframework */; };
33
37
  /* End PBXBuildFile section */
34
38
 
35
39
  /* Begin PBXCopyFilesBuildPhase section */
@@ -50,6 +54,8 @@
50
54
  333153D6D20AE3F4F4F0F232 /* XElement.xcframework in Embed Frameworks */,
51
55
  5D986CA1D5DAB3B9F6D299F5 /* ServalSVG.xcframework in Embed Frameworks */,
52
56
  55C00449AF3D55EB900A1B9A /* MJRefresh.xcframework in Embed Frameworks */,
57
+ 0B58C4F5F3898537062D124A /* libEGL.xcframework in Embed Frameworks */,
58
+ 117B6E6F235D4E5FB80B4B57 /* libGLESv2.xcframework in Embed Frameworks */,
53
59
  );
54
60
  name = "Embed Frameworks";
55
61
  runOnlyForDeploymentPostprocessing = 0;
@@ -66,9 +72,11 @@
66
72
  22AE3F7CF67B188787336BFA /* libwebp.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = libwebp.xcframework; sourceTree = "<group>"; };
67
73
  33520879069FA35A78AACE2A /* Config/App.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Config/App.xcconfig; sourceTree = "<group>"; };
68
74
  59F6406B1F8C89E22DDE0B86 /* LynxService.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = LynxService.xcframework; sourceTree = "<group>"; };
75
+ 6B2DE55E1200251D6DCD0354 /* libEGL.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = libEGL.xcframework; sourceTree = "<group>"; };
69
76
  6B827DF13C44D4B05B7DAE8C /* PrimJS.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = PrimJS.xcframework; sourceTree = "<group>"; };
70
77
  938799E9025522AF0DB08F41 /* SDWebImageWebPCoder.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = SDWebImageWebPCoder.xcframework; sourceTree = "<group>"; };
71
78
  A479BE709FC284B487B4B3EE /* MJRefresh.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = MJRefresh.xcframework; sourceTree = "<group>"; };
79
+ A914047A607EB6B4F7C19081 /* libGLESv2.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = libGLESv2.xcframework; sourceTree = "<group>"; };
72
80
  CA3E9DB48B8E7102AFB3F9D3 /* XElement.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = XElement.xcframework; sourceTree = "<group>"; };
73
81
  D84EC48E5D673EC745AF0F7D /* LynxBundle */ = {isa = PBXFileReference; lastKnownFileType = folder; path = LynxBundle; sourceTree = "<group>"; };
74
82
  /* End PBXFileReference section */
@@ -110,6 +118,8 @@
110
118
  F9F12589EAE493E887916AB0 /* XElement.xcframework in Frameworks */,
111
119
  481B830F1B162EF6665B22C7 /* ServalSVG.xcframework in Frameworks */,
112
120
  E0F04E5FF5F7548B94615806 /* MJRefresh.xcframework in Frameworks */,
121
+ FE42BAC83F5CAE91DD170387 /* libEGL.xcframework in Frameworks */,
122
+ 242E051136C9D8C89FC082A9 /* libGLESv2.xcframework in Frameworks */,
113
123
  );
114
124
  runOnlyForDeploymentPostprocessing = 0;
115
125
  };
@@ -149,6 +159,8 @@
149
159
  CA3E9DB48B8E7102AFB3F9D3 /* XElement.xcframework */,
150
160
  1555CF4C65B98EB4D3757A5B /* ServalSVG.xcframework */,
151
161
  A479BE709FC284B487B4B3EE /* MJRefresh.xcframework */,
162
+ 6B2DE55E1200251D6DCD0354 /* libEGL.xcframework */,
163
+ A914047A607EB6B4F7C19081 /* libGLESv2.xcframework */,
152
164
  );
153
165
  path = Frameworks;
154
166
  sourceTree = "<group>";
@@ -240,6 +252,10 @@
240
252
  ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
241
253
  CODE_SIGN_STYLE = Automatic;
242
254
  GENERATE_INFOPLIST_FILE = NO;
255
+ HEADER_SEARCH_PATHS = (
256
+ "$(inherited)",
257
+ "$(PROJECT_DIR)/Frameworks/ANGLE/include",
258
+ );
243
259
  INFOPLIST_FILE = App/Info.plist;
244
260
  LD_RUNPATH_SEARCH_PATHS = (
245
261
  "$(inherited)",
@@ -309,6 +325,10 @@
309
325
  ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
310
326
  CODE_SIGN_STYLE = Automatic;
311
327
  GENERATE_INFOPLIST_FILE = NO;
328
+ HEADER_SEARCH_PATHS = (
329
+ "$(inherited)",
330
+ "$(PROJECT_DIR)/Frameworks/ANGLE/include",
331
+ );
312
332
  INFOPLIST_FILE = App/Info.plist;
313
333
  LD_RUNPATH_SEARCH_PATHS = (
314
334
  "$(inherited)",