msarett | 49115b5 | 2015-11-11 06:21:27 -0800 | [diff] [blame] | 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 | |
scroggo | 9510593 | 2015-11-11 22:54:24 -0800 | [diff] [blame] | 8 | #ifndef SkBRDAllocator_DEFINED |
| 9 | #define SkBRDAllocator_DEFINED |
| 10 | |
msarett | 49115b5 | 2015-11-11 06:21:27 -0800 | [diff] [blame] | 11 | #include "SkBitmap.h" |
| 12 | #include "SkCodec.h" |
| 13 | |
| 14 | /** |
| 15 | * Abstract subclass of SkBitmap's allocator. |
| 16 | * Allows the allocator to indicate if the memory it allocates |
| 17 | * is zero initialized. |
| 18 | */ |
| 19 | class SkBRDAllocator : public SkBitmap::Allocator { |
| 20 | public: |
| 21 | |
| 22 | /** |
| 23 | * Indicates if the memory allocated by this allocator is |
| 24 | * zero initialized. |
| 25 | */ |
| 26 | virtual SkCodec::ZeroInitialized zeroInit() const = 0; |
| 27 | }; |
scroggo | 9510593 | 2015-11-11 22:54:24 -0800 | [diff] [blame] | 28 | |
msarett | 506e19a | 2015-11-13 06:11:09 -0800 | [diff] [blame] | 29 | #endif // SkBRDAllocator_DEFINED |