[mutter/wip/carlosg/backendless-clutter: 7/16] clutter: Move ClutterStageCogl[View] code to src/backends
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/backendless-clutter: 7/16] clutter: Move ClutterStageCogl[View] code to src/backends
- Date: Tue, 11 May 2021 09:21:25 +0000 (UTC)
commit c43f1a6df01521000a9ea12c3f8eae54bdfb43ba
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.
clutter/clutter/meson.build | 8 ++---
src/backends/meta-renderer-view.h | 2 +-
.../backends/meta-stage-impl-private.h | 5 +---
.../backends/meta-stage-impl.c | 35 ++++++++--------------
src/backends/native/meta-stage-native.h | 1 +
src/meson.build | 2 ++
6 files changed, 19 insertions(+), 34 deletions(-)
---
diff --git a/clutter/clutter/meson.build b/clutter/clutter/meson.build
index a3bbfc1134..304f738038 100644
--- a/clutter/clutter/meson.build
+++ b/clutter/clutter/meson.build
@@ -230,13 +230,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 94%
rename from clutter/clutter/cogl/clutter-stage-cogl.h
rename to src/backends/meta-stage-impl-private.h
index 11aeaefe12..0a1359c9af 100644
--- a/clutter/clutter/cogl/clutter-stage-cogl.h
+++ b/src/backends/meta-stage-impl-private.h
@@ -2,10 +2,7 @@
#define __CLUTTER_STAGE_COGL_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
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 5b5add993a..96f2790d8e 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 "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
@@ -462,6 +450,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;
@@ -499,9 +488,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 &&
@@ -516,8 +507,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,
@@ -536,8 +526,7 @@ clutter_stage_cogl_redraw_view_primary (ClutterStageCogl *stage_cogl,
};
fb_clip_region = cairo_region_create_rectangle (&fb_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);
g_clear_pointer (&redraw_clip, cairo_region_destroy);
@@ -592,7 +581,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 284bdf5220..28250db921 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]