| Index: src/core/SkManagedBitmapDevice.h
|
| diff --git a/src/core/SkManagedBitmapDevice.h b/src/core/SkManagedBitmapDevice.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..af0196ba14ba974e4a6c525490f1dc26b09fe7c9
|
| --- /dev/null
|
| +++ b/src/core/SkManagedBitmapDevice.h
|
| @@ -0,0 +1,41 @@
|
| +/*
|
| + * Copyright 2016 Google Inc.
|
| + *
|
| + * Use of this source code is governed by a BSD-style license that can be
|
| + * found in the LICENSE file.
|
| + */
|
| +
|
| +#ifndef SkManagedBitmapDevice_DEFINED
|
| +#define SkManagedBitmapDevice_DEFINED
|
| +
|
| +#include "SkBitmapDevice.h"
|
| +
|
| +class SkBitmap;
|
| +class SkSurfaceProps;
|
| +
|
| +/**
|
| + * A BitmapDevice whose raster backing is managed by the OS or some external
|
| + * library.
|
| + */
|
| +
|
| +class SkManagedBitmapDevice : public SkBitmapDevice {
|
| +public:
|
| + SkManagedBitmapDevice(const SkBitmap& bitmap,
|
| + const SkSurfaceProps& surfaceProps,
|
| + void (*deallocator) (void*),
|
| + void* deallocatorPayload);
|
| +
|
| + ~SkManagedBitmapDevice() override;
|
| +private:
|
| +
|
| + /// An implementation-dependent function to call when releasing
|
| + /// the raster backing.
|
| + void (*fDeallocator)(void* payload);
|
| +
|
| + void* fDeallocatorPayload;
|
| +
|
| + typedef SkBitmapDevice INHERITED;
|
| +};
|
| +
|
| +#endif // SkManagedBitmapDevice_DEFINED
|
| +
|
|
|