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

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: Correcting bugs and use new cache mechanism from SkImage Created 6 years, 5 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 b1ddfcb8b874449dbeeff908ae6605acfe32b3ec..43f673855f92eb7d69beb8f8032467f67b1bb1d0 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"
Justin Novosad 2014/07/29 14:56:52 forward declare instead.
Rémi Piotaix 2014/07/29 17:18:22 Done.
#include "third_party/skia/include/core/SkXfermode.h"
#include "wtf/Assertions.h"
#include "wtf/PassRefPtr.h"
@@ -69,6 +70,8 @@ public:
virtual bool isBitmapImage() const { return false; }
virtual bool currentFrameKnownToBeOpaque() = 0;
+ virtual PassRefPtr<SkImage> image() { return nullptr; }
Justin Novosad 2014/07/29 14:56:52 move to .cpp if SkImage is forward declared.
Rémi Piotaix 2014/07/29 17:18:22 Done.
+
// 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