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

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

Issue 895153002: Make CanvasRenderingContext2D use SkCanvas directly (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix issue with the copy composite operator Created 5 years, 10 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') | Source/platform/graphics/skia/SkiaUtils.h » ('j') | 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 5324dbade0027a5c4c0d2bb8d33ace568d65a1ce..b2646e0d0b50735fd3aa3e50aafb88557960bc5c 100644
--- a/Source/platform/graphics/ImageBuffer.cpp
+++ b/Source/platform/graphics/ImageBuffer.cpp
@@ -95,11 +95,18 @@ ImageBuffer::~ImageBuffer()
GraphicsContext* ImageBuffer::context() const
{
if (!isSurfaceValid())
- return 0;
+ return nullptr;
ASSERT(m_context.get());
return m_context.get();
}
+SkCanvas* ImageBuffer::canvas() const
+{
+ if (!isSurfaceValid())
+ return nullptr;
+ return m_surface->canvas();
+}
+
const SkBitmap& ImageBuffer::bitmap() const
{
return m_surface->bitmap();
« no previous file with comments | « Source/platform/graphics/ImageBuffer.h ('k') | Source/platform/graphics/skia/SkiaUtils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698