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

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: rebase 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..47a03b94419d002851546a4d66429b2b5c7a2eb9 100644
--- a/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
+++ b/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
@@ -466,6 +466,11 @@ unsigned long ImageBitmap::height() const
return m_image->height();
}
+bool ImageBitmap::isTextureBacked() const
+{
+ return (!m_image->hasSkImage() || m_image->hasContext3DProvider());
Justin Novosad 2016/06/07 15:11:07 This is hard to read. The "!m_image->hasSkImage()"
xidachen 2016/06/07 17:49:53 I actually tried that before and it is a bit compl
+}
+
IntSize ImageBitmap::size() const
{
if (!m_image)

Powered by Google App Engine
This is Rietveld 408576698