From fe427494878151587a3695737d711f9a87e65384 Mon Sep 17 00:00:00 2001 From: Michael Wu Date: Wed, 10 Dec 2014 11:43:30 -0500 Subject: [PATCH] Make the gonk port work again --- ports/gonk/src/main.rs | 3 +++ ports/gonk/src/window.rs | 14 ++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/ports/gonk/src/main.rs b/ports/gonk/src/main.rs index 552658d94da..356fed244eb 100644 --- a/ports/gonk/src/main.rs +++ b/ports/gonk/src/main.rs @@ -28,6 +28,7 @@ use servo_util::opts; use servo_util::rtinstrument; use servo::Browser; use compositing::windowing::IdleWindowEvent; +use compositing::windowing::InitializeCompositingWindowEvent; use std::os; @@ -58,6 +59,8 @@ fn start(argc: int, argv: *const *const u8) -> int { Some(ref window) => input::run_input_loop(&window.event_send) } + browser.browser.handle_event(InitializeCompositingWindowEvent); + loop { let should_continue = match window { None => browser.browser.handle_event(IdleWindowEvent), diff --git a/ports/gonk/src/window.rs b/ports/gonk/src/window.rs index 8257ac85c66..27a21cf308a 100644 --- a/ports/gonk/src/window.rs +++ b/ports/gonk/src/window.rs @@ -13,6 +13,7 @@ use layers::platform::surface::NativeGraphicsMetadata; use libc::c_int; use msg::compositor_msg::{Blank, IdlePaintState}; use msg::compositor_msg::{ReadyState, PaintState}; +use msg::constellation_msg::LoadData; use std::cell::Cell; use std::comm::Receiver; use std::rc::Rc; @@ -790,6 +791,15 @@ impl WindowMethods for Window { self.paint_state.set(paint_state); } + fn set_page_title(&self, _: Option) { + } + + fn set_page_load_data(&self, _: LoadData) { + } + + fn load_end(&self) { + } + fn hidpi_factor(&self) -> ScaleFactor { ScaleFactor(1.0) } @@ -809,6 +819,10 @@ impl WindowMethods for Window { } as Box, box receiver as Box) } + + fn prepare_for_composite(&self) -> bool { + true + } } struct GonkCompositorProxy {