| 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..0dac45b7c250c996aea3df9a364e5f7a4fade1f3 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, ImageBitmapSourceType sourceType)
|
| : 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 (sourceType == NotFromImageData) {
|
| + if (m_surface)
|
| + clear();
|
| + }
|
| }
|
|
|
| UnacceleratedImageBufferSurface::~UnacceleratedImageBufferSurface() { }
|
|
|