Merge lp:~sil2100/compiz-core/cherry_3246 into lp:compiz-core

Proposed by Łukasz Zemczak
Status: Merged
Approved by: Łukasz Zemczak
Approved revision: 3105
Merged at revision: 3108
Proposed branch: lp:~sil2100/compiz-core/cherry_3246
Merge into: lp:compiz-core
Diff against target: 45 lines (+6/-4)
2 files modified
plugins/composite/composite.xml.in (+1/-1)
plugins/composite/src/screen.cpp (+5/-3)
To merge this branch: bzr merge lp:~sil2100/compiz-core/cherry_3246
Reviewer Review Type Date Requested Status
Daniel van Vugt Approve
Review via email: mp+111218@code.launchpad.net

Commit message

Cherry-picked from compiz trunk (rev 3246):
Fall back to a refresh rate that is more likely to look correct; 60Hz. (LP: #1009338)

The fallback is still only used if sync-to-vblank is not available (disabled in the driver) AND if xrandr doesn't provide a refresh rate.

Description of the change

Cherry-picked from trunk:

Fall back to a refresh rate that is more likely to look correct; 60Hz.
(LP: #1009338)

The fallback is still only used if sync-to-vblank is not available (disabled
in the driver) AND if xrandr doesn't provide a refresh rate.

To post a comment you must log in.
Revision history for this message
Daniel van Vugt (vanvugt) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/composite/composite.xml.in'
2--- plugins/composite/composite.xml.in 2012-02-08 10:54:35 +0000
3+++ plugins/composite/composite.xml.in 2012-06-20 13:05:26 +0000
4@@ -16,7 +16,7 @@
5 <option name="refresh_rate" type="int">
6 <_short>Refresh Rate</_short>
7 <_long>The rate at which the screen is redrawn (times/second)</_long>
8- <default>50</default>
9+ <default>60</default>
10 <min>1</min>
11 <max>200</max>
12 </option>
13
14=== modified file 'plugins/composite/src/screen.cpp'
15--- plugins/composite/src/screen.cpp 2012-03-27 12:14:56 +0000
16+++ plugins/composite/src/screen.cpp 2012-06-20 13:05:26 +0000
17@@ -45,6 +45,8 @@
18
19 #include <core/timer.h>
20
21+static const int FALLBACK_REFRESH_RATE = 60; /* if all else fails */
22+
23 CompWindow *lastDamagedWindow = 0;
24
25 void
26@@ -274,8 +276,8 @@
27 exposeRects (),
28 windowPaintOffset (0, 0),
29 overlayWindowCount (0),
30- redrawTime (1000 / 50),
31- optimalRedrawTime (1000 / 50),
32+ redrawTime (1000 / FALLBACK_REFRESH_RATE),
33+ optimalRedrawTime (1000 / FALLBACK_REFRESH_RATE),
34 scheduled (false),
35 painting (false),
36 reschedule (false),
37@@ -651,7 +653,7 @@
38 }
39
40 if (value.i () == 0)
41- value.set ((int) 50);
42+ value.set ((int) FALLBACK_REFRESH_RATE);
43
44 mOptions[CompositeOptions::DetectRefreshRate].value ().set (false);
45 screen->setOptionForPlugin ("composite", "refresh_rate", value);

Subscribers

People subscribed via source and target branches