GNOME Bugzilla – Bug 640206
recorder: Force full stage redraws during recording
Last modified: 2011-01-21 18:10:52 UTC
See patch
Created attachment 178974 [details] [review] recorder: Force full stage redraws during recording Partial redraws can result into artifacts in the recording, so disable them while recording.
Review of attachment 178974 [details] [review]: Looks generally good. Of course, it would be *better* if we just updated the part of the scene that changed and used the copy we already scraped into system memory for the rest, but that's tricky with the pointer, and the shell indicator - we'd have to save the piece underneath, so this is fine - not worth getting too fancy with the recorder. Few minor things ::: src/shell-recorder.c @@ +84,3 @@ guint update_memory_used_timeout; guint update_pointer_timeout; + guint repaint_hock_id; propagated typo @@ +241,3 @@ } +/* Used to force full stage redraws during recording to avoid artifacts */ probably should add ": Note that this will cause the stage to be repainted on every animation frame even if the frame wouldn't normally cause any new drawing. @@ +245,3 @@ +recorder_repaint_hock (gpointer data) +{ + ClutterActor *stage = CLUTTER_ACTOR (data); You don't actually need the CLUTTER_ACTOR() cast here since implicit casts from gpointer (void *) are fine in C. I wouldn't consider it bad style to have the cast, but I usually dont' and everywhere else in the file doesn't have it. @@ +1776,3 @@ g_object_unref (recorder); + + if (recorder->repaint_hock_id != 0) This function already called shell_recorder_pause
Created attachment 178980 [details] [review] recorder: Force full stage redraws during recording Partial redraws can result into artifacts in the recording, so disable them while recording. --- *) Fixed typo *) Changed comment to be more verbose *) Removed hunk from _close as it already calls pause
Review of attachment 178980 [details] [review]: Ah, you meant "hook" not "hack" :-)
Attachment 178980 [details] pushed as d6a6e62 - recorder: Force full stage redraws during recording