add back cef_browser_host::composite() method

This commit is contained in:
Mike Blumenkrantz 2015-05-12 18:41:55 -04:00
parent ef7fa99bd2
commit a296b2d073

View file

@ -1320,6 +1320,13 @@ pub struct _cef_browser_host_t {
pub drag_source_system_drag_ended: Option<extern "C" fn( pub drag_source_system_drag_ended: Option<extern "C" fn(
this: *mut cef_browser_host_t) -> ()>, this: *mut cef_browser_host_t) -> ()>,
//
// 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<extern "C" fn(this: *mut cef_browser_host_t) -> ()>,
// //
// Instructs the browser to initialize accelerated compositing. The // Instructs the browser to initialize accelerated compositing. The
// appropriate Direct3D or OpenGL state must have been set up before calling // 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 // Instructs the browser to initialize accelerated compositing. The
// appropriate Direct3D or OpenGL state must have been set up before calling // appropriate Direct3D or OpenGL state must have been set up before calling