mirror of
https://github.com/servo/servo.git
synced 2025-08-01 19:50:30 +01:00
webrender_traits: update closure in with_front_buffer to FnOnce (#32946)
Signed-off-by: Wu Wayne <yuweiwu@pm.me>
This commit is contained in:
parent
23df681479
commit
3f339d6856
1 changed files with 1 additions and 1 deletions
|
@ -169,7 +169,7 @@ impl RenderingContext {
|
||||||
|
|
||||||
/// Invoke a closure with the surface associated with the current front buffer.
|
/// Invoke a closure with the surface associated with the current front buffer.
|
||||||
/// This can be used to create a surfman::SurfaceTexture to blit elsewhere.
|
/// This can be used to create a surfman::SurfaceTexture to blit elsewhere.
|
||||||
pub fn with_front_buffer<F: FnMut(&Device, Surface) -> Surface>(&self, mut f: F) {
|
pub fn with_front_buffer<F: FnOnce(&Device, Surface) -> Surface>(&self, f: F) {
|
||||||
let device = &mut self.0.device.borrow_mut();
|
let device = &mut self.0.device.borrow_mut();
|
||||||
let context = &mut self.0.context.borrow_mut();
|
let context = &mut self.0.context.borrow_mut();
|
||||||
let surface = device
|
let surface = device
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue