Make persistent frame or tiles.

43 views
Skip to first unread message

inve...@yandex-team.ru

unread,
Aug 3, 2018, 7:38:38 AM8/3/18
to Graphics-dev
Hello.
I want to support instant scroll to some point on the page.
Simple example - instant scroll to top of the page, to frame with (0, 0) coordinates.

But there is a problem with drawing full new frame for new position. On low end devices it is drawn slow.

So that I want to store somewhere those frames or tiles when the user see them.

And after instant scroll to some checkpoint, the browser should show this old cached frame till the new one will be ready.

I suppose i have to create new TilePriority and TileMemoryLimitPolicy to forbid to the browser to drop this tile.
But I think it would be better do it somewhere on render_widget level. It seems easy to deal with complete frames rather than tiles.

Does Chromium have something similar?
Could you give me some advice?

Adrienne Walker

unread,
Aug 3, 2018, 1:25:12 PM8/3/18
to inve...@yandex-team.ru, Graphics-dev
I think modifying tile priorities is going to be the way to do this.  Probably something in PictureLayerTiling::ComputePriorityForTile or around there.  The other problem is that PictureLayerTiling has a live_tiles_rect_ that removes tiles outside of it (no matter what their priority) when it falls outside the rect (because the user has scrolled far away), so you're going to have to handle that as well.

inve...@yandex-team.ru

unread,
Aug 7, 2018, 10:34:49 AM8/7/18
to Graphics-dev, inve...@yandex-team.ru
Thanks for answer, especially about live_tiles_rect_.

I'm going to create a similar mechanism without looking on tile's priority.
It will be some persistent_rect_. And I will store InUsePoolResource of all tiles inside this persistent_rect_.
And when a new tiles will be created inside the persistent_rect_, I will pass the old InUsePoolResource to them.

суббота, 4 августа 2018 г., 0:25:12 UTC+7 пользователь Adrienne Walker написал:
Reply all
Reply to author
Forward
0 new messages