diff options
Diffstat (limited to 'components/canvas/webgl_paint_thread.rs')
-rw-r--r-- | components/canvas/webgl_paint_thread.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/components/canvas/webgl_paint_thread.rs b/components/canvas/webgl_paint_thread.rs index 5c71df5cbe5..8b1ff8ff753 100644 --- a/components/canvas/webgl_paint_thread.rs +++ b/components/canvas/webgl_paint_thread.rs @@ -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); + } + } +} |