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

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

Issue 1409243005: Make ImageBitmap Transferable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Even more on OilPan compatible issue Created 5 years, 2 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
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 bb45b3f009b97649d272ffb1158c13e864aee62a..4d656e53e7e21f143c5dae9c963778e5e30c3cc4 100644
--- a/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
+++ b/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
@@ -181,6 +181,19 @@ PassRefPtrWillBeRawPtr<ImageBitmap> ImageBitmap::create(Image* image, const IntR
return adoptRefWillBeNoop(new ImageBitmap(image, normalizedCropRect));
}
+void ImageBitmap::neuter()
Justin Novosad 2015/10/24 03:04:48 I don't see why neuter and transfer need to be sep
xidachen 2015/10/24 20:36:25 That makes perfect sense. They are now merged into
+{
+ if (m_imageElement)
+ m_imageElement.clear();
+ if (m_bitmap)
+ m_bitmap.clear();
+}
+
+PassRefPtrWillBeRawPtr<ImageBitmap> ImageBitmap::transfer()
+{
+ return adoptRefWillBeNoop(new ImageBitmap(this, m_cropRect));
+}
+
void ImageBitmap::notifyImageSourceChanged()
{
m_bitmap = cropImage(m_imageElement->cachedImage()->image(), m_cropRect);
« no previous file with comments | « third_party/WebKit/Source/core/frame/ImageBitmap.h ('k') | third_party/WebKit/Source/web/WebSerializedScriptValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698