Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@yjbanov
Copy link
Contributor

@yjbanov yjbanov commented Apr 13, 2023

Move all classes implementing the Shader interface from ManagedSkiaObject to UniqueRef.

Fix two (probably minor) memory leaks:

  • CkImageShader was leaking intermediate instances of SkShader because those were neither attached to a FinalizationRegistry, nor disposed of explicitly through the dispose() method.
  • CkFragmentShader was leaking SkShader instances because it never called CkFragmentInstance.dispose. Additionally, the CkFragmentInstance class isn't really necessary, because UniqueRef is fully sufficient to manage instances of SkShader objects for fragment shaders.

@flutter-dashboard flutter-dashboard bot added the platform-web Code specifically for the web engine label Apr 13, 2023
Copy link
Contributor

@harryterkelsen harryterkelsen left a comment

Choose a reason for hiding this comment

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

LGTM

@yjbanov yjbanov added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 14, 2023
@auto-submit auto-submit bot merged commit 460668f into flutter:main Apr 14, 2023
zhongwuzw pushed a commit to zhongwuzw/engine that referenced this pull request Apr 14, 2023
…utter#41172)

[web:canvaskit] move shaders to UniqueRef; fix minor memory leaks
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App platform-web Code specifically for the web engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants