Index: third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp |
diff --git a/third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp b/third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp |
index f01b7a7c7a05ab75ca9b3ab42603c815cefebff0..e38d85f0be71a481f8723dfa554457278ae03dd8 100644 |
--- a/third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp |
+++ b/third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp |
@@ -38,7 +38,7 @@ |
namespace blink { |
-UnacceleratedImageBufferSurface::UnacceleratedImageBufferSurface(const IntSize& size, OpacityMode opacityMode) |
+UnacceleratedImageBufferSurface::UnacceleratedImageBufferSurface(const IntSize& size, OpacityMode opacityMode, ImageInitializationMode initializationMode) |
: ImageBufferSurface(size, opacityMode) |
{ |
SkAlphaType alphaType = (Opaque == opacityMode) ? kOpaque_SkAlphaType : kPremul_SkAlphaType; |
@@ -46,8 +46,10 @@ UnacceleratedImageBufferSurface::UnacceleratedImageBufferSurface(const IntSize& |
SkSurfaceProps disableLCDProps(0, kUnknown_SkPixelGeometry); |
m_surface = adoptRef(SkSurface::NewRaster(info, Opaque == opacityMode ? 0 : &disableLCDProps)); |
- if (m_surface) |
- clear(); |
+ if (initializationMode == DoNotInitializeImagePixels) { |
rickyz (no longer on Chrome)
2016/01/19 23:34:49
Is this logic correct? Shouldn't this clear initia
rickyz (no longer on Chrome)
2016/01/19 23:43:10
Never mind, I see that this was fixed in a later C
|
+ if (m_surface) |
+ clear(); |
+ } |
} |
UnacceleratedImageBufferSurface::~UnacceleratedImageBufferSurface() { } |