From a296b2d0739dbb795c1af3584d300450d5dd3540 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 12 May 2015 18:41:55 -0400 Subject: [PATCH] add back cef_browser_host::composite() method --- ports/cef/interfaces/cef_browser.rs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/ports/cef/interfaces/cef_browser.rs b/ports/cef/interfaces/cef_browser.rs index 46c9fcaf100..57db64c60a2 100644 --- a/ports/cef/interfaces/cef_browser.rs +++ b/ports/cef/interfaces/cef_browser.rs @@ -1320,6 +1320,13 @@ pub struct _cef_browser_host_t { pub drag_source_system_drag_ended: Option ()>, + // + // Instructs the browser to perform an accelerated composite. The appropriate + // Direct3D or OpenGL state must have been set up before calling this + // function. + // + pub composite: Option ()>, + // // Instructs the browser to initialize accelerated compositing. The // appropriate Direct3D or OpenGL state must have been set up before calling @@ -2214,6 +2221,23 @@ impl CefBrowserHost { } } + // + // Instructs the browser to perform an accelerated composite. The appropriate + // Direct3D or OpenGL state must have been set up before calling this + // function. + // + pub fn composite(&self) -> () { + if self.c_object.is_null() || + self.c_object as usize == mem::POST_DROP_USIZE { + panic!("called a CEF method on a null object") + } + unsafe { + CefWrap::to_rust( + ((*self.c_object).composite.unwrap())( + self.c_object)) + } + } + // // Instructs the browser to initialize accelerated compositing. The // appropriate Direct3D or OpenGL state must have been set up before calling