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
6 changed files with 47 additions and 36 deletions
|
@ -232,13 +232,9 @@ clutter_deprecated_headers = [
|
|||
]
|
||||
|
||||
clutter_backend_sources = []
|
||||
clutter_backend_nonintrospected_sources = [
|
||||
'cogl/clutter-stage-cogl.c',
|
||||
]
|
||||
clutter_backend_nonintrospected_sources = []
|
||||
clutter_backend_headers = []
|
||||
clutter_backend_private_headers = [
|
||||
'cogl/clutter-stage-cogl.h',
|
||||
]
|
||||
clutter_backend_private_headers = []
|
||||
|
||||
if have_x11
|
||||
clutter_x11_sources = [
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#define META_RENDERER_VIEW_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 ())
|
||||
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 <clutter/clutter-backend.h>
|
||||
#include <clutter/clutter-stage.h>
|
||||
|
||||
#include "clutter/clutter-stage-window.h"
|
||||
#include "clutter/clutter.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
@ -62,4 +85,4 @@ void clutter_stage_cogl_add_onscreen_frame_info (ClutterStageCogl *stage_cogl,
|
|||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __CLUTTER_STAGE_COGL_H__ */
|
||||
#endif /* META_STAGE_IMPL_PRIVATE_H */
|
|
@ -25,28 +25,16 @@
|
|||
* Emmanuele Bassi
|
||||
*/
|
||||
|
||||
#include "clutter-build-config.h"
|
||||
#include "config.h"
|
||||
|
||||
#include "clutter-config.h"
|
||||
|
||||
#include "clutter-stage-cogl.h"
|
||||
#include "backends/meta-stage-impl-private.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "clutter-actor-private.h"
|
||||
#include "clutter-backend-private.h"
|
||||
#include "clutter-damage-history.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"
|
||||
#include "clutter/clutter-mutter.h"
|
||||
#include "cogl/cogl.h"
|
||||
#include "core/util-private.h"
|
||||
|
||||
#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 *fb_clip_region;
|
||||
cairo_region_t *swap_region;
|
||||
ClutterDrawDebugFlag paint_debug_flags;
|
||||
float fb_scale;
|
||||
int fb_width, fb_height;
|
||||
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 &&
|
||||
!(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) &&
|
||||
(can_blit_sub_buffer || has_buffer_age) &&
|
||||
!is_full_redraw &&
|
||||
|
@ -518,8 +509,7 @@ clutter_stage_cogl_redraw_view_primary (ClutterStageCogl *stage_cogl,
|
|||
-view_rect.y,
|
||||
fb_scale);
|
||||
|
||||
if (G_UNLIKELY (clutter_paint_debug_flags &
|
||||
CLUTTER_DEBUG_PAINT_DAMAGE_REGION))
|
||||
if (G_UNLIKELY (paint_debug_flags & CLUTTER_DEBUG_PAINT_DAMAGE_REGION))
|
||||
{
|
||||
queued_redraw_clip =
|
||||
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);
|
||||
redraw_clip = cairo_region_create_rectangle (&view_rect);
|
||||
|
||||
if (G_UNLIKELY (clutter_paint_debug_flags &
|
||||
CLUTTER_DEBUG_PAINT_DAMAGE_REGION))
|
||||
if (G_UNLIKELY (paint_debug_flags & CLUTTER_DEBUG_PAINT_DAMAGE_REGION))
|
||||
queued_redraw_clip = cairo_region_reference (redraw_clip);
|
||||
}
|
||||
|
||||
|
@ -594,7 +583,7 @@ clutter_stage_cogl_redraw_view_primary (ClutterStageCogl *stage_cogl,
|
|||
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;
|
||||
|
|
@ -25,6 +25,7 @@
|
|||
#ifndef META_STAGE_NATIVE_H
|
||||
#define META_STAGE_NATIVE_H
|
||||
|
||||
#include "backends/meta-stage-impl-private.h"
|
||||
#include "clutter/clutter-mutter.h"
|
||||
|
||||
#define META_TYPE_STAGE_NATIVE (meta_stage_native_get_type ())
|
||||
|
|
|
@ -233,6 +233,8 @@ mutter_sources = [
|
|||
'backends/meta-settings.c',
|
||||
'backends/meta-settings-private.h',
|
||||
'backends/meta-stage.c',
|
||||
'backends/meta-stage-impl.c',
|
||||
'backends/meta-stage-impl-private.h',
|
||||
'backends/meta-stage-private.h',
|
||||
'backends/meta-viewport-info.c',
|
||||
'backends/meta-viewport-info.h',
|
||||
|
|
Loading…
Reference in a new issue