 Chromium Code Reviews
 Chromium Code Reviews Issue 358893002:
  Use newImageSnapshot() to get an image from a Canvas  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink.git@master
    
  
    Issue 358893002:
  Use newImageSnapshot() to get an image from a Canvas  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink.git@master| 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; } |