mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
clutter: Add a flag to disable heuristic max render time
Debugging purposes: allows to check if frame drops are caused by heuristic max render time or if they are there even with the old behavior. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1762>
This commit is contained in:
parent
592fbee065
commit
565e34b4d2
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include "clutter/clutter-frame-clock.h"
|
#include "clutter/clutter-frame-clock.h"
|
||||||
|
|
||||||
|
#include "clutter/clutter-debug.h"
|
||||||
#include "clutter/clutter-main.h"
|
#include "clutter/clutter-main.h"
|
||||||
#include "clutter/clutter-private.h"
|
#include "clutter/clutter-private.h"
|
||||||
#include "clutter/clutter-timeline-private.h"
|
#include "clutter/clutter-timeline-private.h"
|
||||||
@ -307,7 +308,9 @@ clutter_frame_clock_compute_max_render_time_us (ClutterFrameClock *frame_clock)
|
|||||||
refresh_interval_us =
|
refresh_interval_us =
|
||||||
(int64_t) (0.5 + G_USEC_PER_SEC / frame_clock->refresh_rate);
|
(int64_t) (0.5 + G_USEC_PER_SEC / frame_clock->refresh_rate);
|
||||||
|
|
||||||
if (!frame_clock->got_measurements_last_frame)
|
if (!frame_clock->got_measurements_last_frame ||
|
||||||
|
G_UNLIKELY (clutter_paint_debug_flags &
|
||||||
|
CLUTTER_DEBUG_DISABLE_DYNAMIC_MAX_RENDER_TIME))
|
||||||
return refresh_interval_us - SYNC_DELAY_FALLBACK_US;
|
return refresh_interval_us - SYNC_DELAY_FALLBACK_US;
|
||||||
|
|
||||||
for (i = 0; i < ESTIMATE_QUEUE_LENGTH; ++i)
|
for (i = 0; i < ESTIMATE_QUEUE_LENGTH; ++i)
|
||||||
|
@ -130,6 +130,7 @@ static const GDebugKey clutter_paint_debug_keys[] = {
|
|||||||
{ "continuous-redraw", CLUTTER_DEBUG_CONTINUOUS_REDRAW },
|
{ "continuous-redraw", CLUTTER_DEBUG_CONTINUOUS_REDRAW },
|
||||||
{ "paint-deform-tiles", CLUTTER_DEBUG_PAINT_DEFORM_TILES },
|
{ "paint-deform-tiles", CLUTTER_DEBUG_PAINT_DEFORM_TILES },
|
||||||
{ "damage-region", CLUTTER_DEBUG_PAINT_DAMAGE_REGION },
|
{ "damage-region", CLUTTER_DEBUG_PAINT_DAMAGE_REGION },
|
||||||
|
{ "disable-dynamic-max-render-time", CLUTTER_DEBUG_DISABLE_DYNAMIC_MAX_RENDER_TIME },
|
||||||
};
|
};
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
|
@ -63,15 +63,16 @@ typedef enum
|
|||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
CLUTTER_DEBUG_DISABLE_SWAP_EVENTS = 1 << 0,
|
CLUTTER_DEBUG_DISABLE_SWAP_EVENTS = 1 << 0,
|
||||||
CLUTTER_DEBUG_DISABLE_CLIPPED_REDRAWS = 1 << 1,
|
CLUTTER_DEBUG_DISABLE_CLIPPED_REDRAWS = 1 << 1,
|
||||||
CLUTTER_DEBUG_REDRAWS = 1 << 2,
|
CLUTTER_DEBUG_REDRAWS = 1 << 2,
|
||||||
CLUTTER_DEBUG_PAINT_VOLUMES = 1 << 3,
|
CLUTTER_DEBUG_PAINT_VOLUMES = 1 << 3,
|
||||||
CLUTTER_DEBUG_DISABLE_CULLING = 1 << 4,
|
CLUTTER_DEBUG_DISABLE_CULLING = 1 << 4,
|
||||||
CLUTTER_DEBUG_DISABLE_OFFSCREEN_REDIRECT = 1 << 5,
|
CLUTTER_DEBUG_DISABLE_OFFSCREEN_REDIRECT = 1 << 5,
|
||||||
CLUTTER_DEBUG_CONTINUOUS_REDRAW = 1 << 6,
|
CLUTTER_DEBUG_CONTINUOUS_REDRAW = 1 << 6,
|
||||||
CLUTTER_DEBUG_PAINT_DEFORM_TILES = 1 << 7,
|
CLUTTER_DEBUG_PAINT_DEFORM_TILES = 1 << 7,
|
||||||
CLUTTER_DEBUG_PAINT_DAMAGE_REGION = 1 << 8,
|
CLUTTER_DEBUG_PAINT_DAMAGE_REGION = 1 << 8,
|
||||||
|
CLUTTER_DEBUG_DISABLE_DYNAMIC_MAX_RENDER_TIME = 1 << 9,
|
||||||
} ClutterDrawDebugFlag;
|
} ClutterDrawDebugFlag;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user