servo: Merge #17685 - remove no-op InitializeCompositing message (from paulrouget:rm_InitializeCompositing); r=jdm
authorPaul Rouget <me@paulrouget.com>
Thu, 13 Jul 2017 07:46:32 -0700
changeset 417538 8d54766fc7c4e0b9f557bafb33531db45d3c6404
parent 417537 4c8ee44afffba102542012452d18e746cdca2e56
child 417539 c7f9f51b01bb49634982b3653431dedc30c14564
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdm
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
servo: Merge #17685 - remove no-op InitializeCompositing message (from paulrouget:rm_InitializeCompositing); r=jdm I think this is no-op. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: 43e2720f86ddb710843724969a6b3e1892a01829
servo/components/compositing/compositor.rs
servo/components/compositing/windowing.rs
servo/ports/cef/browser_host.rs
servo/ports/servo/main.rs
--- a/servo/components/compositing/compositor.rs
+++ b/servo/components/compositing/compositor.rs
@@ -737,20 +737,16 @@ impl<Window: WindowMethods> IOCompositor
     fn handle_window_message(&mut self, event: WindowEvent) {
         match event {
             WindowEvent::Idle => {}
 
             WindowEvent::Refresh => {
                 self.composite();
             }
 
-            WindowEvent::InitializeCompositing => {
-                self.initialize_compositing();
-            }
-
             WindowEvent::Resize(size) => {
                 self.on_resize_window_event(size);
             }
 
             WindowEvent::LoadUrl(url_string) => {
                 self.on_load_url_window_event(url_string);
             }
 
@@ -1561,19 +1557,16 @@ impl<Window: WindowMethods> IOCompositor
                 println!("updating composition_request ({:?})", reason);
             }
             self.composition_request = CompositionRequest::CompositeNow(reason)
         } else if opts::get().is_running_problem_test {
             println!("composition_request is already {:?}", self.composition_request);
         }
     }
 
-    fn initialize_compositing(&mut self) {
-    }
-
     fn get_root_pipeline_id(&self) -> Option<PipelineId> {
         self.root_pipeline.as_ref().map(|pipeline| pipeline.id)
     }
 
     fn start_scrolling_bounce_if_necessary(&mut self) {
         if self.scroll_in_progress {
             return
         }
--- a/servo/components/compositing/windowing.rs
+++ b/servo/components/compositing/windowing.rs
@@ -39,19 +39,16 @@ pub enum WindowEvent {
     ///
     /// FIXME(pcwalton): This is kind of ugly and may not work well with multiprocess Servo.
     /// It's possible that this should be something like
     /// `CompositorMessageWindowEvent(compositor_thread::Msg)` instead.
     Idle,
     /// Sent when part of the window is marked dirty and needs to be redrawn. Before sending this
     /// message, the window must make the same GL context as in `PrepareRenderingEvent` current.
     Refresh,
-    /// Sent to initialize the GL context. The windowing system must have a valid, current GL
-    /// context when this message is sent.
-    InitializeCompositing,
     /// Sent when the window is resized.
     Resize(TypedSize2D<u32, DevicePixel>),
     /// Touchpad Pressure
     TouchpadPressure(TypedPoint2D<f32, DevicePixel>, f32, TouchpadPressurePhase),
     /// Sent when a new URL is to be loaded.
     LoadUrl(String),
     /// Sent when a mouse hit test is to be performed.
     MouseWindowEventClass(MouseWindowEvent),
@@ -80,17 +77,16 @@ pub enum WindowEvent {
     ToggleWebRenderProfiler,
 }
 
 impl Debug for WindowEvent {
     fn fmt(&self, f: &mut Formatter) -> Result<(), Error> {
         match *self {
             WindowEvent::Idle => write!(f, "Idle"),
             WindowEvent::Refresh => write!(f, "Refresh"),
-            WindowEvent::InitializeCompositing => write!(f, "InitializeCompositing"),
             WindowEvent::Resize(..) => write!(f, "Resize"),
             WindowEvent::TouchpadPressure(..) => write!(f, "TouchpadPressure"),
             WindowEvent::KeyEvent(..) => write!(f, "Key"),
             WindowEvent::LoadUrl(..) => write!(f, "LoadUrl"),
             WindowEvent::MouseWindowEventClass(..) => write!(f, "Mouse"),
             WindowEvent::MouseWindowMoveEventClass(..) => write!(f, "MouseMove"),
             WindowEvent::Touch(..) => write!(f, "Touch"),
             WindowEvent::Scroll(..) => write!(f, "Scroll"),
--- a/servo/ports/cef/browser_host.rs
+++ b/servo/ports/cef/browser_host.rs
@@ -481,18 +481,17 @@ full_cef_class_impl! {
         }}
 
         fn set_zoom_level(&this, new_zoom_level: c_double [c_double],) -> () {{
             let new_zoom_level: c_double = new_zoom_level;
             let old_zoom_level = this.get_zoom_level();
             this.downcast().send_window_event(WindowEvent::PinchZoom((new_zoom_level / old_zoom_level) as f32))
         }}
 
-        fn initialize_compositing(&this,) -> () {{
-            this.downcast().send_window_event(WindowEvent::InitializeCompositing);
+        fn initialize_compositing(&_this,) -> () {{
         }}
 
         fn composite(&this,) -> () {{
             this.downcast().composite_ok.set(true);
             this.downcast().send_window_event(WindowEvent::Refresh);
             this.downcast().composite_ok.set(false);
         }}
 
--- a/servo/ports/servo/main.rs
+++ b/servo/ports/servo/main.rs
@@ -160,18 +160,16 @@ fn main() {
     let mut browser = BrowserWrapper {
         browser: Browser::new(window.clone(), target_url)
     };
 
     browser.browser.setup_logging();
 
     register_glutin_resize_handler(&window, &mut browser);
 
-    browser.browser.handle_events(vec![WindowEvent::InitializeCompositing]);
-
     // Feed events from the window to the browser until the browser
     // says to stop.
     loop {
         let should_continue = browser.browser.handle_events(window.wait_events());
         if !should_continue {
             break;
         }
     }