Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rust-layers to get 2d transform + clipping support. #7141

Merged
merged 1 commit into from Aug 11, 2015
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Update rust-layers to get 2d transform + clipping support.

  • Loading branch information
gw3583 committed Aug 10, 2015
commit 30d9e755579140da7c5e7824cc3774be8160844e
@@ -1238,10 +1238,10 @@ impl<Window: WindowMethods> IOCompositor<Window> {
request.page_rect = request.page_rect / scale.get();
}

let layer_kind = if layer.transform_state.borrow().is_3d {
LayerKind::Layer3D
let layer_kind = if layer.transform_state.borrow().has_transform {
LayerKind::HasTransform
} else {
LayerKind::Layer2D
LayerKind::NoTransform
};

let mut paint_request = PaintRequest {
@@ -423,7 +423,7 @@ impl StackingContext {
// TODO(gw): This is a hack to avoid running the DL optimizer
// on 3d transformed tiles. We should have a better solution
// than just disabling the opts here.
if paint_context.layer_kind == LayerKind::Layer3D {
if paint_context.layer_kind == LayerKind::HasTransform {
self.draw_into_context(&self.display_list,
paint_context,
&transform,
@@ -1022,7 +1022,7 @@ impl<'a> Iterator for DisplayItemIterator<'a> {
impl DisplayItem {
/// Paints this display item into the given painting context.
fn draw_into_context(&self, paint_context: &mut PaintContext) {
if paint_context.layer_kind == LayerKind::Layer2D {
if paint_context.layer_kind == LayerKind::NoTransform {
let this_clip = &self.base().clip;
match paint_context.transient_clip {
Some(ref transient_clip) if transient_clip == this_clip => {}
@@ -55,8 +55,8 @@ impl LayerId {

#[derive(Clone, Copy, Debug, PartialEq)]
pub enum LayerKind {
Layer2D,
Layer3D,
NoTransform,
HasTransform,
}

/// The scrolling policy of a layer.

Some generated files are not rendered by default. Learn more.

Some generated files are not rendered by default. Learn more.

Some generated files are not rendered by default. Learn more.

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.