diff options
author | bors-servo <servo-ops@mozilla.com> | 2020-06-15 14:22:21 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-15 14:22:21 -0400 |
commit | abc3ed40c9daf8c7a68d82a2d5fb40ad632eb27f (patch) | |
tree | 4f3d3d6f91d4b140db7d1d40eb28051228b09f8d /components/script/dom/webglrenderingcontext.rs | |
parent | 24cc72ba85fdec01ecc135313b09ae78d7b9b5f8 (diff) | |
parent | 2c95df73a4d74b24db451e5ff1d3ccc5ced10fe2 (diff) | |
download | servo-abc3ed40c9daf8c7a68d82a2d5fb40ad632eb27f.tar.gz servo-abc3ed40c9daf8c7a68d82a2d5fb40ad632eb27f.zip |
Auto merge of #26872 - kunalmohan:gpu-canvas-context, r=kvark,jdm
Implement GPUSwapChain and GPUCanvasContext and interface with Webrender
<!-- Please describe your changes on the following line: -->
r?@kvark
---
<!-- 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: -->
- [ ] 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. -->
Diffstat (limited to 'components/script/dom/webglrenderingcontext.rs')
-rw-r--r-- | components/script/dom/webglrenderingcontext.rs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/components/script/dom/webglrenderingcontext.rs b/components/script/dom/webglrenderingcontext.rs index c602b294548..4c1adbc58d3 100644 --- a/components/script/dom/webglrenderingcontext.rs +++ b/components/script/dom/webglrenderingcontext.rs @@ -23,7 +23,7 @@ use crate::dom::bindings::str::DOMString; use crate::dom::element::cors_setting_for_element; use crate::dom::event::{Event, EventBubbles, EventCancelable}; use crate::dom::htmlcanvaselement::utils as canvas_utils; -use crate::dom::htmlcanvaselement::HTMLCanvasElement; +use crate::dom::htmlcanvaselement::{HTMLCanvasElement, LayoutCanvasRenderingContextHelpers}; use crate::dom::htmliframeelement::HTMLIFrameElement; use crate::dom::node::{document_from_node, window_from_node, Node, NodeDamage}; use crate::dom::promise::Promise; @@ -539,7 +539,7 @@ impl WebGLRenderingContext { .dirty(NodeDamage::OtherNodeDamage); let document = document_from_node(&*self.canvas); - document.add_dirty_canvas(self); + document.add_dirty_webgl_canvas(self); } fn vertex_attrib(&self, indx: u32, x: f32, y: f32, z: f32, w: f32) { @@ -4697,12 +4697,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext { } } -pub trait LayoutCanvasWebGLRenderingContextHelpers { - #[allow(unsafe_code)] - unsafe fn canvas_data_source(self) -> HTMLCanvasDataSource; -} - -impl LayoutCanvasWebGLRenderingContextHelpers for LayoutDom<'_, WebGLRenderingContext> { +impl LayoutCanvasRenderingContextHelpers for LayoutDom<'_, WebGLRenderingContext> { #[allow(unsafe_code)] unsafe fn canvas_data_source(self) -> HTMLCanvasDataSource { (*self.unsafe_get()).layout_handle() |