| 1 |
/* |
| 2 |
* Copyright 2015 Google Inc. |
| 3 |
* |
| 4 |
* Use of this source code is governed by a BSD-style license that can be |
| 5 |
* found in the LICENSE file. |
| 6 |
*/ |
| 7 |
|
| 8 |
#ifndef BRDAllocator_DEFINED |
| 9 |
#define BRDAllocator_DEFINED |
| 10 |
|
| 11 |
#include "include/codec/SkCodec.h" |
| 12 |
#include "include/core/SkBitmap.h" |
| 13 |
|
| 14 |
namespace android { |
| 15 |
namespace skia { |
| 16 |
|
| 17 |
/** |
| 18 |
* Abstract subclass of SkBitmap's allocator. |
| 19 |
* Allows the allocator to indicate if the memory it allocates |
| 20 |
* is zero initialized. |
| 21 |
*/ |
| 22 |
class BRDAllocator : public SkBitmap::Allocator { |
| 23 |
public: |
| 24 |
|
| 25 |
/** |
| 26 |
* Indicates if the memory allocated by this allocator is |
| 27 |
* zero initialized. |
| 28 |
*/ |
| 29 |
virtual SkCodec::ZeroInitialized zeroInit() const = 0; |
| 30 |
}; |
| 31 |
|
| 32 |
} // namespace skia |
| 33 |
} // namespace android |
| 34 |
|
| 35 |
#endif // BRDAllocator_DEFINED |