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

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

Issue 399213002: Change GraphicsContext::createCompatibleBuffer to return something non-null (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rename 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
« no previous file with comments | « Source/platform/graphics/GraphicsContext.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/GraphicsContext.cpp
diff --git a/Source/platform/graphics/GraphicsContext.cpp b/Source/platform/graphics/GraphicsContext.cpp
index 0d60ab5ea5016517e80d54591797bf3c2151678e..8bc2c43e88346c6b13bf2fcd094bba8435e882ea 100644
--- a/Source/platform/graphics/GraphicsContext.cpp
+++ b/Source/platform/graphics/GraphicsContext.cpp
@@ -1633,7 +1633,7 @@ void GraphicsContext::adjustLineToPixelBoundaries(FloatPoint& p1, FloatPoint& p2
}
}
-PassOwnPtr<ImageBuffer> GraphicsContext::createCompatibleBuffer(const IntSize& size, OpacityMode opacityMode) const
+PassOwnPtr<ImageBuffer> GraphicsContext::createRasterBuffer(const IntSize& size, OpacityMode opacityMode) const
{
// Make the buffer larger if the context's transform is scaling it so we need a higher
// resolution than one pixel per unit. Also set up a corresponding scale factor on the
@@ -1644,7 +1644,7 @@ PassOwnPtr<ImageBuffer> GraphicsContext::createCompatibleBuffer(const IntSize& s
SkAlphaType alphaType = (opacityMode == Opaque) ? kOpaque_SkAlphaType : kPremul_SkAlphaType;
SkImageInfo info = SkImageInfo::MakeN32(size.width(), size.height(), alphaType);
- RefPtr<SkSurface> skSurface = adoptRef(m_canvas->newSurface(info));
+ RefPtr<SkSurface> skSurface = adoptRef(SkSurface::NewRaster(info));
if (!skSurface)
return nullptr;
OwnPtr<ImageBufferSurface> surface = adoptPtr(new CompatibleImageBufferSurface(skSurface.release(), scaledSize, opacityMode));
« no previous file with comments | « Source/platform/graphics/GraphicsContext.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698