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

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

Issue 211503006: Implementation of 2D canvas context lost/restored events (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 9 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/ImageBufferClient.h ('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 f05c021ff0b368eca0b8a6fb7dd85340c65788ab..a240f3776b4878f1bcd2a655f5aea9d36d071201 100644
--- a/Source/platform/graphics/ImageBufferSurface.h
+++ b/Source/platform/graphics/ImageBufferSurface.h
@@ -44,6 +44,8 @@ namespace blink { class WebLayer; }
namespace WebCore {
+class ImageBuffer;
+
enum OpacityMode {
NonOpaque,
Opaque,
@@ -58,6 +60,7 @@ public:
virtual const SkBitmap& bitmap() const;
virtual void willUse() { } // Called by ImageBuffer before reading or writing to the surface.
virtual bool isValid() const = 0;
+ virtual bool restore() { return false; };
virtual blink::WebLayer* layer() const { return 0; };
virtual bool isAccelerated() const { return false; }
virtual Platform3DObject getBackingTexture() const { return 0; }
@@ -66,20 +69,16 @@ public:
virtual void invalidateCachedBitmap() { }
virtual void updateCachedBitmapIfNeeded() { }
virtual void setIsHidden(bool) { }
+ virtual void setImageBuffer(ImageBuffer*) { }
OpacityMode opacityMode() const { return m_opacityMode; }
const IntSize& size() const { return m_size; }
+ void notifyIsValidChanged(bool isValid) const;
protected:
+ ImageBufferSurface(const IntSize&, OpacityMode);
void clear();
- ImageBufferSurface(const IntSize& size, OpacityMode opacityMode)
- : m_opacityMode(opacityMode)
- , m_size(size)
- {
- setIsHidden(false);
- }
-
private:
OpacityMode m_opacityMode;
IntSize m_size;
« no previous file with comments | « Source/platform/graphics/ImageBufferClient.h ('k') | Source/platform/graphics/ImageBufferSurface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698