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

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

Issue 2026803002: Avoid GPU readback in tex(Sub)Image2D(ImageBitmap) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: staticbitmapimage does not keep provider anymore Created 4 years, 6 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 19d831308e299cff8b57d5825a9bd4400b1ecd03..c394b0bc75337d56900e10bafc95ae29a5fcc473 100644
--- a/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
+++ b/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
@@ -466,6 +466,13 @@ unsigned long ImageBitmap::height() const
return m_image->height();
}
+// This function is used in WebGL's texImage, if it returns true, WebGL will a
Justin Novosad 2016/06/09 20:21:29 "will do a"
xidachen 2016/06/10 15:36:08 Done.
+// GPU-GPU texture copy. So this function returns true only when it has a mailbox.
+bool ImageBitmap::isTextureBacked() const
+{
+ return m_image && m_image->hasMailbox();
Justin Novosad 2016/06/09 20:21:29 What about the case where we have no mailbox, but
xidachen 2016/06/10 15:36:08 Changed the implementation to indicate whether bit
+}
+
IntSize ImageBitmap::size() const
{
if (!m_image)

Powered by Google App Engine
This is Rietveld 408576698