mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
clutter: Move ClutterStageCogl[View] code to src/backends
This is now MetaStageImpl in backend code. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1862>
This commit is contained in:
parent
0ac257212e
commit
8f839b2f9c
@ -232,13 +232,9 @@ clutter_deprecated_headers = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
clutter_backend_sources = []
|
clutter_backend_sources = []
|
||||||
clutter_backend_nonintrospected_sources = [
|
clutter_backend_nonintrospected_sources = []
|
||||||
'cogl/clutter-stage-cogl.c',
|
|
||||||
]
|
|
||||||
clutter_backend_headers = []
|
clutter_backend_headers = []
|
||||||
clutter_backend_private_headers = [
|
clutter_backend_private_headers = []
|
||||||
'cogl/clutter-stage-cogl.h',
|
|
||||||
]
|
|
||||||
|
|
||||||
if have_x11
|
if have_x11
|
||||||
clutter_x11_sources = [
|
clutter_x11_sources = [
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#define META_RENDERER_VIEW_H
|
#define META_RENDERER_VIEW_H
|
||||||
|
|
||||||
#include "backends/meta-monitor-manager-private.h"
|
#include "backends/meta-monitor-manager-private.h"
|
||||||
#include "clutter/clutter-mutter.h"
|
#include "backends/meta-stage-impl-private.h"
|
||||||
|
|
||||||
#define META_TYPE_RENDERER_VIEW (meta_renderer_view_get_type ())
|
#define META_TYPE_RENDERER_VIEW (meta_renderer_view_get_type ())
|
||||||
G_DECLARE_FINAL_TYPE (MetaRendererView, meta_renderer_view,
|
G_DECLARE_FINAL_TYPE (MetaRendererView, meta_renderer_view,
|
||||||
|
@ -1,11 +1,34 @@
|
|||||||
#ifndef __CLUTTER_STAGE_COGL_H__
|
/*
|
||||||
#define __CLUTTER_STAGE_COGL_H__
|
* Copyright (C) 2007,2008,2009,2010,2011 Intel Corporation.
|
||||||
|
* Copyright (C) 2021 Red Hat
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* Written by:
|
||||||
|
* Matthew Allum
|
||||||
|
* Robert Bragg
|
||||||
|
* Neil Roberts
|
||||||
|
* Emmanuele Bassi
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef META_STAGE_IMPL_PRIVATE_H
|
||||||
|
#define META_STAGE_IMPL_PRIVATE_H
|
||||||
|
|
||||||
#include <cairo.h>
|
#include <cairo.h>
|
||||||
#include <clutter/clutter-backend.h>
|
|
||||||
#include <clutter/clutter-stage.h>
|
|
||||||
|
|
||||||
#include "clutter/clutter-stage-window.h"
|
#include "clutter/clutter.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
@ -62,4 +85,4 @@ void clutter_stage_cogl_add_onscreen_frame_info (ClutterStageCogl *stage_cogl,
|
|||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __CLUTTER_STAGE_COGL_H__ */
|
#endif /* META_STAGE_IMPL_PRIVATE_H */
|
@ -25,28 +25,16 @@
|
|||||||
* Emmanuele Bassi
|
* Emmanuele Bassi
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "clutter-build-config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include "clutter-config.h"
|
#include "backends/meta-stage-impl-private.h"
|
||||||
|
|
||||||
#include "clutter-stage-cogl.h"
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include "clutter-actor-private.h"
|
#include "clutter/clutter-mutter.h"
|
||||||
#include "clutter-backend-private.h"
|
#include "cogl/cogl.h"
|
||||||
#include "clutter-damage-history.h"
|
#include "core/util-private.h"
|
||||||
#include "clutter-debug.h"
|
|
||||||
#include "clutter-event.h"
|
|
||||||
#include "clutter-enum-types.h"
|
|
||||||
#include "clutter-feature.h"
|
|
||||||
#include "clutter-frame.h"
|
|
||||||
#include "clutter-main.h"
|
|
||||||
#include "clutter-private.h"
|
|
||||||
#include "clutter-stage-private.h"
|
|
||||||
#include "clutter-stage-view-private.h"
|
|
||||||
#include "cogl.h"
|
|
||||||
|
|
||||||
#define MAX_STACK_RECTS 256
|
#define MAX_STACK_RECTS 256
|
||||||
|
|
||||||
@ -464,6 +452,7 @@ clutter_stage_cogl_redraw_view_primary (ClutterStageCogl *stage_cogl,
|
|||||||
cairo_region_t *queued_redraw_clip = NULL;
|
cairo_region_t *queued_redraw_clip = NULL;
|
||||||
cairo_region_t *fb_clip_region;
|
cairo_region_t *fb_clip_region;
|
||||||
cairo_region_t *swap_region;
|
cairo_region_t *swap_region;
|
||||||
|
ClutterDrawDebugFlag paint_debug_flags;
|
||||||
float fb_scale;
|
float fb_scale;
|
||||||
int fb_width, fb_height;
|
int fb_width, fb_height;
|
||||||
int buffer_age = 0;
|
int buffer_age = 0;
|
||||||
@ -501,9 +490,11 @@ clutter_stage_cogl_redraw_view_primary (ClutterStageCogl *stage_cogl,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
meta_get_clutter_debug_flags (NULL, &paint_debug_flags, NULL);
|
||||||
|
|
||||||
use_clipped_redraw =
|
use_clipped_redraw =
|
||||||
use_clipped_redraw &&
|
use_clipped_redraw &&
|
||||||
!(clutter_paint_debug_flags & CLUTTER_DEBUG_DISABLE_CLIPPED_REDRAWS) &&
|
!(paint_debug_flags & CLUTTER_DEBUG_DISABLE_CLIPPED_REDRAWS) &&
|
||||||
_clutter_stage_window_can_clip_redraws (stage_window) &&
|
_clutter_stage_window_can_clip_redraws (stage_window) &&
|
||||||
(can_blit_sub_buffer || has_buffer_age) &&
|
(can_blit_sub_buffer || has_buffer_age) &&
|
||||||
!is_full_redraw &&
|
!is_full_redraw &&
|
||||||
@ -518,8 +509,7 @@ clutter_stage_cogl_redraw_view_primary (ClutterStageCogl *stage_cogl,
|
|||||||
-view_rect.y,
|
-view_rect.y,
|
||||||
fb_scale);
|
fb_scale);
|
||||||
|
|
||||||
if (G_UNLIKELY (clutter_paint_debug_flags &
|
if (G_UNLIKELY (paint_debug_flags & CLUTTER_DEBUG_PAINT_DAMAGE_REGION))
|
||||||
CLUTTER_DEBUG_PAINT_DAMAGE_REGION))
|
|
||||||
{
|
{
|
||||||
queued_redraw_clip =
|
queued_redraw_clip =
|
||||||
scale_offset_and_clamp_region (fb_clip_region,
|
scale_offset_and_clamp_region (fb_clip_region,
|
||||||
@ -541,8 +531,7 @@ clutter_stage_cogl_redraw_view_primary (ClutterStageCogl *stage_cogl,
|
|||||||
g_clear_pointer (&redraw_clip, cairo_region_destroy);
|
g_clear_pointer (&redraw_clip, cairo_region_destroy);
|
||||||
redraw_clip = cairo_region_create_rectangle (&view_rect);
|
redraw_clip = cairo_region_create_rectangle (&view_rect);
|
||||||
|
|
||||||
if (G_UNLIKELY (clutter_paint_debug_flags &
|
if (G_UNLIKELY (paint_debug_flags & CLUTTER_DEBUG_PAINT_DAMAGE_REGION))
|
||||||
CLUTTER_DEBUG_PAINT_DAMAGE_REGION))
|
|
||||||
queued_redraw_clip = cairo_region_reference (redraw_clip);
|
queued_redraw_clip = cairo_region_reference (redraw_clip);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -594,7 +583,7 @@ clutter_stage_cogl_redraw_view_primary (ClutterStageCogl *stage_cogl,
|
|||||||
view_rect.y);
|
view_rect.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (clutter_paint_debug_flags & CLUTTER_DEBUG_PAINT_DAMAGE_REGION)
|
if (paint_debug_flags & CLUTTER_DEBUG_PAINT_DAMAGE_REGION)
|
||||||
{
|
{
|
||||||
cairo_region_t *debug_redraw_clip;
|
cairo_region_t *debug_redraw_clip;
|
||||||
|
|
@ -25,6 +25,7 @@
|
|||||||
#ifndef META_STAGE_NATIVE_H
|
#ifndef META_STAGE_NATIVE_H
|
||||||
#define META_STAGE_NATIVE_H
|
#define META_STAGE_NATIVE_H
|
||||||
|
|
||||||
|
#include "backends/meta-stage-impl-private.h"
|
||||||
#include "clutter/clutter-mutter.h"
|
#include "clutter/clutter-mutter.h"
|
||||||
|
|
||||||
#define META_TYPE_STAGE_NATIVE (meta_stage_native_get_type ())
|
#define META_TYPE_STAGE_NATIVE (meta_stage_native_get_type ())
|
||||||
|
@ -233,6 +233,8 @@ mutter_sources = [
|
|||||||
'backends/meta-settings.c',
|
'backends/meta-settings.c',
|
||||||
'backends/meta-settings-private.h',
|
'backends/meta-settings-private.h',
|
||||||
'backends/meta-stage.c',
|
'backends/meta-stage.c',
|
||||||
|
'backends/meta-stage-impl.c',
|
||||||
|
'backends/meta-stage-impl-private.h',
|
||||||
'backends/meta-stage-private.h',
|
'backends/meta-stage-private.h',
|
||||||
'backends/meta-viewport-info.c',
|
'backends/meta-viewport-info.c',
|
||||||
'backends/meta-viewport-info.h',
|
'backends/meta-viewport-info.h',
|
||||||
|
Loading…
Reference in New Issue
Block a user