2
* Copyright © 2012 Canonical Ltd.
4
* This program is free software: you can redistribute it and/or modify it
5
* under the terms of the GNU 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 General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
* Authored by: Kevin DuBois <kevin.dubois@canonical.com>
18
#ifndef MIR_TEST_DRAW_GRAPHICS_REGION_FACTORY
19
#define MIR_TEST_DRAW_GRAPHICS_REGION_FACTORY
21
#include "mir/graphics/native_buffer.h"
22
#include "mir_toolkit/mir_client_library.h"
32
class GraphicsRegionFactory
35
virtual ~GraphicsRegionFactory() {}
36
virtual std::shared_ptr<MirGraphicsRegion> graphic_region_from_handle(
37
graphics::NativeBuffer const& native_buffer) = 0;
40
GraphicsRegionFactory() = default;
41
GraphicsRegionFactory(GraphicsRegionFactory const&) = delete;
42
GraphicsRegionFactory& operator=(GraphicsRegionFactory const&) = delete;
45
std::shared_ptr<GraphicsRegionFactory> create_graphics_region_factory();
50
#endif /* MIR_TEST_DRAW_GRAPHICS_REGION_FACTORY */