mirror of
https://github.com/brl/mutter.git
synced 2025-06-14 01:09:30 +00:00
screen-cast/stream: Pass redraw clip to stage watches instead of paint context
The virtual stream source with CURSOR_MODE_EMBEDDED uses META_STAGE_WATCH_AFTER_PAINT as the callback for recording its frame. In this stage of the paint though, there is no ClutterPaintContext anymore (there only is a paint context during the paint, not afterwards). The callback (actors_painted()) tries to get the redraw clip from the paint context, and we end up with a NULL pointer crash. We actually do still have a redraw clip at this point, so because everyone uses the paint context to get the redraw clip anyway, just pass the redraw clip to the stage watches directly. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3283>
This commit is contained in:

committed by
Robert Mader

parent
03a5699abd
commit
c4b9431bb2
@ -270,11 +270,11 @@ typedef struct
|
||||
} CaptureViewData;
|
||||
|
||||
static void
|
||||
on_after_paint (MetaStage *stage,
|
||||
ClutterStageView *view,
|
||||
ClutterPaintContext *paint_context,
|
||||
ClutterFrame *frame,
|
||||
gpointer user_data)
|
||||
on_after_paint (MetaStage *stage,
|
||||
ClutterStageView *view,
|
||||
const cairo_region_t *redraw_clip,
|
||||
ClutterFrame *frame,
|
||||
gpointer user_data)
|
||||
{
|
||||
CaptureViewData *data = user_data;
|
||||
MtkRectangle rect;
|
||||
|
Reference in New Issue
Block a user