mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Format gfx_traits #21373
This commit is contained in:
parent
9c1c58a498
commit
2c9e32a09e
1 changed files with 8 additions and 6 deletions
|
@ -4,13 +4,15 @@
|
||||||
|
|
||||||
#![crate_name = "gfx_traits"]
|
#![crate_name = "gfx_traits"]
|
||||||
#![crate_type = "rlib"]
|
#![crate_type = "rlib"]
|
||||||
|
|
||||||
#![deny(unsafe_code)]
|
#![deny(unsafe_code)]
|
||||||
|
|
||||||
extern crate malloc_size_of;
|
extern crate malloc_size_of;
|
||||||
#[macro_use] extern crate malloc_size_of_derive;
|
#[macro_use]
|
||||||
#[macro_use] extern crate range;
|
extern crate malloc_size_of_derive;
|
||||||
#[macro_use] extern crate serde;
|
#[macro_use]
|
||||||
|
extern crate range;
|
||||||
|
#[macro_use]
|
||||||
|
extern crate serde;
|
||||||
|
|
||||||
pub mod print_tree;
|
pub mod print_tree;
|
||||||
|
|
||||||
|
@ -32,7 +34,7 @@ impl Epoch {
|
||||||
pub struct StackingContextId(
|
pub struct StackingContextId(
|
||||||
/// The identifier for this StackingContext, derived from the Flow's memory address
|
/// The identifier for this StackingContext, derived from the Flow's memory address
|
||||||
/// and fragment type. As a space optimization, these are combined into a single word.
|
/// and fragment type. As a space optimization, these are combined into a single word.
|
||||||
pub u64
|
pub u64,
|
||||||
);
|
);
|
||||||
|
|
||||||
impl StackingContextId {
|
impl StackingContextId {
|
||||||
|
@ -87,7 +89,7 @@ fn next_special_id() -> usize {
|
||||||
SPECIAL_SCROLL_ROOT_ID_MASK
|
SPECIAL_SCROLL_ROOT_ID_MASK
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn combine_id_with_fragment_type(id: usize, fragment_type: FragmentType) -> usize {
|
pub fn combine_id_with_fragment_type(id: usize, fragment_type: FragmentType) -> usize {
|
||||||
debug_assert_eq!(id & (fragment_type as usize), 0);
|
debug_assert_eq!(id & (fragment_type as usize), 0);
|
||||||
if fragment_type == FragmentType::FragmentBody {
|
if fragment_type == FragmentType::FragmentBody {
|
||||||
id
|
id
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue