Bug 1573255 - Add a comment to explain the bounds of blobs. r=jrmuizel

Steal Alexis' comment about blob bounds.

Differential Revision: https://phabricator.services.mozilla.com/D41633

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Kris Taeleman 2019-08-12 20:10:18 +00:00
parent 3ee28a80a5
commit ca9677ba54

View File

@ -841,9 +841,9 @@ struct DIGroup {
// Ideally we would drop these items earlier...
item->GetType() != DisplayItemType::TYPE_COMPOSITOR_HITTEST_INFO) {
if (dirty) {
// What should the clip settting strategy be? We can set the full clip
// everytime. this is probably easiest for now. An alternative would
// be to put the push and the pop into separate items and let
// What should the clip settting strategy be? We can set the full
// clip everytime. this is probably easiest for now. An alternative
// would be to put the push and the pop into separate items and let
// invalidation handle it that way.
DisplayItemClip currentClip = paintedItem->GetClip();
@ -859,8 +859,8 @@ struct DIGroup {
}
paintedItem->Paint(aGrouper->mDisplayListBuilder, aContext);
TakeExternalSurfaces(aRecorder, data->mExternalSurfaces, aRootManager,
aResources);
TakeExternalSurfaces(aRecorder, data->mExternalSurfaces,
aRootManager, aResources);
if (currentClip.HasClip()) {
aContext->Restore();
@ -1470,6 +1470,12 @@ void WebRenderCommandBuilder::DoGroupingForDisplayList(
auto p = group.mGroupBounds;
auto q = groupBounds;
// XXX: we currently compute the paintRect for the entire svg, but if the svg
// gets split into multiple groups (blobs), then they will all inherit this
// overall size even though they may each be much smaller. This can lead to
// allocating much larger textures than necessary in webrender.
//
// Dont bother fixing this unless we run into this in the real world, though.
GP("Bounds: %d %d %d %d vs %d %d %d %d\n", p.x, p.y, p.width, p.height, q.x,
q.y, q.width, q.height);
if (!group.mGroupBounds.IsEqualEdges(groupBounds) ||