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

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

Issue 201213002: Remove uses of SkBitmap::Config (deprecated) from core/ and platform/. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: review comments Created 6 years, 9 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/UnacceleratedImageBufferSurface.cpp
diff --git a/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp b/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp
index 40812df5e776038dbafc423a578370ea08678312..fe6057d1d2377fb57117dc3cfb81624249c0192c 100644
--- a/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp
+++ b/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp
@@ -38,14 +38,10 @@ namespace WebCore {
UnacceleratedImageBufferSurface::UnacceleratedImageBufferSurface(const IntSize& size, OpacityMode opacityMode)
: ImageBufferSurface(size, opacityMode)
+ , m_canvas(adoptPtr(SkCanvas::NewRasterN32(size.width(), size.height())))
Stephen Chennney 2014/03/18 12:47:57 I understand that this CL is not changing the beha
jbroman 2014/03/18 13:44:52 Yes, it is; SkCanvas extends SkRefCnt (so it's pos
{
- SkBitmap bitmap;
- bitmap.setConfig(SkBitmap::kARGB_8888_Config, size.width(), size.height());
- bitmap.allocPixels();
- if (bitmap.isNull())
- return;
- m_canvas = adoptPtr(new SkCanvas(bitmap));
- clear();
+ if (m_canvas)
+ clear();
}
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698