RESOLVED FIXED 127390
WebKit2 View Gestures (Swipe): Snapshots should be purgeable
https://bugs.webkit.org/show_bug.cgi?id=127390
Summary WebKit2 View Gestures (Swipe): Snapshots should be purgeable
Tim Horton
Reported 2014-01-21 18:10:00 PST
In the interests of allowing the operating system to clean up snapshots when the system is under memory pressure, they should be made purgeable. We could even assign purgeability priority outwards from the current back-forward item to help further-away snapshots get thrown away first.
Attachments
patch take 1 (13.23 KB, patch)
2014-01-28 03:42 PST, Tim Horton
no flags
patch (14.74 KB, patch)
2014-01-28 11:03 PST, Tim Horton
andersca: review+
Radar WebKit Bug Importer
Comment 1 2014-01-21 18:10:31 PST
Tim Horton
Comment 2 2014-01-28 03:42:22 PST
Created attachment 222427 [details] patch take 1 Not sure if scanning the b-f list is too expensive. I'm sure there's a faster way... Not sure if we actually want to wait, with a white snapshot view, if the image has been purged/evicted; maybe we should just switch immediately in that case. I would kind of like ViewSnapshotStore to own the purgeability story, but I'm not totally sure how to make that work yet. Would love it if someone had an easy way to make CGImage purgeable, but I don't see anything.
Tim Horton
Comment 3 2014-01-28 11:03:41 PST
Anders Carlsson
Comment 4 2014-01-28 11:12:09 PST
Comment on attachment 222467 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=222467&action=review > Source/WebKit2/UIProcess/mac/ViewGestureController.mm:51 > +static const uint32_t WebKitIOSurfacePurgeableNonVolatile = 0; > +static const uint32_t WebKitIOSurfacePurgeableVolatile = 1; > +static const uint32_t WebKitIOSurfacePurgeableEmpty = 2; I think you should use a real enum here with real IOSurface names. > Source/WebKit2/UIProcess/mac/ViewSnapshotStore.mm:46 > +static const uint32_t WebKitIOSurfacePurgeableVolatile = 1; Real enum.
Tim Horton
Comment 5 2014-01-28 11:29:32 PST
Tim Horton
Comment 6 2014-01-28 11:31:22 PST
*** Bug 127389 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.