~compiz-team/compiz/compiz.fix_1015593

« back to all changes in this revision

Viewing changes to plugins/composite/src/screen.cpp

  • Committer: Daniel van Vugt
  • Date: 2012-06-10 07:08:55 UTC
  • mfrom: (3244.2.2 fix-1009338)
  • Revision ID: daniel.van.vugt@canonical.com-20120610070855-etb6xvu7uwnqsk5l
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.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
 
46
46
#include <core/timer.h>
47
47
 
 
48
static const int FALLBACK_REFRESH_RATE = 60;   /* if all else fails */
 
49
 
48
50
CompWindow *lastDamagedWindow = 0;
49
51
 
50
52
void
274
276
    exposeRects (),
275
277
    windowPaintOffset (0, 0),
276
278
    overlayWindowCount (0),
277
 
    redrawTime (1000 / 50),
278
 
    optimalRedrawTime (1000 / 50),
 
279
    redrawTime (1000 / FALLBACK_REFRESH_RATE),
 
280
    optimalRedrawTime (1000 / FALLBACK_REFRESH_RATE),
279
281
    scheduled (false),
280
282
    painting (false),
281
283
    reschedule (false),
651
653
        }
652
654
 
653
655
        if (value.i () == 0)
654
 
            value.set ((int) 50);
 
656
            value.set ((int) FALLBACK_REFRESH_RATE);
655
657
 
656
658
        mOptions[CompositeOptions::DetectRefreshRate].value ().set (false);
657
659
        screen->setOptionForPlugin ("composite", "refresh_rate", value);