mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
add back cef_browser_host::composite() method
This commit is contained in:
parent
ef7fa99bd2
commit
a296b2d073
1 changed files with 24 additions and 0 deletions
|
@ -1320,6 +1320,13 @@ pub struct _cef_browser_host_t {
|
|||
pub drag_source_system_drag_ended: Option<extern "C" fn(
|
||||
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
|
||||
// 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue