gfxRect can be implicitly constructed from IntRect, which hides a number of
implicit conversion points, makes Moz2Dification harder, and has some
surprising effects.
This patch removes the implicit constructor and replaces it with an explicit
conversion function:
gfxRect ThebesRect(const IntRect&)
This is the obvious outcome of removing the constructor.
But there is also a second, less obvious outcome: currently we do a number of
IntRect-to-Rect conversions using ToRect(), which (surprisingly) works because
it turns into an implicit IntRect-to-gfxRect conversion (via the implicit
constructor) combined with an explicit gfxRect-to-Rect conversion (via
ToRect()). I.e. we do two conversions, going from a Moz2D type to a Thebes
type and back to a Moz2D type!
So this patch also changes these conversion. It moves this existing function:
Rect ToRect(const IntRect&)
from gfx2DGlue.h -- where it doesn't really belong because it doesn't involve
any Thebes types -- to gfx/2d/Rect.h, templatifying and renaming it as
IntRectToRect() in the process.
The rest of the patch deals with fall-out from these changes. The call sites
change as follows:
- IntRect-to-gfxRect conversions:
- old: implicit
- new: ThebesRect()
- IntRect-to-Rect conversions:
- old: ToRect()
- new: IntRectToRect()
--HG--
extra : rebase_source : e4e4c2ad10b36ecad4d57d1630158f3374e403be
- Update callsites of Matrix4x4::TransformBounds to use
Matrix4x4::TransformAndClipBounds.
--HG--
extra : rebase_source : a1aa889af56e404b7ca5c7125021171e67a0b8bf
- Implemented templates for Coord, Point, Point3D, Point4D, Size, Margin
and Rect to create double precision versions.
--HG--
extra : rebase_source : 91e16a7b970026346b6e90a23427fd0f70491765
The bulk of this commit was generated by running:
run-clang-tidy.py \
-checks='-*,llvm-namespace-comment' \
-header-filter=^/.../mozilla-central/.* \
-fix
Change interface of getter/setter for mClipRect,
also necessary modification for codes that use these resources.
* * *
Bundle mUseClipRect and mClipRect as Maybe<ParentLayerIntRect> mClipRect
--HG--
extra : rebase_source : ca0c60404a28b7418df88104b863760033289910
Various changes to FrameMetrics and such have causes the tile coherency checks
to end up with nonsense values, meaning updates are always happening a tile at
a time.
This fixes the calculation of those values, adds some documentation and
converts a large part of it to using typed units, to make it easier to
understand what's happening.
This annotates fixed layers with the margins that have been applied from
nsIPresShell->GetContentDocumentFixedPositionMargins. Using SyncViewportInfo
in CompositorParent, this allows for async fixed position margin setting.
This annotates fixed layers with the margins that have been applied from
nsIPresShell->GetContentDocumentFixedPositionMargins. Using SyncViewportInfo
in CompositorParent, this allows for async fixed position margin setting.
This annotates fixed layers with the margins that have been applied from
nsIPresShell->GetContentDocumentFixedPositionMargins. Using SyncViewportInfo
in CompositorParent, this allows for async fixed position margin setting.