blob: ae842b74b1746f0179810ef4f87f52dd9f130792 [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
Mike Kleinc0bd9f92019-04-23 12:05:21 -050011#include "include/codec/SkCodec.h"
12#include "include/core/SkBitmap.h"
msarett49115b52015-11-11 06:21:27 -080013
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