mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +01:00
Make LayoutCanvasWebGLRenderingContextHelpers methods take self
This commit is contained in:
parent
301acdc309
commit
d87444cb1f
2 changed files with 3 additions and 3 deletions
|
@ -3886,7 +3886,7 @@ impl WebGL2RenderingContextMethods for WebGL2RenderingContext {
|
||||||
|
|
||||||
impl LayoutCanvasWebGLRenderingContextHelpers for LayoutDom<'_, WebGL2RenderingContext> {
|
impl LayoutCanvasWebGLRenderingContextHelpers for LayoutDom<'_, WebGL2RenderingContext> {
|
||||||
#[allow(unsafe_code)]
|
#[allow(unsafe_code)]
|
||||||
unsafe fn canvas_data_source(&self) -> HTMLCanvasDataSource {
|
unsafe fn canvas_data_source(self) -> HTMLCanvasDataSource {
|
||||||
let this = &*self.unsafe_get();
|
let this = &*self.unsafe_get();
|
||||||
(*this.base.to_layout().unsafe_get()).layout_handle()
|
(*this.base.to_layout().unsafe_get()).layout_handle()
|
||||||
}
|
}
|
||||||
|
|
|
@ -4447,12 +4447,12 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
|
||||||
|
|
||||||
pub trait LayoutCanvasWebGLRenderingContextHelpers {
|
pub trait LayoutCanvasWebGLRenderingContextHelpers {
|
||||||
#[allow(unsafe_code)]
|
#[allow(unsafe_code)]
|
||||||
unsafe fn canvas_data_source(&self) -> HTMLCanvasDataSource;
|
unsafe fn canvas_data_source(self) -> HTMLCanvasDataSource;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl LayoutCanvasWebGLRenderingContextHelpers for LayoutDom<'_, WebGLRenderingContext> {
|
impl LayoutCanvasWebGLRenderingContextHelpers for LayoutDom<'_, WebGLRenderingContext> {
|
||||||
#[allow(unsafe_code)]
|
#[allow(unsafe_code)]
|
||||||
unsafe fn canvas_data_source(&self) -> HTMLCanvasDataSource {
|
unsafe fn canvas_data_source(self) -> HTMLCanvasDataSource {
|
||||||
(*self.unsafe_get()).layout_handle()
|
(*self.unsafe_get()).layout_handle()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue