mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Make HTMLCanvasElement::get_size return a Size2D<u32>
The changes keep trickling down.
This commit is contained in:
parent
b8dbf2dddd
commit
a3392610c3
15 changed files with 126 additions and 101 deletions
|
@ -49,7 +49,7 @@ impl WebGL2RenderingContext {
|
|||
fn new_inherited(
|
||||
window: &Window,
|
||||
canvas: &HTMLCanvasElement,
|
||||
size: Size2D<i32>,
|
||||
size: Size2D<u32>,
|
||||
attrs: GLContextAttributes,
|
||||
) -> Option<WebGL2RenderingContext> {
|
||||
let base = WebGLRenderingContext::new(window, canvas, WebGLVersion::WebGL2, size, attrs)?;
|
||||
|
@ -63,7 +63,7 @@ impl WebGL2RenderingContext {
|
|||
pub fn new(
|
||||
window: &Window,
|
||||
canvas: &HTMLCanvasElement,
|
||||
size: Size2D<i32>,
|
||||
size: Size2D<u32>,
|
||||
attrs: GLContextAttributes,
|
||||
) -> Option<DomRoot<WebGL2RenderingContext>> {
|
||||
WebGL2RenderingContext::new_inherited(window, canvas, size, attrs).map(|ctx| {
|
||||
|
@ -73,7 +73,7 @@ impl WebGL2RenderingContext {
|
|||
}
|
||||
|
||||
impl WebGL2RenderingContext {
|
||||
pub fn recreate(&self, size: Size2D<i32>) {
|
||||
pub fn recreate(&self, size: Size2D<u32>) {
|
||||
self.base.recreate(size)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue