Bug 1659227 - Change the partial pre-render rect unit to LayoutDeviceRect. r=botond

In SVG coordinates the rect size might be fractional.

Differential Revision: https://phabricator.services.mozilla.com/D90648
This commit is contained in:
Hiroyuki Ikezoe 2020-09-23 06:33:17 +00:00
parent 4ea0528441
commit 4b82f948ca
4 changed files with 6 additions and 5 deletions

View File

@ -658,7 +658,7 @@ static bool LineSegmentIntersectsClip(double aX0, double aY0, double aX1,
}
// static
bool AnimationHelper::ShouldBeJank(const LayoutDeviceIntRect& aPrerenderedRect,
bool AnimationHelper::ShouldBeJank(const LayoutDeviceRect& aPrerenderedRect,
SideBits aOverflowSides,
const gfx::Matrix4x4& aTransform,
const ParentLayerRect& aClipRect) {

View File

@ -141,7 +141,7 @@ class AnimationHelper {
* composited in |aClipRect| there appears area which wasn't pre-rendered
* on the main-thread. I.e. checkerboarding.
*/
static bool ShouldBeJank(const LayoutDeviceIntRect& aPrerenderedRect,
static bool ShouldBeJank(const LayoutDeviceRect& aPrerenderedRect,
SideBits aOverflowedSides,
const gfx::Matrix4x4& aTransform,
const ParentLayerRect& aClipRect);

View File

@ -756,8 +756,8 @@ static PartialPrerenderData GetPartialPrerenderData(
aFrame, devPixelsToAppUnits, clipFrame, scrollFrame);
return PartialPrerenderData{
LayoutDeviceIntRect::FromAppUnitsToInside(partialPrerenderedRect,
devPixelsToAppUnits),
LayoutDeviceRect::FromAppUnits(partialPrerenderedRect,
devPixelsToAppUnits),
GetOverflowedSides(overflow, partialPrerenderedRect),
scrollId,
clipRect,

View File

@ -45,6 +45,7 @@ using mozilla::ParentLayerIntRect from "Units.h";
using mozilla::ParentLayerRect from "Units.h";
using mozilla::LayoutDeviceIntRect from "Units.h";
using mozilla::LayoutDevicePoint from "Units.h";
using mozilla::LayoutDeviceRect from "Units.h";
using mozilla::layers::ScaleMode from "mozilla/layers/LayersTypes.h";
using mozilla::layers::EventRegions from "mozilla/layers/LayersTypes.h";
using mozilla::layers::EventRegionsOverride from "mozilla/layers/LayersTypes.h";
@ -158,7 +159,7 @@ comparable struct MotionPathData {
};
comparable struct PartialPrerenderData {
LayoutDeviceIntRect rect;
LayoutDeviceRect rect;
SideBits overflowedSides;
// the scroll id of the nearest scrollable frame of this partial prerender
// data.