Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upRasterize blob images during scene building #2759
Comments
|
When I was thinking about your suggestion to just paint on the Gecko side and some things that @mstange said about the visible rect, I thought of an even easier solution to this. When Gecko builds the display list, it only includes items that are in the display port. In order to do that it keeps track of a current visible rect. Some of these items may extend beyond the visible rect, but items which are entirely outside will get culled. WebRender should never paint more than this visible rect because that will give inconsistent results for the areas outside of it. The visible rect gets computed and stored on each display item during display list building. We can send the visible rect of the outer display item to webrender and it can just use that during scene building to request and wait for the all of the tiles of the blob image that are in that rect. This avoids having to do any major surgery on webrender. Why not just size the blob image to the visible rect? Having a larger blob image gives us more flexibility when updating the blob image because we can just change the visible rect without having to update all of the contents. |
Nice! sounds like we could clip the bounds of the image display items to this visible rect. you are referring to nsDisplayItem::mVisibleRect, right? |
|
Correct. |
|
@nical Can this be closed now? |
Blob images can some times take forever to rasterize and blocking scrolling on it looks bad.
There is a variety of things we can do to improve this but I'll focus here on the short-term solution that can be improved upon later: During scene building, clip blob images against the display port (which is relatively small at the moment) and rasterize them directly. This should get rid of the majority of cases where we rasterize blobs during frame building.
To do this we need clips and transforms, so I'll split the clip scroll tree update into the part that resolves transforms/clips and the part that makes gpu cache requests so that the former can be done in the scene builder to figure out blob images.
Then we'll see how things go from there.