Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(636)

Unified Diff: third_party/WebKit/Source/core/frame/ImageBitmap.cpp

Issue 2796103002: WIP: Adjust externally allocated memory when ImageBitmap is transferred (Closed)
Patch Set: works Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/graphics/StaticBitmapImage.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/ImageBitmap.cpp
diff --git a/third_party/WebKit/Source/core/frame/ImageBitmap.cpp b/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
index 236964ce6e00a943dd13c332ca66afdc31bc8e5b..3a36e64bdc25be156a5cc2671bd9abee2ab43e44 100644
--- a/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
+++ b/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
@@ -1047,6 +1047,8 @@ ImageBitmap* ImageBitmap::Create(const void* pixel_data,
void ImageBitmap::close() {
if (!image_ || is_neutered_)
return;
+ if (image_)
+ image_->UnregisterExternalAllocationWithCurrentContext();
image_.Clear();
is_neutered_ = true;
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/graphics/StaticBitmapImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698