mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Extract canvas operations for reuse by OffscreenCanvas.
This commit is contained in:
parent
6fb7a8cdc7
commit
85c20db495
257 changed files with 1857 additions and 1870 deletions
|
@ -93,7 +93,12 @@ impl OffscreenCanvas {
|
|||
};
|
||||
}
|
||||
let size = self.get_size();
|
||||
let context = OffscreenCanvasRenderingContext2D::new(&self.global(), self, size);
|
||||
let context = OffscreenCanvasRenderingContext2D::new(
|
||||
&self.global(),
|
||||
self,
|
||||
size,
|
||||
self.placeholder.as_ref().map(|c| &**c),
|
||||
);
|
||||
*self.context.borrow_mut() = Some(OffscreenCanvasContext::OffscreenContext2d(
|
||||
Dom::from_ref(&*context),
|
||||
));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue