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

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

Issue 1423513005: Reland of: Make Imagebitmap Transferable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: should-work code Created 5 years, 1 month 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 ed4e543feb40624856211d1fb12582b60c63f6a2..90090b72dfe1960ffc5d9bc10e4b3c6cf0d7b50b 100644
--- a/third_party/WebKit/Source/core/frame/ImageBitmap.h
+++ b/third_party/WebKit/Source/core/frame/ImageBitmap.h
@@ -33,12 +33,16 @@ public:
static PassRefPtrWillBeRawPtr<ImageBitmap> create(ImageData*, const IntRect&);
static PassRefPtrWillBeRawPtr<ImageBitmap> create(ImageBitmap*, const IntRect&);
static PassRefPtrWillBeRawPtr<ImageBitmap> create(Image*, const IntRect&);
+ static PassRefPtrWillBeRawPtr<ImageBitmap> create(PassRefPtr<StaticBitmapImage>);
StaticBitmapImage* bitmapImage() const { return (m_image) ? m_image.get() : nullptr; }
unsigned long width() const;
unsigned long height() const;
IntSize size() const;
+ bool isNeutered() const { return m_isNeutered; }
+ PassRefPtr<StaticBitmapImage> transfer();
+
~ImageBitmap() override;
// CanvasImageSource implementation
@@ -56,12 +60,14 @@ private:
ImageBitmap(ImageData*, const IntRect&);
ImageBitmap(ImageBitmap*, const IntRect&);
ImageBitmap(Image*, const IntRect&);
+ ImageBitmap(PassRefPtr<StaticBitmapImage>);
// ImageLoaderClient
void notifyImageSourceChanged() override;
bool requestsHighLiveResourceCachePriority() override { return true; }
RefPtr<StaticBitmapImage> m_image;
+ bool m_isNeutered = false;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698