summaryrefslogtreecommitdiff
path: root/src/backends/native/meta-onscreen-native.h
blob: 10a3a610f905663b04c75785bb00527f84e67ff1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/*
 * Copyright (C) 2016-2020 Red Hat
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 * 02111-1307, USA.
 *
 */

#ifndef META_ONSCREEN_NATIVE_H
#define META_ONSCREEN_NATIVE_H

#include <glib.h>

#include "backends/meta-backend-types.h"
#include "backends/native/meta-backend-native-types.h"
#include "clutter/clutter.h"
#include "cogl/cogl.h"

gboolean
meta_renderer_native_init_onscreen (CoglOnscreen *onscreen,
                                    GError      **error);

void meta_renderer_native_release_onscreen (CoglOnscreen *onscreen);

gboolean meta_onscreen_native_allocate (CoglOnscreen *onscreen,
                                        GError      **error);

void meta_onscreen_native_swap_buffers_with_damage (CoglOnscreen  *onscreen,
                                                    const int     *rectangles,
                                                    int            n_rectangles,
                                                    CoglFrameInfo *frame_info,
                                                    gpointer       user_data);

gboolean meta_onscreen_native_direct_scanout (CoglOnscreen   *onscreen,
                                              CoglScanout    *scanout,
                                              CoglFrameInfo  *frame_info,
                                              gpointer        user_data,
                                              GError        **error);

void meta_onscreen_native_finish_frame (CoglOnscreen *onscreen,
                                        ClutterFrame *frame);

void meta_onscreen_native_dummy_power_save_page_flip (CoglOnscreen *onscreen);

void meta_onscreen_native_set_view (CoglOnscreen     *onscreen,
                                    MetaRendererView *view);

CoglOnscreen * meta_onscreen_native_new (MetaRendererNative  *renderer_native,
                                         MetaGpuKms          *render_gpu,
                                         MetaOutput          *output,
                                         MetaCrtc            *crtc,
                                         CoglContext         *cogl_context,
                                         int                  width,
                                         int                  height,
                                         GError             **error);

#endif /* META_ONSCREEN_NATIVE_H */