Skip to content
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

Adoption of RenderNode approach #1014

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Conversation

MatkovIvan
Copy link
Member

It is a simplified adoption of Android's RenderNode.

/**
 * <p>RenderNode is used to build hardware accelerated rendering hierarchies. Each RenderNode
 * contains both a display list as well as a set of properties that affect the rendering of the
 * display list. RenderNodes are used internally for all Views by default and are not typically
 * used directly.</p>
 *
 * <p>RenderNodes are used to divide up the rendering content of a complex scene into smaller
 * pieces that can then be updated individually more cheaply. Updating part of the scene only needs
 * to update the display list or properties of a small number of RenderNode instead of redrawing
 * everything from scratch. A RenderNode only needs its display list re-recorded when its content
 * alone should be changed. RenderNodes can also be transformed without re-recording the display
 * list through the transform properties.</p>

This is a more correct approach to make GraphicsLayer in Compose invalidation independently.

  • Moved drawing callback to C++ side to avoid extra interop costs
  • Switched from SkPicture placeholder to custom SkDrawable implementation

MatkovIvan added a commit that referenced this pull request Jan 20, 2025
That approach worked but had performance issues. Also, `SkPicture` is
immutable by design, so we shouldn't try to change that.

#1014 is a more correct and efficient way to implement it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant