Skip to content

Commit

Permalink
Remove concept of Layers from Servo
Browse files Browse the repository at this point in the history
Layers were a feature of the legacy drawing path. If we re-add them at
some point, it probably makes more sense to make them a product of
display list inspection.

This change also remove a bunch of dead painting code.
  • Loading branch information
mrobinson committed Oct 21, 2016
1 parent e667e62 commit ccb7ab9
Show file tree
Hide file tree
Showing 21 changed files with 57 additions and 745 deletions.
7 changes: 3 additions & 4 deletions components/compositing/compositor.rs
Expand Up @@ -12,7 +12,7 @@ use euclid::point::TypedPoint2D;
use euclid::scale_factor::ScaleFactor;
use euclid::size::TypedSize2D;
use gfx_traits::{DevicePixel, LayerPixel, StackingContextId};
use gfx_traits::{Epoch, FrameTreeId, FragmentType, LayerId};
use gfx_traits::{Epoch, FrameTreeId, FragmentType};
use gleam::gl;
use gleam::gl::types::{GLint, GLsizei};
use image::{DynamicImage, ImageFormat, RgbImage};
Expand Down Expand Up @@ -503,9 +503,9 @@ impl<Window: WindowMethods> IOCompositor<Window> {
self.title_for_main_frame();
}

(Msg::ScrollFragmentPoint(pipeline_id, layer_id, point, _),
(Msg::ScrollFragmentPoint(pipeline_id, point, _),
ShutdownState::NotShuttingDown) => {
self.scroll_fragment_to_point(pipeline_id, layer_id, point);
self.scroll_fragment_to_point(pipeline_id, point);
}

(Msg::MoveTo(point),
Expand Down Expand Up @@ -770,7 +770,6 @@ impl<Window: WindowMethods> IOCompositor<Window> {

fn scroll_fragment_to_point(&mut self,
_pipeline_id: PipelineId,
_layer_id: LayerId,
_point: Point2D<f32>) {
println!("TODO: Support scroll_fragment_to_point again");
}
Expand Down
3 changes: 1 addition & 2 deletions components/compositing/compositor_thread.rs
Expand Up @@ -8,7 +8,6 @@ use SendableFrameTree;
use compositor::CompositingReason;
use euclid::point::Point2D;
use euclid::size::Size2D;
use gfx_traits::LayerId;
use ipc_channel::ipc::IpcSender;
use msg::constellation_msg::{Image, Key, KeyModifiers, KeyState, PipelineId};
use profile_traits::mem;
Expand Down Expand Up @@ -72,7 +71,7 @@ pub enum Msg {
ShutdownComplete,

/// Scroll a page in a window
ScrollFragmentPoint(PipelineId, LayerId, Point2D<f32>, bool),
ScrollFragmentPoint(PipelineId, Point2D<f32>, bool),
/// Alerts the compositor that the current page has changed its title.
ChangePageTitle(PipelineId, Option<String>),
/// Alerts the compositor that the current page has changed its URL.
Expand Down
57 changes: 0 additions & 57 deletions components/compositing/scrolling.md

This file was deleted.

7 changes: 3 additions & 4 deletions components/constellation/constellation.rs
Expand Up @@ -933,11 +933,10 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
self.handle_alert(pipeline_id, message, sender);
}

FromScriptMsg::ScrollFragmentPoint(pipeline_id, layer_id, point, smooth) => {
FromScriptMsg::ScrollFragmentPoint(pipeline_id, point, smooth) => {
self.compositor_proxy.send(ToCompositorMsg::ScrollFragmentPoint(pipeline_id,
layer_id,
point,
smooth));
point,
smooth));
}

FromScriptMsg::GetClientWindow(send) => {
Expand Down

0 comments on commit ccb7ab9

Please sign in to comment.