After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 640206 - recorder: Force full stage redraws during recording
recorder: Force full stage redraws during recording
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-01-21 17:16 UTC by drago01
Modified: 2011-01-21 18:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
recorder: Force full stage redraws during recording (2.30 KB, patch)
2011-01-21 17:17 UTC, drago01
needs-work Details | Review
recorder: Force full stage redraws during recording (2.12 KB, patch)
2011-01-21 17:57 UTC, drago01
committed Details | Review

Description drago01 2011-01-21 17:16:45 UTC
See patch
Comment 1 drago01 2011-01-21 17:17:11 UTC
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.
Comment 2 Owen Taylor 2011-01-21 17:48:58 UTC
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
Comment 3 drago01 2011-01-21 17:57:14 UTC
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
Comment 4 Owen Taylor 2011-01-21 18:01:50 UTC
Review of attachment 178980 [details] [review]:

Ah, you meant "hook" not "hack" :-)
Comment 5 drago01 2011-01-21 18:10:49 UTC
Attachment 178980 [details] pushed as d6a6e62 - recorder: Force full stage redraws during recording