mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
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:
parent
706baf70b6
commit
86a4685f78
@ -27,28 +27,6 @@
|
||||
|
||||
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 {
|
||||
|
||||
// clang-format off
|
||||
|
@ -35,6 +35,7 @@ struct ScreenPixel;
|
||||
struct ParentLayerPixel;
|
||||
struct DesktopPixel;
|
||||
struct ImagePixel;
|
||||
struct ExternalPixel;
|
||||
|
||||
template <>
|
||||
struct IsPixel<CSSPixel> : std::true_type {};
|
||||
@ -54,6 +55,8 @@ template <>
|
||||
struct IsPixel<ParentLayerPixel> : std::true_type {};
|
||||
template <>
|
||||
struct IsPixel<DesktopPixel> : std::true_type {};
|
||||
template <>
|
||||
struct IsPixel<ExternalPixel> : std::true_type {};
|
||||
|
||||
typedef gfx::CoordTyped<CSSPixel> CSSCoord;
|
||||
typedef gfx::IntCoordTyped<CSSPixel> CSSIntCoord;
|
||||
@ -153,6 +156,18 @@ typedef gfx::IntSizeTyped<DesktopPixel> DesktopIntSize;
|
||||
typedef gfx::RectTyped<DesktopPixel> DesktopRect;
|
||||
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, LayoutDevicePixel> CSSToLayoutDeviceScale;
|
||||
typedef gfx::ScaleFactor<CSSPixel, LayerPixel> CSSToLayerScale;
|
||||
@ -243,6 +258,8 @@ typedef gfx::Matrix4x4Typed<ParentLayerPixel, ParentLayerPixel>
|
||||
ParentLayerToParentLayerMatrix4x4;
|
||||
typedef gfx::Matrix4x4Typed<ParentLayerPixel, RenderTargetPixel>
|
||||
ParentLayerToRenderTargetMatrix4x4;
|
||||
typedef gfx::Matrix4x4Typed<ExternalPixel, ParentLayerPixel>
|
||||
ExternalToParentLayerMatrix4x4;
|
||||
|
||||
/*
|
||||
* The pixels that content authors use to specify sizes in.
|
||||
@ -562,6 +579,8 @@ struct ParentLayerPixel {};
|
||||
*/
|
||||
struct DesktopPixel {};
|
||||
|
||||
struct ExternalPixel {};
|
||||
|
||||
// Operators to apply ScaleFactors directly to Coords, Points, Rects, Sizes and
|
||||
// Margins
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user