[Webkit-unassigned] [Bug 95758] [chromium] Adjust texture priorities in preparation of impl-thread eviction of only some textures

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 5 12:43:34 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=95758





--- Comment #14 from Eric Penner <epenner at chromium.org>  2012-09-05 12:43:47 PST ---
> I moved the lingering state to be at a higher priority here because that state is often for elements that will suddenly appear on-screen (say, on mouse-over), and so I don't want to have them matter less than tiles that are basically infinitely far away.  This is to not regress these sorts of UIs when discarding textures that are very far away.  If I don't make this change, the I cannot discard in order of priority without discarding all lingering tiles before discarding any tiles that were visible many screens ago.

I think this will help but doesn't eliminate the problem of using all memory, it just moves it into the lingering category. Since this is short term I'm okay with it though. Keep in mind that on Android we do want to cache up to the max limit always, until paint speed is dramatically increased.

> I changed the units for distance from pixels to viewports so that I can specify "discard all textures that are >1 viewport away" (and things to that effect) for memory management.

I think this could be achieved by just being a bit more loose about what you call "one viewport". The viewport width and height aren't even in the layer's space (what if it's rotated for example), so scaling by them doesn't make sense when measuring distance within a layer, unless you transform them into vectors in content space, which would be overkill. Similarly the scroll velocity isn't effected by viewport size as Dana mentions, so we don't think it should effect the amount cached in each direction, which non-uniform scaling of the distance metric would do.

So I'm saying maybe "one viewport" could just be loosely defined as say "(viewport_width+viewport_height)/2 pixels". This could be done after the fact when discarding textures based on priority level, or baked it into the priority. It's just a quick way to create a 1D yard-stick instead of a 2D one. Personally I like doing it after the fact actually, and keeping pixel units for clarity and debugging.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list