xserver/hw/xfree86/dri2
Jamey Sharp 4927af4475 DRI2SwapBuffers: Don't reuse swap_target variable.
swap_target is an out-parameter that needs to be set to the value that
SBC will take on after this SwapBuffers request completes.

However, it was also being used as a temporary variable to hold the MSC
at which the SwapBuffers request got scheduled to occur. This confusion
makes it harder to reason about whether swap_target is being set
correctly for its out-parameter usage. (Hint: It isn't.)

For the latter use, it makes more sense to use the existing target_msc
variable, which already has the right value unless target_msc, divisor,
and remainder are all 0, in which case we can set it using swap_interval
as usual.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Theo Hill <Theo0x48@gmail.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-04-21 11:23:58 -07:00
..
Makefile.am Move DRI2 from external module to built-in 2012-07-10 00:31:01 -07:00
dri2.c DRI2SwapBuffers: Don't reuse swap_target variable. 2014-04-21 11:23:58 -07:00
dri2.h dri2: Add DRI2CreateDrawable2. 2012-07-12 15:08:37 -07:00
dri2ext.c dri2: Disable when Xinerama is active 2013-12-09 13:20:36 -05:00
dri2int.h Move DRI2 from external module to built-in 2012-07-10 00:31:01 -07:00