mirror of
https://github.com/brl/mutter.git
synced 2024-11-24 17:10:40 -05:00
68f18f1fe9
Still doesn't synchronize with frame drawing, but no point in doing that until gamma is managed by mutter itself and not gnome-settings-daemon. https://gitlab.gnome.org/GNOME/mutter/merge_requests/634
113 lines
3.3 KiB
C
113 lines
3.3 KiB
C
/*
|
|
* Copyright (C) 2019 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_KMS_UPDATE_PRIVATE_H
|
|
#define META_KMS_UPDATE_PRIVATE_H
|
|
|
|
#include <glib.h>
|
|
#include <stdint.h>
|
|
|
|
#include "backends/native/meta-kms-types.h"
|
|
#include "backends/native/meta-kms-update.h"
|
|
|
|
typedef struct _MetaKmsProperty
|
|
{
|
|
uint32_t prop_id;
|
|
uint64_t value;
|
|
} MetaKmsProperty;
|
|
|
|
typedef struct _MetaKmsPlaneAssignment
|
|
{
|
|
MetaKmsUpdate *update;
|
|
MetaKmsCrtc *crtc;
|
|
MetaKmsPlane *plane;
|
|
uint32_t fb_id;
|
|
MetaFixed16Rectangle src_rect;
|
|
MetaFixed16Rectangle dst_rect;
|
|
|
|
GList *plane_properties;
|
|
} MetaKmsPlaneAssignment;
|
|
|
|
typedef struct _MetaKmsModeSet
|
|
{
|
|
MetaKmsCrtc *crtc;
|
|
GList *connectors;
|
|
drmModeModeInfo *drm_mode;
|
|
} MetaKmsModeSet;
|
|
|
|
typedef struct _MetaKmsConnectorProperty
|
|
{
|
|
MetaKmsDevice *device;
|
|
MetaKmsConnector *connector;
|
|
uint32_t prop_id;
|
|
uint64_t value;
|
|
} MetaKmsConnectorProperty;
|
|
|
|
typedef struct _MetaKmsCrtcGamma
|
|
{
|
|
MetaKmsCrtc *crtc;
|
|
int size;
|
|
uint16_t *red;
|
|
uint16_t *green;
|
|
uint16_t *blue;
|
|
} MetaKmsCrtcGamma;
|
|
|
|
typedef struct _MetaKmsPageFlip
|
|
{
|
|
MetaKmsCrtc *crtc;
|
|
const MetaKmsPageFlipFeedback *feedback;
|
|
gpointer user_data;
|
|
MetaKmsCustomPageFlipFunc custom_page_flip_func;
|
|
gpointer custom_page_flip_user_data;
|
|
} MetaKmsPageFlip;
|
|
|
|
void meta_kms_update_seal (MetaKmsUpdate *update);
|
|
|
|
gboolean meta_kms_update_is_sealed (MetaKmsUpdate *update);
|
|
|
|
void meta_kms_update_set_connector_property (MetaKmsUpdate *update,
|
|
MetaKmsConnector *connector,
|
|
uint32_t prop_id,
|
|
uint64_t value);
|
|
|
|
void meta_kms_update_set_crtc_gamma (MetaKmsUpdate *update,
|
|
MetaKmsCrtc *crtc,
|
|
int size,
|
|
const uint16_t *red,
|
|
const uint16_t *green,
|
|
const uint16_t *blue);
|
|
|
|
void meta_kms_plane_assignment_set_plane_property (MetaKmsPlaneAssignment *plane_assignment,
|
|
uint32_t prop_id,
|
|
uint64_t value);
|
|
|
|
GList * meta_kms_update_get_plane_assignments (MetaKmsUpdate *update);
|
|
|
|
GList * meta_kms_update_get_mode_sets (MetaKmsUpdate *update);
|
|
|
|
GList * meta_kms_update_get_page_flips (MetaKmsUpdate *update);
|
|
|
|
GList * meta_kms_update_get_connector_properties (MetaKmsUpdate *update);
|
|
|
|
GList * meta_kms_update_get_crtc_gammas (MetaKmsUpdate *update);
|
|
|
|
gboolean meta_kms_update_has_mode_set (MetaKmsUpdate *update);
|
|
|
|
#endif /* META_KMS_UPDATE_PRIVATE_H */
|