mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Add WebGLContextAttributes support
This commit also: * Allows to return non-rootable dictionaries from Codegen. * Merges the two context types in an enum type.
This commit is contained in:
parent
b1a773a15b
commit
b3ac346749
16 changed files with 255 additions and 80 deletions
|
@ -214,7 +214,11 @@ impl CanvasRenderingContext2D {
|
|||
let msg = if self.canvas.root().r() == canvas {
|
||||
CanvasMsg::Canvas2d(Canvas2dMsg::DrawImageSelf(image_size, dest_rect, source_rect, smoothing_enabled))
|
||||
} else { // Source and target canvases are different
|
||||
let context = canvas.get_2d_context().root();
|
||||
let context = match canvas.get_or_init_2d_context() {
|
||||
Some(context) => context.root(),
|
||||
None => return Err(InvalidState),
|
||||
};
|
||||
|
||||
let renderer = context.r().get_renderer();
|
||||
let (sender, receiver) = channel::<Vec<u8>>();
|
||||
// Reads pixels from source image
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue