2
* Copyright © 2017 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/>.
16
* Authored by: Kevin DuBois <kevin.dubois@canonical.com>
19
#ifndef MIR_GRAPHICS_MESA_DRM_NATIVE_PLATFORM_H_
20
#define MIR_GRAPHICS_MESA_DRM_NATIVE_PLATFORM_H_
22
#include "mir/graphics/platform.h"
23
#include "mir/graphics/platform_authentication.h"
36
class DRMNativePlatformAuthFactory : public graphics::NativeDisplayPlatform,
37
public graphics::PlatformAuthenticationFactory
40
DRMNativePlatformAuthFactory(helpers::DRMHelper&);
41
UniqueModulePtr<PlatformAuthentication> create_platform_authentication() override;
43
helpers::DRMHelper& drm;
46
class DRMNativePlatform : public graphics::PlatformAuthentication
49
DRMNativePlatform(helpers::DRMHelper&);
50
mir::optional_value<std::shared_ptr<graphics::MesaAuthExtension>> auth_extension() override;
51
mir::optional_value<std::shared_ptr<graphics::SetGbmExtension>> set_gbm_extension() override;
52
PlatformOperationMessage platform_operation(
53
unsigned int, PlatformOperationMessage const&) override;
54
mir::optional_value<mir::Fd> drm_fd() override;
56
helpers::DRMHelper& drm;
62
#endif /* MIR_GRAPHICS_MESA_DRM_NATIVE_PLATFORM_H_ */