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
[WIP]RasterCache adds a new mechanism for particularly complex pictures or display lists #31925
Closed
ColdPaleLight
wants to merge
11
commits into
flutter:main
from
ColdPaleLight:particularly_complex_cache_entry
Closed
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
b8f53ff
RasterCache adds a new mechanism for particularly complex pictures or…
ColdPaleLight e2194eb
fix typo
ColdPaleLight c5bfc8b
Tweak the code and add some comments
ColdPaleLight 0a4e7c0
re-using the 'is_complex' flag
ColdPaleLight 35b8982
tweak comment
ColdPaleLight c3401b6
Revert "tweak comment"
ColdPaleLight 5842cc8
Revert "re-using the 'is_complex' flag"
ColdPaleLight 18dc81b
Keep 'is_complex' and 'is_high_priority' orthogonal
ColdPaleLight c99c52f
Tweak some code in raster cache
ColdPaleLight 36a7f86
Merge branch 'flutter:main' into particularly_complex_cache_entry
ColdPaleLight 7537885
Merge branch 'flutter:main' into particularly_complex_cache_entry
ColdPaleLight File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Tweak the code and add some comments
- Loading branch information
commit c5bfc8bb85b4d7fd7b2c42f8a72f5f4892a6c397
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -308,7 +308,9 @@ class RasterCache { | |
| size_t access_count = 0; | ||
| size_t unused_count = 0; | ||
| std::unique_ptr<RasterCacheResult> image; | ||
| size_t unused_threshold() const { return is_high_priority ? 3 : 1; } | ||
| // Return the number of frames the entry survives if it is not used. If the | ||
| // number is 0, then it will be evicted when not in use. | ||
| size_t unused_threshold() const { return is_high_priority ? 3 : 0; } | ||
|
||
| }; | ||
|
|
||
| void Touch(const RasterCacheKey& cache_key); | ||
|
|
||
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
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.
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.
Maybe have a function
metrics_for(kind)ormetrics_for(<type of it.first>)to simplify all 3 cases where we have to choose a metrics to modify?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.
done, added a new method
GetMetricsForKind.