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

Unified Diff: Source/platform/graphics/Image.h

Issue 358893002: Use newImageSnapshot() to get an image from a Canvas (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created ImagePattern and StaticBitmapImage Created 6 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: Source/platform/graphics/Image.h
diff --git a/Source/platform/graphics/Image.h b/Source/platform/graphics/Image.h
index 706f15ca1331a95c072904b6bd04343637f0aea8..8608f5c3a3dab8b4ed51511804e6f27eb00b1712 100644
--- a/Source/platform/graphics/Image.h
+++ b/Source/platform/graphics/Image.h
@@ -33,6 +33,7 @@
#include "platform/graphics/GraphicsTypes.h"
#include "platform/graphics/ImageOrientation.h"
#include "platform/graphics/skia/NativeImageSkia.h"
+#include "third_party/skia/include/core/SkImage.h"
#include "third_party/skia/include/core/SkXfermode.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefCounted.h"
@@ -68,6 +69,8 @@ public:
virtual bool isBitmapImage() const { return false; }
virtual bool currentFrameKnownToBeOpaque() = 0;
+ virtual PassRefPtr<SkImage> image() { return nullptr; }
+
// Derived classes should override this if they can assure that the current
// image frame contains only resources from its own security origin.
virtual bool currentFrameHasSingleSecurityOrigin() const { return false; }

Powered by Google App Engine
This is Rietveld 408576698