mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Addresses issues raised in #24465; removes redundancy in set_bitmap_dimensions
Removed passing test .ini files and moved euclid extensions to euclidext.rs to factor out redundant code
This commit is contained in:
parent
f7fb130a2a
commit
ec2961920b
32 changed files with 211 additions and 131 deletions
|
@ -28,6 +28,7 @@ use crate::dom::webgl2renderingcontext::WebGL2RenderingContext;
|
|||
use crate::dom::webglrenderingcontext::{
|
||||
LayoutCanvasWebGLRenderingContextHelpers, WebGLRenderingContext,
|
||||
};
|
||||
use crate::euclidext::Size2DExt;
|
||||
use crate::script_runtime::JSContext;
|
||||
use base64;
|
||||
use canvas_traits::canvas::{CanvasId, CanvasMsg, FromScriptMsg};
|
||||
|
@ -94,7 +95,9 @@ impl HTMLCanvasElement {
|
|||
let size = self.get_size();
|
||||
if let Some(ref context) = *self.context.borrow() {
|
||||
match *context {
|
||||
CanvasContext::Context2d(ref context) => context.set_bitmap_dimensions(size),
|
||||
CanvasContext::Context2d(ref context) => {
|
||||
context.set_canvas_bitmap_dimensions(size.to_u64())
|
||||
},
|
||||
CanvasContext::WebGL(ref context) => context.recreate(size),
|
||||
CanvasContext::WebGL2(ref context) => context.recreate(size),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue