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

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

Issue 1962413002: Implement transferToImageBitmap() in WebGLRenderingContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add new test case, cache SkIMage Created 4 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
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 2908b28901fe34680d0ab25fff7967030fdd3a2a..5948ce5b57be0f025f050f34ee7b3af099b128b6 100644
--- a/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
+++ b/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
@@ -344,6 +344,11 @@ ImageBitmap::ImageBitmap(PassRefPtr<StaticBitmapImage> image)
m_image = image;
}
+ImageBitmap::ImageBitmap(WebExternalTextureMailbox& mailbox)
+{
+ m_image = StaticBitmapImage::create(mailbox);
+}
+
PassRefPtr<StaticBitmapImage> ImageBitmap::transfer()
{
ASSERT(!isNeutered());
@@ -396,6 +401,11 @@ ImageBitmap* ImageBitmap::create(PassRefPtr<StaticBitmapImage> image)
return new ImageBitmap(image);
}
+ImageBitmap* ImageBitmap::create(WebExternalTextureMailbox& mailbox)
+{
+ return new ImageBitmap(mailbox);
+}
+
void ImageBitmap::close()
{
if (!m_image || m_isNeutered)

Powered by Google App Engine
This is Rietveld 408576698