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

Unified Diff: Source/platform/graphics/ImageBufferSurface.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: Corrections 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
« no previous file with comments | « Source/platform/graphics/ImageBuffer.cpp ('k') | Source/platform/graphics/ImageBufferSurface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/ImageBufferSurface.h
diff --git a/Source/platform/graphics/ImageBufferSurface.h b/Source/platform/graphics/ImageBufferSurface.h
index 21708562a9fd7635c3e93dec89aed776152cfa78..ebc9150e1412c1dc87cde9569e9ac52e559792f8 100644
--- a/Source/platform/graphics/ImageBufferSurface.h
+++ b/Source/platform/graphics/ImageBufferSurface.h
@@ -40,6 +40,7 @@
class SkBitmap;
class SkCanvas;
+class SkImage;
class SkPicture;
namespace blink {
@@ -56,7 +57,7 @@ enum OpacityMode {
class PLATFORM_EXPORT ImageBufferSurface {
WTF_MAKE_NONCOPYABLE(ImageBufferSurface); WTF_MAKE_FAST_ALLOCATED;
public:
- virtual ~ImageBufferSurface() { }
+ virtual ~ImageBufferSurface();
virtual SkCanvas* canvas() const = 0;
virtual const SkBitmap& bitmap();
@@ -77,6 +78,8 @@ public:
virtual void didClearCanvas() { }
virtual void finalizeFrame(const FloatRect &dirtyRect) { }
+ virtual PassRefPtr<SkImage> newImageSnapshot() const;
+
OpacityMode opacityMode() const { return m_opacityMode; }
const IntSize& size() const { return m_size; }
void notifyIsValidChanged(bool isValid) const;
« no previous file with comments | « Source/platform/graphics/ImageBuffer.cpp ('k') | Source/platform/graphics/ImageBufferSurface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698