~mir-team/mir/in-process-egl+input-conglomeration

« back to all changes in this revision

Viewing changes to src/server/graphics/gbm/internal_native_display.h

Merged trunk and fixed issues

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
/*
 
3
 * Copyright © 2013 Canonical Ltd.
 
4
 *
 
5
 * This program is free software: you can redistribute it and/or modify it
 
6
 * under the terms of the GNU General Public License version 3,
 
7
 * as published by the Free Software Foundation.
 
8
 *
 
9
 * This program is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 
12
 * GNU General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU General Public License
 
15
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 
16
 *
 
17
 * Authored by: Robert Carr <robert.carr@canonical.com>
 
18
 *              Kevin DuBois <kevin.dubois@canonical.com>
 
19
 */
 
20
 
 
21
#ifndef MIR_GRAPHICS_GBM_INTERNAL_NATIVE_DISPLAY_H_
 
22
#define MIR_GRAPHICS_GBM_INTERNAL_NATIVE_DISPLAY_H_
 
23
 
 
24
#include "mir_toolkit/mesa/native_display.h"
 
25
#include <memory>
 
26
 
 
27
namespace mir
 
28
{
 
29
namespace graphics
 
30
{
 
31
struct PlatformIPCPackage;
 
32
namespace gbm
 
33
{
 
34
 
 
35
class InternalNativeDisplay : public MirMesaEGLNativeDisplay
 
36
{
 
37
public:
 
38
    InternalNativeDisplay(std::shared_ptr<PlatformIPCPackage> const& platform_package);
 
39
 
 
40
    static void native_display_get_platform(MirMesaEGLNativeDisplay* display, MirPlatformPackage* package);
 
41
    static void native_display_surface_get_current_buffer(MirMesaEGLNativeDisplay* /* display */, 
 
42
                                                          MirEGLNativeWindowType surface,
 
43
                                                          MirBufferPackage* package);
 
44
    static void native_display_surface_get_parameters(MirMesaEGLNativeDisplay* /* display  */, 
 
45
                                                      MirEGLNativeWindowType surface,
 
46
                                                      MirSurfaceParameters* parameters);
 
47
    static void native_display_surface_advance_buffer(MirMesaEGLNativeDisplay* /* display */, 
 
48
                                                      MirEGLNativeWindowType surface);
 
49
private:
 
50
    std::shared_ptr<PlatformIPCPackage> platform_package;
 
51
};
 
52
 
 
53
}
 
54
}
 
55
}
 
56
#endif /* MIR_GRAPHICS_GBM_INTERNAL_NATIVE_DISPLAY_H_ */