Bug 1662985 - Move the ExternalPixel types r=kats

Moving the ExternalPixel types from APZPublicUtils.h to Units.h to
reduce the transitive include graph from that dependency.

Signed-off-by: Joey Salazar <grey.lila@yahoo.com>

Differential Revision: https://phabricator.services.mozilla.com/D94932
This commit is contained in:
Joey Salazar 2020-10-28 21:55:49 +00:00
parent 706baf70b6
commit 86a4685f78
2 changed files with 19 additions and 22 deletions

View File

@ -27,28 +27,6 @@
namespace mozilla { namespace mozilla {
struct ExternalPixel;
template <>
struct IsPixel<ExternalPixel> : std::true_type {};
typedef gfx::CoordTyped<ExternalPixel> ExternalCoord;
typedef gfx::IntCoordTyped<ExternalPixel> ExternalIntCoord;
typedef gfx::PointTyped<ExternalPixel> ExternalPoint;
typedef gfx::IntPointTyped<ExternalPixel> ExternalIntPoint;
typedef gfx::SizeTyped<ExternalPixel> ExternalSize;
typedef gfx::IntSizeTyped<ExternalPixel> ExternalIntSize;
typedef gfx::RectTyped<ExternalPixel> ExternalRect;
typedef gfx::IntRectTyped<ExternalPixel> ExternalIntRect;
typedef gfx::MarginTyped<ExternalPixel> ExternalMargin;
typedef gfx::IntMarginTyped<ExternalPixel> ExternalIntMargin;
typedef gfx::IntRegionTyped<ExternalPixel> ExternalIntRegion;
typedef gfx::Matrix4x4Typed<ExternalPixel, ParentLayerPixel>
ExternalToParentLayerMatrix4x4;
struct ExternalPixel {};
namespace layers { namespace layers {
// clang-format off // clang-format off

View File

@ -35,6 +35,7 @@ struct ScreenPixel;
struct ParentLayerPixel; struct ParentLayerPixel;
struct DesktopPixel; struct DesktopPixel;
struct ImagePixel; struct ImagePixel;
struct ExternalPixel;
template <> template <>
struct IsPixel<CSSPixel> : std::true_type {}; struct IsPixel<CSSPixel> : std::true_type {};
@ -54,6 +55,8 @@ template <>
struct IsPixel<ParentLayerPixel> : std::true_type {}; struct IsPixel<ParentLayerPixel> : std::true_type {};
template <> template <>
struct IsPixel<DesktopPixel> : std::true_type {}; struct IsPixel<DesktopPixel> : std::true_type {};
template <>
struct IsPixel<ExternalPixel> : std::true_type {};
typedef gfx::CoordTyped<CSSPixel> CSSCoord; typedef gfx::CoordTyped<CSSPixel> CSSCoord;
typedef gfx::IntCoordTyped<CSSPixel> CSSIntCoord; typedef gfx::IntCoordTyped<CSSPixel> CSSIntCoord;
@ -153,6 +156,18 @@ typedef gfx::IntSizeTyped<DesktopPixel> DesktopIntSize;
typedef gfx::RectTyped<DesktopPixel> DesktopRect; typedef gfx::RectTyped<DesktopPixel> DesktopRect;
typedef gfx::IntRectTyped<DesktopPixel> DesktopIntRect; typedef gfx::IntRectTyped<DesktopPixel> DesktopIntRect;
typedef gfx::CoordTyped<ExternalPixel> ExternalCoord;
typedef gfx::IntCoordTyped<ExternalPixel> ExternalIntCoord;
typedef gfx::PointTyped<ExternalPixel> ExternalPoint;
typedef gfx::IntPointTyped<ExternalPixel> ExternalIntPoint;
typedef gfx::SizeTyped<ExternalPixel> ExternalSize;
typedef gfx::IntSizeTyped<ExternalPixel> ExternalIntSize;
typedef gfx::RectTyped<ExternalPixel> ExternalRect;
typedef gfx::IntRectTyped<ExternalPixel> ExternalIntRect;
typedef gfx::MarginTyped<ExternalPixel> ExternalMargin;
typedef gfx::IntMarginTyped<ExternalPixel> ExternalIntMargin;
typedef gfx::IntRegionTyped<ExternalPixel> ExternalIntRegion;
typedef gfx::ScaleFactor<CSSPixel, CSSPixel> CSSToCSSScale; typedef gfx::ScaleFactor<CSSPixel, CSSPixel> CSSToCSSScale;
typedef gfx::ScaleFactor<CSSPixel, LayoutDevicePixel> CSSToLayoutDeviceScale; typedef gfx::ScaleFactor<CSSPixel, LayoutDevicePixel> CSSToLayoutDeviceScale;
typedef gfx::ScaleFactor<CSSPixel, LayerPixel> CSSToLayerScale; typedef gfx::ScaleFactor<CSSPixel, LayerPixel> CSSToLayerScale;
@ -243,6 +258,8 @@ typedef gfx::Matrix4x4Typed<ParentLayerPixel, ParentLayerPixel>
ParentLayerToParentLayerMatrix4x4; ParentLayerToParentLayerMatrix4x4;
typedef gfx::Matrix4x4Typed<ParentLayerPixel, RenderTargetPixel> typedef gfx::Matrix4x4Typed<ParentLayerPixel, RenderTargetPixel>
ParentLayerToRenderTargetMatrix4x4; ParentLayerToRenderTargetMatrix4x4;
typedef gfx::Matrix4x4Typed<ExternalPixel, ParentLayerPixel>
ExternalToParentLayerMatrix4x4;
/* /*
* The pixels that content authors use to specify sizes in. * The pixels that content authors use to specify sizes in.
@ -562,6 +579,8 @@ struct ParentLayerPixel {};
*/ */
struct DesktopPixel {}; struct DesktopPixel {};
struct ExternalPixel {};
// Operators to apply ScaleFactors directly to Coords, Points, Rects, Sizes and // Operators to apply ScaleFactors directly to Coords, Points, Rects, Sizes and
// Margins // Margins