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

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

Issue 379253002: Initial implementation of display list backed 2D canvases (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 6 years, 5 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/ImageBufferSurface.cpp
diff --git a/Source/platform/graphics/ImageBufferSurface.cpp b/Source/platform/graphics/ImageBufferSurface.cpp
index f45925cb38e8820d18693425741c9a29b0fa1433..d284fe757f8b9555d06e0a46d61cb648daeedc21 100644
--- a/Source/platform/graphics/ImageBufferSurface.cpp
+++ b/Source/platform/graphics/ImageBufferSurface.cpp
@@ -35,6 +35,7 @@
#include "platform/graphics/ImageBuffer.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkDevice.h"
+#include "third_party/skia/include/core/SkPicture.h"
namespace blink {
@@ -45,6 +46,11 @@ ImageBufferSurface::ImageBufferSurface(const IntSize& size, OpacityMode opacityM
setIsHidden(false);
}
+PassRefPtr<SkPicture> ImageBufferSurface::getPicture()
+{
+ return nullptr;
+}
+
void ImageBufferSurface::clear()
{
// Clear the background transparent or opaque, as required. It would be nice if this wasn't
@@ -55,12 +61,14 @@ void ImageBufferSurface::clear()
canvas()->drawARGB(255, 0, 0, 0, SkXfermode::kSrc_Mode);
else
canvas()->drawARGB(0, 0, 0, 0, SkXfermode::kClear_Mode);
+ didClearCanvas();
}
}
-const SkBitmap& ImageBufferSurface::bitmap() const
+const SkBitmap& ImageBufferSurface::bitmap()
{
ASSERT(canvas());
+ willReadback();
return canvas()->getTopDevice()->accessBitmap(false);
}
« no previous file with comments | « Source/platform/graphics/ImageBufferSurface.h ('k') | Source/platform/graphics/RecordingImageBufferSurface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698