mirror of
https://github.com/electron/electron.git
synced 2026-01-27 00:09:09 -05:00
fix leaking of NativeImage instances
This commit is contained in:
@@ -1578,9 +1578,7 @@ bool WebContents::IsOffScreen() const {
|
||||
}
|
||||
|
||||
void WebContents::OnPaint(const gfx::Rect& dirty_rect, const SkBitmap& bitmap) {
|
||||
mate::Handle<NativeImage> image =
|
||||
NativeImage::Create(isolate(), gfx::Image::CreateFrom1xBitmap(bitmap));
|
||||
Emit("paint", dirty_rect, image);
|
||||
Emit("paint", dirty_rect, gfx::Image::CreateFrom1xBitmap(bitmap));
|
||||
}
|
||||
|
||||
void WebContents::StartPainting() {
|
||||
|
||||
Reference in New Issue
Block a user