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

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

Issue 1295673003: Revert of 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
« no previous file with comments | « Source/platform/graphics/ImageBuffer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/ImageBuffer.cpp
diff --git a/Source/platform/graphics/ImageBuffer.cpp b/Source/platform/graphics/ImageBuffer.cpp
index 9ef74b93424fa9d080428ff065f6b4ed67904b45..12a631e173a4618d5632b44681869de5f3be4717 100644
--- a/Source/platform/graphics/ImageBuffer.cpp
+++ b/Source/platform/graphics/ImageBuffer.cpp
@@ -149,9 +149,6 @@
PassRefPtr<SkImage> ImageBuffer::newSkImageSnapshot() const
{
- if (m_snapshotState == InitialSnapshotState)
- m_snapshotState = DidAcquireSnapshot;
-
if (!isSurfaceValid())
return nullptr;
return m_surface->newImageSnapshot();
@@ -159,17 +156,12 @@
PassRefPtr<Image> ImageBuffer::newImageSnapshot() const
{
- RefPtr<SkImage> snapshot = newSkImageSnapshot();
+ if (!isSurfaceValid())
+ return nullptr;
+ RefPtr<SkImage> snapshot = m_surface->newImageSnapshot();
if (!snapshot)
return nullptr;
return StaticBitmapImage::create(snapshot);
-}
-
-void ImageBuffer::didDraw(const FloatRect& rect) const
-{
- if (m_snapshotState == DidAcquireSnapshot)
- m_snapshotState = DrawnToAfterSnapshot;
- m_surface->didDraw(rect);
}
WebLayer* ImageBuffer::platformLayer() const
« no previous file with comments | « Source/platform/graphics/ImageBuffer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698