mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
pass width and height information through to cef paint callback
This commit is contained in:
parent
9f7aacdacf
commit
fb72a64833
6 changed files with 10 additions and 11 deletions
|
@ -8,12 +8,12 @@ use types::cef_paint_element_type_t::PET_VIEW;
|
|||
use std::ptr;
|
||||
|
||||
pub trait CefRenderHandlerExtensions {
|
||||
fn paint(&self, browser: CefBrowser);
|
||||
fn paint(&self, browser: CefBrowser, width: usize, height: usize);
|
||||
}
|
||||
|
||||
impl CefRenderHandlerExtensions for CefRenderHandler {
|
||||
fn paint(&self, browser: CefBrowser) {
|
||||
self.on_paint(browser, PET_VIEW, 0, ptr::null(), &mut (), 0, 0)
|
||||
fn paint(&self, browser: CefBrowser, width: usize, height: usize) {
|
||||
self.on_paint(browser, PET_VIEW, 0, ptr::null(), &mut (), width as i32, height as i32)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue