Skip to content

Lazy skwasm paths and object arenas. #168996

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

eyebrowsoffire
Copy link
Contributor

No description provided.

@github-actions github-actions bot added engine flutter/engine repository. See also e: labels. platform-web Web applications specifically labels May 16, 2025
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

abstract class Collectable {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Flutter codebase prefers American English (e.g. "color" instead of "colour"), so this should probably be "Collectible".

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Collectable is fine American English. 😄

@@ -740,7 +741,7 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher {
// order to perform golden tests in Flutter framework because on the HTML
// renderer, golden tests render to DOM and then take a browser screenshot,
// https://github.com/flutter/flutter/issues/137073.
if (shouldRender || renderer.rendererTag == 'html') {
if (shouldRender) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

@@ -234,7 +234,7 @@ class SkwasmPath extends SkwasmObjectWrapper<RawPath> implements ScenePath {
SkwasmPath.fromHandle(pathCombine(operation.index, path1.handle, path2.handle));

@override
ui.PathMetrics computeMetrics({bool forceClosed = false}) {
DisposablePathMetrics computeMetrics({bool forceClosed = false}) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious why not be more specific here and say SkwasmPathMetrics?

@@ -35,6 +35,7 @@ abstract class Renderer {
}
}

Arena get frameArena;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The arena itself seems to be renderer-agnostic. Should we put it in EnginePlatformDispatcher instead?

Comment on lines +364 to +368
LazyPath.fromLazyPath(LazyPath other)
: fillType = other.fillType,
constructors = other.constructors,
initializer = other.initializer,
_commands = List.from(other._commands);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there's a way to copy a SkwasmPath (and it's cheap), would it be beneficial to also copy _cachedPath to avoid re-applying all the commands later?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engine flutter/engine repository. See also e: labels. platform-web Web applications specifically
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy