Bug 1613114 - Remove rounding the backdrop filter bounds during WR display list building. r=jrmuizel

No other items need to round their bounds/clips, and backdrop filters
should be no exception. They should trust scene building (and to a
lesser extent, frame building) to perform any necessary snapping. This
patch also removes the ToRoundedLayoutPoint/Rect methods as there are no
more users of the APIs, nor should there ever be.

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andrew Osmond 2020-02-04 20:24:55 +00:00
parent c83125bada
commit 9d3a8108a7
2 changed files with 3 additions and 17 deletions

View File

@ -391,13 +391,6 @@ static inline wr::LayoutPoint ToLayoutPoint(
return ToLayoutPoint(LayoutDevicePoint(point));
}
static inline wr::LayoutPoint ToRoundedLayoutPoint(
const mozilla::LayoutDevicePoint& point) {
mozilla::LayoutDevicePoint rounded = point;
rounded.Round();
return ToLayoutPoint(rounded);
}
static inline wr::WorldPoint ToWorldPoint(const mozilla::ScreenPoint& point) {
wr::WorldPoint p;
p.x = point.x;
@ -463,13 +456,6 @@ static inline wr::LayoutRect ToLayoutRect(
return ToLayoutRect(IntRectToRect(rect));
}
static inline wr::LayoutRect ToRoundedLayoutRect(
const mozilla::LayoutDeviceRect& aRect) {
auto rect = aRect;
rect.Round();
return wr::ToLayoutRect(rect);
}
static inline wr::LayoutRect IntersectLayoutRect(const wr::LayoutRect& aRect,
const wr::LayoutRect& aOther) {
wr::LayoutRect r;

View File

@ -10236,14 +10236,14 @@ bool nsDisplayBackdropFilters::CreateWebRenderCommands(
LayoutDeviceRect bounds = LayoutDeviceRect::FromAppUnits(
mBackdropRect, mFrame->PresContext()->AppUnitsPerDevPixel());
wr::LayoutRect roundedRect = wr::ToRoundedLayoutRect(bounds);
wr::ComplexClipRegion region =
wr::ToComplexClipRegion(clip.mBGClipArea, clip.mRadii,
mFrame->PresContext()->AppUnitsPerDevPixel());
aBuilder.PushBackdropFilter(roundedRect, region, wrFilters.filters,
wrFilters.filter_datas, !BackfaceIsHidden());
aBuilder.PushBackdropFilter(wr::ToLayoutRect(bounds), region,
wrFilters.filters, wrFilters.filter_datas,
!BackfaceIsHidden());
wr::StackingContextParams params;
params.clip =