mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
canvas: Deallocate WebRender images on canvas
Fixes #11062 Depends on: #11744, https://github.com/servo/webrender_traits/pull/57, and https://github.com/servo/webrender/pull/292
This commit is contained in:
parent
68aca87e30
commit
b7d45fe096
2 changed files with 16 additions and 0 deletions
|
@ -195,3 +195,11 @@ impl WebGLPaintThread {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for WebGLPaintThread {
|
||||
fn drop(&mut self) {
|
||||
if let WebGLPaintTaskData::Readback(_, Some((ref mut wr, image_key))) = self.data {
|
||||
wr.delete_image(image_key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue