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

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

Issue 1409243005: Make ImageBitmap Transferable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Better transfer function 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.h
diff --git a/third_party/WebKit/Source/core/frame/ImageBitmap.h b/third_party/WebKit/Source/core/frame/ImageBitmap.h
index 8dc3a51e7070dd73fd00cf08973306fd253b6a49..222193d1484e99aa031246594a9ef7ab5c3a61f5 100644
--- a/third_party/WebKit/Source/core/frame/ImageBitmap.h
+++ b/third_party/WebKit/Source/core/frame/ImageBitmap.h
@@ -41,6 +41,9 @@ public:
int height() const { return m_cropRect.height(); }
IntSize size() const { return m_cropRect.size(); }
+ bool isNeutered() const { return !m_bitmap && !m_imageElement; }
+ PassRefPtrWillBeRawPtr<ImageBitmap> transfer();
+
~ImageBitmap() override;
// CanvasImageSource implementation
@@ -75,7 +78,6 @@ private:
// ImageBitmaps constructed from HTMLImageElements reference the entire ImageResource and may have a non-zero bitmap offset.
// ImageBitmaps not constructed from HTMLImageElements always pre-crop and store the image at (0, 0).
IntPoint m_bitmapOffset;
-
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698