~smspillaz/compiz-core/compiz-core.fix_936675

« back to all changes in this revision

Viewing changes to plugins/composite/tests/paintscheduler/CMakeLists.txt

  • Committer: Daniel van Vugt
  • Date: 2012-02-09 06:34:15 UTC
  • mfrom: (2984.3.1 revert-paintscheduler)
  • Revision ID: vanvugt@gmail.com-20120209063415-j732d1x6912fb0z3
Revert revision 2938:
    lp:~smspillaz/compiz-core/compiz-core.fix-880707-test-v3
in order to avoid a critical regression it causes (LP: #928655).

Unfortunately the regression was not just a logical bug, but a design bug.
The imposition of user-controlled frame rate throttling completely broke the
existing automatic frame rate throttling and detection. This was a design bug
because it attempted to separate waiting for Vsync from buffer swapping.
Doing so makes the detection of unthrottled rendering impossible. So the
paintscheduler would just switch to non-vsync mode and get stuck there
(LP: #928655).

Instead use the original algorithm from revision 2916:
    lp:~vanvugt/compiz-core/fix-880707.2
which is stable and has many months of community testing already.

Merged from lp:~vanvugt/compiz-core/fix-928655

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
include (FindPkgConfig)
2
 
 
3
 
pkg_check_modules (COMPIZ_PAINTSCHEDULER REQUIRED dri libdrm glibmm-2.4)
4
 
 
5
 
find_library( DRM_LIBRARY drm PATHS /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE} NO_DEFAULT_PATH )
6
 
 
7
 
include_directories (${COMPIZ_INCLUDE_DIRS}
8
 
                     ${COMPIZ_PAINTSCHEDULER_INCLUDE_DIRS}
9
 
                     ${compiz_SOURCE_DIR}/include
10
 
                     ${compiz_BINARY_DIR}
11
 
                     ${compiz_BINARY_DIR}/generated
12
 
                     ${compiz_SOURCE_DIR}/src
13
 
                     ${compiz_SOURCE_DIR}/src/timer/src
14
 
                     ${compiz_SOURCE_DIR}/src/timer/include
15
 
                     ../../include
16
 
                     ../../src)
17
 
 
18
 
#message (${DRM_LIBRARY})
19
 
 
20
 
# FIXME: Hardcoding drm like this is stupid
21
 
# but due to a bug in CMake we have to do it
22
 
add_executable (compiz_paintscheduler_test
23
 
                ../../src/paintscheduler.cpp
24
 
                ${compiz_SOURCE_DIR}/src/timer/src/timer.cpp
25
 
                ${compiz_SOURCE_DIR}/src/timer/src/timeouthandler.cpp
26
 
                test-paintscheduler.cpp
27
 
                test-paintscheduler-set-drmvblanktype.c)
28
 
 
29
 
target_link_libraries (compiz_paintscheduler_test
30
 
                       ${COMPIZ_LIBRARIES} m pthread dl ${DRM_LIBRARY})
31
 
 
32
 
set_target_properties (compiz_paintscheduler_test PROPERTIES
33
 
                        LINK_FLAGS "-L/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}")
34
 
 
35
 
add_test (test-paintscheduler
36
 
          ${CMAKE_CURRENT_BINARY_DIR}/compiz_paintscheduler_test)