Chromium Code Reviews| Index: third_party/WebKit/Source/platform/graphics/UnacceleratedSimpleImageBufferSurface.cpp |
| diff --git a/third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp b/third_party/WebKit/Source/platform/graphics/UnacceleratedSimpleImageBufferSurface.cpp |
| similarity index 81% |
| copy from third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp |
| copy to third_party/WebKit/Source/platform/graphics/UnacceleratedSimpleImageBufferSurface.cpp |
| index f01b7a7c7a05ab75ca9b3ab42603c815cefebff0..060b198070edb2f06d3b3ead77bb914886029826 100644 |
| --- a/third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp |
| +++ b/third_party/WebKit/Source/platform/graphics/UnacceleratedSimpleImageBufferSurface.cpp |
| @@ -29,7 +29,7 @@ |
| */ |
| #include "config.h" |
| -#include "platform/graphics/UnacceleratedImageBufferSurface.h" |
| +#include "platform/graphics/UnacceleratedSimpleImageBufferSurface.h" |
| #include "third_party/skia/include/core/SkCanvas.h" |
| #include "third_party/skia/include/core/SkDevice.h" |
| @@ -38,37 +38,34 @@ |
| namespace blink { |
| -UnacceleratedImageBufferSurface::UnacceleratedImageBufferSurface(const IntSize& size, OpacityMode opacityMode) |
| +UnacceleratedSimpleImageBufferSurface::UnacceleratedSimpleImageBufferSurface(const IntSize& size, OpacityMode opacityMode) |
| : ImageBufferSurface(size, opacityMode) |
| { |
| SkAlphaType alphaType = (Opaque == opacityMode) ? kOpaque_SkAlphaType : kPremul_SkAlphaType; |
| SkImageInfo info = SkImageInfo::MakeN32(size.width(), size.height(), alphaType); |
| SkSurfaceProps disableLCDProps(0, kUnknown_SkPixelGeometry); |
| m_surface = adoptRef(SkSurface::NewRaster(info, Opaque == opacityMode ? 0 : &disableLCDProps)); |
| - |
| - if (m_surface) |
| - clear(); |
|
Justin Novosad
2015/10/03 03:22:55
This is too small of a difference to justify creat
|
| } |
| -UnacceleratedImageBufferSurface::~UnacceleratedImageBufferSurface() { } |
| +UnacceleratedSimpleImageBufferSurface::~UnacceleratedSimpleImageBufferSurface() { } |
| -SkCanvas* UnacceleratedImageBufferSurface::canvas() |
| +SkCanvas* UnacceleratedSimpleImageBufferSurface::canvas() |
| { |
| return m_surface->getCanvas(); |
| } |
| -const SkBitmap& UnacceleratedImageBufferSurface::deprecatedBitmapForOverwrite() |
| +const SkBitmap& UnacceleratedSimpleImageBufferSurface::deprecatedBitmapForOverwrite() |
| { |
| m_surface->notifyContentWillChange(SkSurface::kDiscard_ContentChangeMode); |
| return m_surface->getCanvas()->getDevice()->accessBitmap(false); |
| } |
| -bool UnacceleratedImageBufferSurface::isValid() const |
| +bool UnacceleratedSimpleImageBufferSurface::isValid() const |
| { |
| return m_surface; |
| } |
| -PassRefPtr<SkImage> UnacceleratedImageBufferSurface::newImageSnapshot(AccelerationHint) |
| +PassRefPtr<SkImage> UnacceleratedSimpleImageBufferSurface::newImageSnapshot(AccelerationHint) |
| { |
| return adoptRef(m_surface->newImageSnapshot()); |
| } |