-
Notifications
You must be signed in to change notification settings - Fork 6k
Skwasm platform views #43011
Skwasm platform views #43011
Conversation
…he core engine code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! LGTM with nits
} | ||
|
||
@override | ||
PlatformViewStyling createPlatformViewStyling() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imo it would be cleaner to separate out the clip styling into a separate class. I don't think the layers should have this logic in them
|
||
scene.beginRender(); | ||
final List<LayerSlice> slices = scene.rootLayer.slices; | ||
final Iterable<Future<DomImageBitmap?>> renderFutures = slices.map( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: might be cleaner to use whereType to filter out the PlatformViewSlices rather than make a list of nullable futures
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason I did it this way is so that I can extract them by index when I'm iterating the slices themselves. If we use whereType
there is no simple way to correlate the image bitmap with the slice it was rendered from.
…133508) flutter/engine@91522a1...a7a4c1c 2023-08-28 [email protected] Explain how to update the embedder/fixtures golden outputs. (flutter/engine#45184) 2023-08-28 [email protected] Roll Skia from ded5d08a9999 to 83f6fbad8a38 (1 revision) (flutter/engine#45183) 2023-08-28 [email protected] [Impeller] Simplify color source + text with new Skia API. (flutter/engine#45090) 2023-08-28 [email protected] Re-write docs for DlSkCanvas{Adapter|Dispatcher}. (flutter/engine#44961) 2023-08-28 [email protected] Roll Skia from 5baa2c74fbc6 to ded5d08a9999 (1 revision) (flutter/engine#45181) 2023-08-28 [email protected] Roll Skia from 651ada29fcb0 to 5baa2c74fbc6 (2 revisions) (flutter/engine#45178) 2023-08-28 [email protected] Roll Skia from 477659e6f41b to 651ada29fcb0 (3 revisions) (flutter/engine#45176) 2023-08-28 [email protected] [Impeller] Only enable captures in debug builds. (flutter/engine#45174) 2023-08-28 [email protected] Roll Skia from ce99ad7b587e to 477659e6f41b (1 revision) (flutter/engine#45173) 2023-08-28 [email protected] Skwasm platform views (flutter/engine#43011) 2023-08-28 [email protected] Roll Skia from df783b542165 to ce99ad7b587e (2 revisions) (flutter/engine#45172) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
This implements platform views in Skwasm. There are a number of substantial changes rolled up in this change, including: * Reworked the rendering system to use multiple canvases with a single WebGL context, via ImageBitmap rendering. * Reworked our object management and bindings to use the `__externref_t` construct in C code. * Upgraded emscripten to a much newer version * Generified skwasm's scene builder to be able to work with any renderer that can produce `ImageBitmap` objects from Pictures, and whose `Canvas`, `Picture` and `ImageFilter` objects conform to `SceneCanvas`/`ScenePicture`/`SceneImageFilter` For platform views themselves, most stuff is implemented except for clipping. I plan on doing that in a subsequent change.
This implements platform views in Skwasm. There are a number of substantial changes rolled up in this change, including:
__externref_t
construct in C code.ImageBitmap
objects from Pictures, and whoseCanvas
,Picture
andImageFilter
objects conform toSceneCanvas
/ScenePicture
/SceneImageFilter
For platform views themselves, most stuff is implemented except for clipping. I plan on doing that in a subsequent change.