blob: 3ca30c9b4119a1eb4e6b5c712d974a20f5de0bb6 [file] [log] [blame]
msarett49115b52015-11-11 06:21:27 -08001/*
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
scroggo95105932015-11-11 22:54:24 -08008#ifndef SkBRDAllocator_DEFINED
9#define SkBRDAllocator_DEFINED
10
msarett49115b52015-11-11 06:21:27 -080011#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 */
19class SkBRDAllocator : public SkBitmap::Allocator {
20public:
21
22 /**
23 * Indicates if the memory allocated by this allocator is
24 * zero initialized.
25 */
26 virtual SkCodec::ZeroInitialized zeroInit() const = 0;
27};
scroggo95105932015-11-11 22:54:24 -080028
msarett506e19a2015-11-13 06:11:09 -080029#endif // SkBRDAllocator_DEFINED