mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Don't create 2D canvas contexts arbitrarily
Sometimes, the canvas still has no rendering context, in this case it represents a transparent black rectangle.
This commit is contained in:
parent
ed673f8070
commit
f1e8eb640c
4 changed files with 107 additions and 90 deletions
|
@ -38,7 +38,7 @@ pub struct CanvasImageData {
|
|||
pub enum Canvas2dMsg {
|
||||
Arc(Point2D<f32>, f32, f32, f32, bool),
|
||||
ArcTo(Point2D<f32>, Point2D<f32>, f32),
|
||||
DrawImage(ByteBuf, Size2D<f64>, Rect<f64>, Rect<f64>, bool),
|
||||
DrawImage(Option<ByteBuf>, Size2D<f64>, Rect<f64>, Rect<f64>, bool),
|
||||
DrawImageSelf(Size2D<f64>, Rect<f64>, Rect<f64>, bool),
|
||||
DrawImageInOther(
|
||||
CanvasId, Size2D<f64>, Rect<f64>, Rect<f64>, bool),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue