This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
Remove image sizes from Picture::GetAllocationSize #20673
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Including images in the size of a Picture may overstate the picture's memory usage. The picture may not be the only object holding a reference to the image (possibly because the image is owned by the framework's image cache). If Dart thinks that the size of the picture includes the image's size, then Dart will more aggressively garbage collect the picture. But deleting the picture will not delete the image, and the extra GCs may cause jank. Fixes flutter/flutter#63876
dnfield
reviewed
Aug 21, 2020
@@ -327,7 +327,6 @@ void Canvas::drawImage(const CanvasImage* image, | |||
ToDart("Canvas.drawImage called with non-genuine Image.")); | |||
return; | |||
} | |||
external_allocation_size_ += image->GetAllocationSize(); |
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.
I think this means I'll have to re-work the way the hint_freed patch was plumbing through that an image was freed up.
dnfield
approved these changes
Aug 21, 2020
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.
LGTM
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Aug 22, 2020
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Aug 22, 2020
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Aug 22, 2020
christopherfujino
added a commit
that referenced
this pull request
Aug 27, 2020
* update dart revision * Fix EGL_BAD_SURFACE when app is paused (#20735) * The `ForwardingGestureRecognizers` to have back reference to the `PlatformViewsController` so it can access `FlutterViewController` when its available (#20708) * Remove image sizes from Picture::GetAllocationSize (#20673) * update licenses golden Co-authored-by: Emmanuel Garcia <[email protected]> Co-authored-by: Chris Yang <[email protected]> Co-authored-by: Jason Simmons <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
cla: yes
waiting for tree to go green
This PR is approved and tested, but waiting for the tree to be green to land.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Including images in the size of a Picture may overstate the picture's
memory usage. The picture may not be the only object holding a
reference to the image (possibly because the image is owned by the
framework's image cache).
If Dart thinks that the size of the picture includes the image's size,
then Dart will more aggressively garbage collect the picture. But
deleting the picture will not delete the image, and the extra GCs may
cause jank.
Fixes flutter/flutter#63876