diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2019-05-28 23:13:23 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-28 23:13:23 -0400 |
commit | 8dc7a25893cbe9a2c958966618d28757201899b6 (patch) | |
tree | 953ca23ef3bd4b6072021e76ae2527bfea7690d8 /components/script/dom/paintrenderingcontext2d.rs | |
parent | 84ec1316c90a29f07c60e10f78ba4d9f3185bef8 (diff) | |
parent | 85c20db495b25af653e6cb77130e166fae8d4b20 (diff) | |
download | servo-8dc7a25893cbe9a2c958966618d28757201899b6.tar.gz servo-8dc7a25893cbe9a2c958966618d28757201899b6.zip |
Auto merge of #23381 - maharsh312:master, r=jdm
Canvas Components for OffscreenCanvas
<!-- Please describe your changes on the following line: -->
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)
<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because ___
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23381)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/paintrenderingcontext2d.rs')
-rw-r--r-- | components/script/dom/paintrenderingcontext2d.rs | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/components/script/dom/paintrenderingcontext2d.rs b/components/script/dom/paintrenderingcontext2d.rs index 9454cc36c93..9bf7cc38eb4 100644 --- a/components/script/dom/paintrenderingcontext2d.rs +++ b/components/script/dom/paintrenderingcontext2d.rs @@ -21,7 +21,6 @@ use crate::dom::canvasgradient::CanvasGradient; use crate::dom::canvaspattern::CanvasPattern; use crate::dom::canvasrenderingcontext2d::CanvasRenderingContext2D; use crate::dom::paintworkletglobalscope::PaintWorkletGlobalScope; -use crate::dom::workletglobalscope::WorkletGlobalScope; use canvas_traits::canvas::CanvasImageData; use canvas_traits::canvas::CanvasMsg; use canvas_traits::canvas::FromLayoutMsg; @@ -44,16 +43,8 @@ pub struct PaintRenderingContext2D { impl PaintRenderingContext2D { fn new_inherited(global: &PaintWorkletGlobalScope) -> PaintRenderingContext2D { let size = Size2D::zero(); - let image_cache = global.image_cache(); - let base_url = global.upcast::<WorkletGlobalScope>().base_url(); PaintRenderingContext2D { - context: CanvasRenderingContext2D::new_inherited( - global.upcast(), - None, - image_cache, - base_url, - size, - ), + context: CanvasRenderingContext2D::new_inherited(global.upcast(), None, size), device_pixel_ratio: Cell::new(TypedScale::new(1.0)), } } |