ports/cef: Implement accelerated compositing for the CEF port.

This commit is contained in:
Patrick Walton 2014-11-24 17:23:30 -08:00
parent 315e166cf7
commit 8b2aadc30b
35 changed files with 1746 additions and 642 deletions

View file

@ -58,7 +58,7 @@ dependencies = [
[[package]]
name = "cocoa"
version = "0.1.1"
source = "git+https://github.com/servo/rust-cocoa#78b823bec1affcab20b6977e1057125088a6034c"
source = "git+https://github.com/servo/rust-cocoa#084f8e1baf40391eb12819d16765af25ca96c7ec"
[[package]]
name = "compile_msg"
@ -394,7 +394,7 @@ source = "git+https://github.com/bjz/gl-rs.git#79cd3b3f9f19aa0e39f6af572fc8673a6
[[package]]
name = "layers"
version = "0.1.0"
source = "git+https://github.com/servo/rust-layers#b068d2a96d54bf173b548aece36f5ea4ef9353cf"
source = "git+https://github.com/servo/rust-layers#63d1093f2a01a6fb9599ea6d932aadf79598451f"
dependencies = [
"cgl 0.0.1 (git+https://github.com/servo/rust-cgl)",
"core_foundation 0.1.0 (git+https://github.com/servo/rust-core-foundation)",

View file

@ -153,6 +153,14 @@ impl<Window> Browser<Window> where Window: WindowMethods + 'static {
self.compositor.repaint_synchronously()
}
pub fn pinch_zoom_level(&self) -> f32 {
self.compositor.pinch_zoom_level()
}
pub fn get_title_for_main_frame(&self) {
self.compositor.get_title_for_main_frame()
}
pub fn shutdown(mut self) {
self.compositor.shutdown();
}

View file

@ -30,7 +30,9 @@ use servo_util::rtinstrument;
#[cfg(not(any(test,target_os="android")))]
use servo::Browser;
#[cfg(not(any(test,target_os="android")))]
use compositing::windowing::{IdleWindowEvent, ResizeWindowEvent, WindowEvent};
use compositing::windowing::{IdleWindowEvent, InitializeCompositingWindowEvent, ResizeWindowEvent};
#[cfg(not(any(test,target_os="android")))]
use compositing::windowing::{WindowEvent};
#[cfg(not(any(test,target_os="android")))]
use std::os;
@ -65,6 +67,8 @@ fn start(argc: int, argv: *const *const u8) -> int {
}
}
browser.browser.handle_event(InitializeCompositingWindowEvent);
loop {
let should_continue = match window {
None => browser.browser.handle_event(IdleWindowEvent),