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

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

Issue 1288773005: 2D canvas: remain in deferred rendering mode with canvas to canvas drawImage (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add init of snapShot state Created 5 years, 4 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/modules/canvas2d/CanvasRenderingContext2D.cpp ('k') | Source/platform/graphics/ImageBuffer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/ImageBuffer.h
diff --git a/Source/platform/graphics/ImageBuffer.h b/Source/platform/graphics/ImageBuffer.h
index 6468bde505f9977f8aea21c12b4406e0d5463d76..1d26d9e083a200fffdb232c51eef02694a98d3d9 100644
--- a/Source/platform/graphics/ImageBuffer.h
+++ b/Source/platform/graphics/ImageBuffer.h
@@ -82,7 +82,8 @@ public:
bool isExpensiveToPaint() const { return m_surface->isExpensiveToPaint(); }
bool isSurfaceValid() const;
bool restoreSurface() const;
- void didDraw(const FloatRect& rect) const { m_surface->didDraw(rect); }
+ void didDraw(const FloatRect&) const;
+ bool wasDrawnToAfterSnapshot() const { return m_snapshotState == DrawnToAfterSnapshot; }
void setFilterQuality(SkFilterQuality filterQuality) { m_surface->setFilterQuality(filterQuality); }
void setIsHidden(bool hidden) { m_surface->setIsHidden(hidden); }
@@ -138,6 +139,12 @@ public:
private:
ImageBuffer(PassOwnPtr<ImageBufferSurface>);
+ enum SnapshotState {
+ InitialSnapshotState,
+ DidAcquireSnapshot,
+ DrawnToAfterSnapshot,
+ };
+ mutable SnapshotState m_snapshotState;
OwnPtr<ImageBufferSurface> m_surface;
ImageBufferClient* m_client;
};
« no previous file with comments | « Source/modules/canvas2d/CanvasRenderingContext2D.cpp ('k') | Source/platform/graphics/ImageBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698