2
* Copyright © 2013 Canonical Ltd.
4
* This program is free software: you can redistribute it and/or modify it
5
* under the terms of the GNU Lesser General Public License version 3,
6
* as published by the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Lesser General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
* Kevin DuBois <kevin.dubois@canonical.com>
20
#ifndef MIR_GRAPHICS_ANDROID_GRAPHIC_BUFFER_ALLOCATOR_H_
21
#define MIR_GRAPHICS_ANDROID_GRAPHIC_BUFFER_ALLOCATOR_H_
23
#include "buffer_usage.h"
25
#include "mir/geometry/size.h"
26
#include "mir_toolkit/common.h"
38
class GraphicBufferAllocator
41
virtual std::shared_ptr<graphics::Buffer> alloc_buffer_platform(
42
geometry::Size sz, MirPixelFormat pf, BufferUsage use) = 0;
45
GraphicBufferAllocator() = default;
46
virtual ~GraphicBufferAllocator() = default;
47
GraphicBufferAllocator(const GraphicBufferAllocator&) = delete;
48
GraphicBufferAllocator& operator=(const GraphicBufferAllocator&) = delete;
55
#endif /* MIR_GRAPHICS_ANDROID_GRAPHIC_BUFFER_ALLOCATOR_H_ */