mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Reset canvas state when changing bitmap dimensions
This commit is contained in:
parent
b4906aa008
commit
302f41d34b
4 changed files with 103 additions and 2 deletions
|
@ -81,7 +81,7 @@ impl HTMLCanvasElement {
|
|||
let size = self.get_size();
|
||||
if let Some(ref context) = *self.context.borrow() {
|
||||
match *context {
|
||||
CanvasContext::Context2d(ref context) => context.recreate(size),
|
||||
CanvasContext::Context2d(ref context) => context.set_bitmap_dimensions(size),
|
||||
CanvasContext::WebGL(ref context) => context.recreate(size),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue