| Index: src/core/SkBitmapDevice.cpp
|
| diff --git a/src/core/SkBitmapDevice.cpp b/src/core/SkBitmapDevice.cpp
|
| index 4f8074d3a672ea0df255a09cc540b5c726e552fa..2690ad39fb1bb79d74309fcdfdd26c3f898ce634 100644
|
| --- a/src/core/SkBitmapDevice.cpp
|
| +++ b/src/core/SkBitmapDevice.cpp
|
| @@ -16,6 +16,7 @@
|
| #include "SkPath.h"
|
| #include "SkPixelRef.h"
|
| #include "SkPixmap.h"
|
| +#include "SkRasterCanvasLayerAllocator.h"
|
| #include "SkRasterClip.h"
|
| #include "SkShader.h"
|
| #include "SkSpecialImage.h"
|
| @@ -134,8 +135,17 @@ void SkBitmapDevice::replaceBitmapBackendForRasterSurface(const SkBitmap& bm) {
|
| this->privateResize(fBitmap.info().width(), fBitmap.info().height());
|
| }
|
|
|
| -SkBaseDevice* SkBitmapDevice::onCreateDevice(const CreateInfo& cinfo, const SkPaint*) {
|
| +SkBaseDevice* SkBitmapDevice::onCreateDevice(const CreateInfo& cinfo, const SkPaint*,
|
| + SkRasterCanvasLayerAllocator* allocator) {
|
| +SkDebugf("SkBitmapDevice::onCreateDevice(%lx)", allocator);
|
| const SkSurfaceProps surfaceProps(this->surfaceProps().flags(), cinfo.fPixelGeometry);
|
| + if (allocator) {
|
| + SkBitmap bitmap;
|
| + size_t rowBytes;
|
| + void* pixels = allocator->allocateLayer(cinfo.fInfo, &rowBytes);
|
| + bitmap.installPixels(cinfo.fInfo, pixels, rowBytes);
|
| + return new SkBitmapDevice(bitmap, surfaceProps);
|
| + }
|
| return SkBitmapDevice::Create(cinfo.fInfo, surfaceProps);
|
| }
|
|
|
|
|