diff options
Diffstat (limited to 'include/android/SkBRDAllocator.h')
-rw-r--r-- | include/android/SkBRDAllocator.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/android/SkBRDAllocator.h b/include/android/SkBRDAllocator.h new file mode 100644 index 0000000000..3ca30c9b41 --- /dev/null +++ b/include/android/SkBRDAllocator.h @@ -0,0 +1,29 @@ +/* + * Copyright 2015 Google Inc. + * + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef SkBRDAllocator_DEFINED +#define SkBRDAllocator_DEFINED + +#include "SkBitmap.h" +#include "SkCodec.h" + +/** + * Abstract subclass of SkBitmap's allocator. + * Allows the allocator to indicate if the memory it allocates + * is zero initialized. + */ +class SkBRDAllocator : public SkBitmap::Allocator { +public: + + /** + * Indicates if the memory allocated by this allocator is + * zero initialized. + */ + virtual SkCodec::ZeroInitialized zeroInit() const = 0; +}; + +#endif // SkBRDAllocator_DEFINED |