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

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: 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
Index: Source/platform/graphics/ImageBuffer.h
diff --git a/Source/platform/graphics/ImageBuffer.h b/Source/platform/graphics/ImageBuffer.h
index 6468bde505f9977f8aea21c12b4406e0d5463d76..a8fb5639c3ba3c2dca8713a2a5acee53836ec0ad 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 isAnimated() const { return m_animationState == DidDrawAfterSnapshot; }
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 AnimationState {
+ InitialAnimationState,
+ DidAcquireSnapshot,
+ DidDrawAfterSnapshot,
+ };
+ mutable AnimationState m_animationState;
OwnPtr<ImageBufferSurface> m_surface;
ImageBufferClient* m_client;
};

Powered by Google App Engine
This is Rietveld 408576698