[mutter/wip/carlosg/backendless-clutter: 13/21] clutter: Move ClutterStageCogl[View] code to src/backends
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/backendless-clutter: 13/21] clutter: Move ClutterStageCogl[View] code to src/backends
- Date: Fri, 16 Jul 2021 17:15:10 +0000 (UTC)
commit c85011a5d0bf6d5e9a66863ef3818b294b4d103e
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon May 10 13:27:39 2021 +0200
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>
clutter/clutter/meson.build | 8 ++---
src/backends/meta-renderer-view.h | 2 +-
.../backends/meta-stage-impl-private.h | 35 ++++++++++++++++++----
.../backends/meta-stage-impl.c | 35 ++++++++--------------
src/backends/native/meta-stage-native.h | 1 +
src/meson.build | 2 ++
6 files changed, 47 insertions(+), 36 deletions(-)
---
diff --git a/clutter/clutter/meson.build b/clutter/clutter/meson.build
index ad5895fae5..35a0afefc0 100644
--- a/clutter/clutter/meson.build
+++ b/clutter/clutter/meson.build
@@ -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 = [
diff --git a/src/backends/meta-renderer-view.h b/src/backends/meta-renderer-view.h
index 0e19dc2f27..668b4e7e8d 100644
--- a/src/backends/meta-renderer-view.h
+++ b/src/backends/meta-renderer-view.h
@@ -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,
diff --git a/clutter/clutter/cogl/clutter-stage-cogl.h b/src/backends/meta-stage-impl-private.h
similarity index 66%
rename from clutter/clutter/cogl/clutter-stage-cogl.h
rename to src/backends/meta-stage-impl-private.h
index 11aeaefe12..4b01fc1c23 100644
--- a/clutter/clutter/cogl/clutter-stage-cogl.h
+++ b/src/backends/meta-stage-impl-private.h
@@ -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 */
diff --git a/clutter/clutter/cogl/clutter-stage-cogl.c b/src/backends/meta-stage-impl.c
similarity index 97%
rename from clutter/clutter/cogl/clutter-stage-cogl.c
rename to src/backends/meta-stage-impl.c
index 6c4ddbfc0e..950710d07a 100644
--- a/clutter/clutter/cogl/clutter-stage-cogl.c
+++ b/src/backends/meta-stage-impl.c
@@ -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;
diff --git a/src/backends/native/meta-stage-native.h b/src/backends/native/meta-stage-native.h
index f33743f3e2..37fbc100b4 100644
--- a/src/backends/native/meta-stage-native.h
+++ b/src/backends/native/meta-stage-native.h
@@ -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 ())
diff --git a/src/meson.build b/src/meson.build
index 36a339960f..9968a277f6 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -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',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]