Bug 1723429 - Remove snapping from shadow primitive offsets r=aosmond,gfx-reviewers

The pending primitives have already been snapped, so this only
has an effect if the shadow offset is fractional. If that's the
case, it's probably reasonable to either (a) not snap at all,
or (b) round the shadow offset earlier.

Differential Revision: https://phabricator.services.mozilla.com/D121500
This commit is contained in:
Glenn Watson 2021-08-03 20:36:04 +00:00
Родитель 0e6ae6e8d0
Коммит e8dde5e24e
1 изменённых файлов: 2 добавлений и 8 удалений

Просмотреть файл

@ -2808,14 +2808,8 @@ impl<'a> SceneBuilder<'a> {
// changing because the shadow has the same raster space as the
// primitive, and thus we know the size is already rounded.
let mut info = pending_primitive.info.clone();
info.rect = self.snap_rect(
&info.rect.translate(pending_shadow.shadow.offset),
pending_primitive.spatial_node_index,
);
info.clip_rect = self.snap_rect(
&info.clip_rect.translate(pending_shadow.shadow.offset),
pending_primitive.spatial_node_index,
);
info.rect = info.rect.translate(pending_shadow.shadow.offset);
info.clip_rect = info.clip_rect.translate(pending_shadow.shadow.offset);
// Construct and add a primitive for the given shadow.
let shadow_prim_instance = self.create_primitive(