sna: Allow TearFree to be enabled by default via configure
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
dcb64b5509
commit
717e00facd
10
configure.ac
10
configure.ac
|
|
@ -668,6 +668,16 @@ AC_MSG_RESULT($accel)
|
|||
|
||||
xp_msg=""
|
||||
|
||||
AC_ARG_ENABLE(tear-free,
|
||||
AS_HELP_STRING([--enable-tear-free],
|
||||
[Enable use of TearFree by default [default=no]]),
|
||||
[TEARFREE="$enableval"],
|
||||
[TEARFREE="no"])
|
||||
if test "x$TEARFREE" = "xyes"; then
|
||||
AC_DEFINE(TEARFREE,1,[Enable "TearFree" by default])
|
||||
xp_msg="$xp_msg TearFree"
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(rendernode,
|
||||
AS_HELP_STRING([--enable-rendernode],
|
||||
[Enable use of render nodes (experimental) [default=no]]),
|
||||
|
|
|
|||
|
|
@ -71,6 +71,12 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#include "git_version.h"
|
||||
#endif
|
||||
|
||||
#ifdef TEARFREE
|
||||
#define ENABLE_TEAR_FREE TRUE
|
||||
#else
|
||||
#define ENABLE_TEAR_FREE FALSE
|
||||
#endif
|
||||
|
||||
DevPrivateKeyRec sna_pixmap_key;
|
||||
DevPrivateKeyRec sna_gc_key;
|
||||
DevPrivateKeyRec sna_window_key;
|
||||
|
|
@ -627,10 +633,6 @@ static Bool sna_pre_init(ScrnInfoPtr scrn, int flags)
|
|||
sna->flags |= SNA_TRIPLE_BUFFER;
|
||||
DBG(("%s: triple buffer? %s\n", __FUNCTION__, sna->flags & SNA_TRIPLE_BUFFER ? "enabled" : "disabled"));
|
||||
|
||||
if ((sna->flags & (SNA_NO_VSYNC | SNA_NO_FLIP)) == 0 &&
|
||||
xf86ReturnOptValBool(sna->Options, OPTION_TEAR_FREE, FALSE))
|
||||
sna->flags |= SNA_TEAR_FREE;
|
||||
|
||||
if (xf86ReturnOptValBool(sna->Options, OPTION_CRTC_PIXMAPS, FALSE))
|
||||
sna->flags |= SNA_FORCE_SHADOW;
|
||||
|
||||
|
|
@ -654,6 +656,10 @@ static Bool sna_pre_init(ScrnInfoPtr scrn, int flags)
|
|||
}
|
||||
scrn->currentMode = scrn->modes;
|
||||
|
||||
if (sna->flags & SNA_HAS_FLIP &&
|
||||
xf86ReturnOptValBool(sna->Options, OPTION_TEAR_FREE, ENABLE_TEAR_FREE))
|
||||
sna->flags |= SNA_TEAR_FREE;
|
||||
|
||||
xf86SetGamma(scrn, zeros);
|
||||
xf86SetDpi(scrn, 0, 0);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue