mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +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
|
@ -36,10 +36,14 @@ pub struct WebGLCommandBacktrace {
|
|||
#[derive(Deserialize, Serialize)]
|
||||
pub enum WebGLMsg {
|
||||
/// Creates a new WebGLContext.
|
||||
CreateContext(WebGLVersion, Size2D<i32>, GLContextAttributes,
|
||||
WebGLSender<Result<(WebGLCreateContextResult), String>>),
|
||||
CreateContext(
|
||||
WebGLVersion,
|
||||
Size2D<u32>,
|
||||
GLContextAttributes,
|
||||
WebGLSender<Result<(WebGLCreateContextResult), String>>,
|
||||
),
|
||||
/// Resizes a WebGLContext.
|
||||
ResizeContext(WebGLContextId, Size2D<i32>, WebGLSender<Result<(), String>>),
|
||||
ResizeContext(WebGLContextId, Size2D<u32>, WebGLSender<Result<(), String>>),
|
||||
/// Drops a WebGLContext.
|
||||
RemoveContext(WebGLContextId),
|
||||
/// Runs a WebGLCommand in a specific WebGLContext.
|
||||
|
@ -141,10 +145,11 @@ impl WebGLMsgSender {
|
|||
|
||||
/// Send a resize message
|
||||
#[inline]
|
||||
pub fn send_resize(&self,
|
||||
size: Size2D<i32>,
|
||||
sender: WebGLSender<Result<(), String>>)
|
||||
-> WebGLSendResult {
|
||||
pub fn send_resize(
|
||||
&self,
|
||||
size: Size2D<u32>,
|
||||
sender: WebGLSender<Result<(), String>>,
|
||||
) -> WebGLSendResult {
|
||||
self.sender.send(WebGLMsg::ResizeContext(self.ctx_id, size, sender))
|
||||
}
|
||||
|
||||
|
@ -224,7 +229,7 @@ pub enum WebGLCommand {
|
|||
RenderbufferStorage(u32, u32, i32, i32),
|
||||
ReadPixels(i32, i32, i32, i32, u32, u32, IpcBytesSender),
|
||||
SampleCoverage(f32, bool),
|
||||
Scissor(i32, i32, i32, i32),
|
||||
Scissor(i32, i32, u32, u32),
|
||||
StencilFunc(u32, i32, u32),
|
||||
StencilFuncSeparate(u32, u32, i32, u32),
|
||||
StencilMask(u32),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue