[gtk: 22/88] gdk/frame-clock: Remove the newly added 'compute-size' phase
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk: 22/88] gdk/frame-clock: Remove the newly added 'compute-size' phase
- Date: Tue, 8 Dec 2020 15:38:40 +0000 (UTC)
commit 4779e4e488ef3b3d0ab0937e9da518ab8e7f45b3
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Tue Nov 24 23:18:42 2020 +0100
gdk/frame-clock: Remove the newly added 'compute-size' phase
What was previously done in the layout phase is now done in response to
a GdkSurface signal, which means size computation can happen on layout.
gdk/gdkframeclock.c | 28 ----------------------------
gdk/gdkframeclock.h | 12 +++++-------
gdk/gdkframeclockidle.c | 12 ------------
gdk/gdkframeclockprivate.h | 1 -
gdk/gdksurface.c | 19 -------------------
5 files changed, 5 insertions(+), 67 deletions(-)
---
diff --git a/gdk/gdkframeclock.c b/gdk/gdkframeclock.c
index 15efa30afe..5e4492744c 100644
--- a/gdk/gdkframeclock.c
+++ b/gdk/gdkframeclock.c
@@ -78,7 +78,6 @@ enum {
FLUSH_EVENTS,
BEFORE_PAINT,
UPDATE,
- COMPUTE_SIZE,
LAYOUT,
PAINT,
AFTER_PAINT,
@@ -185,21 +184,6 @@ gdk_frame_clock_class_init (GdkFrameClockClass *klass)
NULL, NULL, NULL,
G_TYPE_NONE, 0);
- /**
- * GdkFrameClock::compute-size:
- * @clock: the frame clock emitting the signal
- *
- * This signal is used for computing the size of the underlying
- * #GdkSurface. Applications should generally not handle this signal.
- */
- signals[COMPUTE_SIZE] =
- g_signal_new (g_intern_static_string ("compute-size"),
- GDK_TYPE_FRAME_CLOCK,
- G_SIGNAL_RUN_LAST,
- 0,
- NULL, NULL, NULL,
- G_TYPE_NONE, 0);
-
/**
* GdkFrameClock::layout:
* @clock: the frame clock emitting the signal
@@ -698,18 +682,6 @@ _gdk_frame_clock_emit_update (GdkFrameClock *frame_clock)
gdk_profiler_end_mark (before, "frameclock update", NULL);
}
-void
-_gdk_frame_clock_emit_compute_size (GdkFrameClock *frame_clock)
-{
- gint64 before G_GNUC_UNUSED;
-
- before = GDK_PROFILER_CURRENT_TIME;
-
- g_signal_emit (frame_clock, signals[COMPUTE_SIZE], 0);
-
- gdk_profiler_end_mark (before, "frameclock compute size", NULL);
-}
-
void
_gdk_frame_clock_emit_layout (GdkFrameClock *frame_clock)
{
diff --git a/gdk/gdkframeclock.h b/gdk/gdkframeclock.h
index dfe0c23747..f50512c150 100644
--- a/gdk/gdkframeclock.h
+++ b/gdk/gdkframeclock.h
@@ -50,8 +50,7 @@ typedef struct _GdkFrameClockClass GdkFrameClockClass;
* @GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS: corresponds to GdkFrameClock::flush-events. Should not be handled by
applications.
* @GDK_FRAME_CLOCK_PHASE_BEFORE_PAINT: corresponds to GdkFrameClock::before-paint. Should not be handled by
applications.
* @GDK_FRAME_CLOCK_PHASE_UPDATE: corresponds to GdkFrameClock::update.
- * @GDK_FRAME_CLOCK_PHASE_COMPUTE_SIZE: corresponds to GdkFrameClock::compute-size. Should not be handled by
applications.
- * @GDK_FRAME_CLOCK_PHASE_LAYOUT: corresponds to GdkFrameClock::layout.
+ * @GDK_FRAME_CLOCK_PHASE_LAYOUT: corresponds to GdkFrameClock::layout. Should not be handled by
applicatiosn.
* @GDK_FRAME_CLOCK_PHASE_PAINT: corresponds to GdkFrameClock::paint.
* @GDK_FRAME_CLOCK_PHASE_RESUME_EVENTS: corresponds to GdkFrameClock::resume-events. Should not be handled
by applications.
* @GDK_FRAME_CLOCK_PHASE_AFTER_PAINT: corresponds to GdkFrameClock::after-paint. Should not be handled by
applications.
@@ -65,11 +64,10 @@ typedef enum {
GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS = 1 << 0,
GDK_FRAME_CLOCK_PHASE_BEFORE_PAINT = 1 << 1,
GDK_FRAME_CLOCK_PHASE_UPDATE = 1 << 2,
- GDK_FRAME_CLOCK_PHASE_COMPUTE_SIZE = 1 << 3,
- GDK_FRAME_CLOCK_PHASE_LAYOUT = 1 << 4,
- GDK_FRAME_CLOCK_PHASE_PAINT = 1 << 5,
- GDK_FRAME_CLOCK_PHASE_RESUME_EVENTS = 1 << 6,
- GDK_FRAME_CLOCK_PHASE_AFTER_PAINT = 1 << 7
+ GDK_FRAME_CLOCK_PHASE_LAYOUT = 1 << 3,
+ GDK_FRAME_CLOCK_PHASE_PAINT = 1 << 4,
+ GDK_FRAME_CLOCK_PHASE_RESUME_EVENTS = 1 << 5,
+ GDK_FRAME_CLOCK_PHASE_AFTER_PAINT = 1 << 6
} GdkFrameClockPhase;
GDK_AVAILABLE_IN_ALL
diff --git a/gdk/gdkframeclockidle.c b/gdk/gdkframeclockidle.c
index ac69aba627..4870a110a6 100644
--- a/gdk/gdkframeclockidle.c
+++ b/gdk/gdkframeclockidle.c
@@ -552,18 +552,6 @@ gdk_frame_clock_paint_idle (void *data)
}
G_GNUC_FALLTHROUGH;
- case GDK_FRAME_CLOCK_PHASE_COMPUTE_SIZE:
- if (priv->freeze_count == 0)
- {
- priv->phase = GDK_FRAME_CLOCK_PHASE_COMPUTE_SIZE;
- if ((priv->requested & GDK_FRAME_CLOCK_PHASE_COMPUTE_SIZE) != 0)
- {
- priv->requested &= ~GDK_FRAME_CLOCK_PHASE_COMPUTE_SIZE;
- _gdk_frame_clock_emit_compute_size (clock);
- }
- }
- G_GNUC_FALLTHROUGH;
-
case GDK_FRAME_CLOCK_PHASE_LAYOUT:
if (priv->freeze_count == 0)
{
diff --git a/gdk/gdkframeclockprivate.h b/gdk/gdkframeclockprivate.h
index a68bc85da8..010aa4564f 100644
--- a/gdk/gdkframeclockprivate.h
+++ b/gdk/gdkframeclockprivate.h
@@ -122,7 +122,6 @@ gboolean _gdk_frame_timings_steal (GdkFrameTimings *timings,
void _gdk_frame_clock_emit_flush_events (GdkFrameClock *frame_clock);
void _gdk_frame_clock_emit_before_paint (GdkFrameClock *frame_clock);
void _gdk_frame_clock_emit_update (GdkFrameClock *frame_clock);
-void _gdk_frame_clock_emit_compute_size (GdkFrameClock *frame_clock);
void _gdk_frame_clock_emit_layout (GdkFrameClock *frame_clock);
void _gdk_frame_clock_emit_paint (GdkFrameClock *frame_clock);
void _gdk_frame_clock_emit_after_paint (GdkFrameClock *frame_clock);
diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c
index ae3dc94b66..05e52dbf7d 100644
--- a/gdk/gdksurface.c
+++ b/gdk/gdksurface.c
@@ -1311,25 +1311,6 @@ gdk_surface_emit_size_changed (GdkSurface *surface,
g_signal_emit (surface, signals[SIZE_CHANGED], 0, width, height);
}
-void
-gdk_surface_request_compute_size (GdkSurface *surface)
-{
- GdkFrameClock *frame_clock;
-
- if (surface->update_freeze_count ||
- gdk_surface_is_toplevel_frozen (surface))
- {
- surface->pending_phases |= GDK_FRAME_CLOCK_PHASE_COMPUTE_SIZE;
- return;
- }
-
- frame_clock = gdk_surface_get_frame_clock (surface);
- g_return_if_fail (frame_clock);
-
- gdk_frame_clock_request_phase (frame_clock,
- GDK_FRAME_CLOCK_PHASE_COMPUTE_SIZE);
-}
-
static void
gdk_surface_process_updates_internal (GdkSurface *surface)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]