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

Unified Diff: Source/platform/graphics/ImageBuffer.cpp

Issue 358893002: Use newImageSnapshot() to get an image from a Canvas (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Again in StaticBitmapPattern Created 6 years, 3 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: Source/platform/graphics/ImageBuffer.cpp
diff --git a/Source/platform/graphics/ImageBuffer.cpp b/Source/platform/graphics/ImageBuffer.cpp
index 73341c56f9f28ce9896ade7cf20ea6935ca78d18..5dfb1cf1a4491285507cf33a39445a7163c3a68e 100644
--- a/Source/platform/graphics/ImageBuffer.cpp
+++ b/Source/platform/graphics/ImageBuffer.cpp
@@ -138,6 +138,11 @@ void ImageBuffer::notifySurfaceInvalid()
m_client->notifySurfaceInvalid();
}
+PassRefPtr<SkImage> ImageBuffer::newImageSnapshot() const
+{
+ return m_surface->newImageSnapshot();
+}
+
static SkBitmap deepSkBitmapCopy(const SkBitmap& bitmap)
{
SkBitmap tmp;

Powered by Google App Engine
This is Rietveld 408576698