diff options
author | Glenn Watson <github@intuitionlibrary.com> | 2017-02-22 14:37:24 +1000 |
---|---|---|
committer | Glenn Watson <github@intuitionlibrary.com> | 2017-02-22 14:37:24 +1000 |
commit | 0af27a343496d2b2cb23eb52ab96a4be5e90166e (patch) | |
tree | 42766c5548967ef7517eba7a833c8e3300e7645e /components/geometry/lib.rs | |
parent | ec5ed8edfdfac1cf0692af813217ee7e21620139 (diff) | |
download | servo-0af27a343496d2b2cb23eb52ab96a4be5e90166e.tar.gz servo-0af27a343496d2b2cb23eb52ab96a4be5e90166e.zip |
Rename ScreenPx to DeviceIndependentPixel.
Diffstat (limited to 'components/geometry/lib.rs')
-rw-r--r-- | components/geometry/lib.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/components/geometry/lib.rs b/components/geometry/lib.rs index ddca8d71972..55c1a165295 100644 --- a/components/geometry/lib.rs +++ b/components/geometry/lib.rs @@ -20,17 +20,17 @@ use std::i32; /// should approximate a device-independent reference length. This unit corresponds to Android's /// "density-independent pixel" (dip), Mac OS X's "point", and Windows "device-independent pixel." /// -/// The relationship between DevicePixel and ScreenPx is defined by the OS. On most low-dpi -/// screens, one ScreenPx is equal to one DevicePixel. But on high-density screens it can be -/// some larger number. For example, by default on Apple "retina" displays, one ScreenPx equals -/// two DevicePixels. On Android "MDPI" displays, one ScreenPx equals 1.5 device pixels. +/// The relationship between DevicePixel and DeviceIndependentPixel is defined by the OS. On most low-dpi +/// screens, one DeviceIndependentPixel is equal to one DevicePixel. But on high-density screens it can be +/// some larger number. For example, by default on Apple "retina" displays, one DeviceIndependentPixel equals +/// two DevicePixels. On Android "MDPI" displays, one DeviceIndependentPixel equals 1.5 device pixels. /// -/// The ratio between ScreenPx and DevicePixel for a given display be found by calling +/// The ratio between DeviceIndependentPixel and DevicePixel for a given display be found by calling /// `servo::windowing::WindowMethods::hidpi_factor`. #[derive(Clone, Copy, Debug)] -pub enum ScreenPx {} +pub enum DeviceIndependentPixel {} -known_heap_size!(0, ScreenPx); +known_heap_size!(0, DeviceIndependentPixel); // An Au is an "App Unit" and represents 1/60th of a CSS pixel. It was // originally proposed in 2002 as a standard unit of measure in Gecko. |