mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
layout: Perform cascading in parallel.
Speeds up the cascade by 3x.
This commit is contained in:
parent
fa02b82b88
commit
9c3af574e5
6 changed files with 74 additions and 31 deletions
|
@ -154,13 +154,10 @@ impl LayoutDataRef {
|
|||
/// Borrows the layout data immutably, *asserting that there are no mutators*. Bad things will
|
||||
/// happen if you try to mutate the layout data while this is held. This is the only thread-
|
||||
/// safe layout data accessor.
|
||||
///
|
||||
/// FIXME(pcwalton): Enforce this invariant via the type system. Will require traversal
|
||||
/// functions to be trusted, but c'est la vie.
|
||||
// #[inline]
|
||||
// pub unsafe fn borrow_unchecked<'a>(&'a self) -> &'a () {
|
||||
// self.data.borrow_unchecked()
|
||||
// }
|
||||
#[inline]
|
||||
pub unsafe fn borrow_unchecked(&self) -> *Option<LayoutData> {
|
||||
cast::transmute(&self.data_cell)
|
||||
}
|
||||
|
||||
/// Borrows the layout data immutably. This function is *not* thread-safe.
|
||||
#[inline]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue