We want to be able to retrieve the XVisualInfo used when creating the
GL context under GLX and EGL-X11, so that we can use the visual before
we have an onscreen frame buffer.
Initialize variables; GCC does not always catch all cases where the
variables are used after being initialized, especially when it comes to
out parameters.
Some drivers ( like mgag200 ) don't yet support drmModePageFlip.
This commit forgoes waiting for vblank and flips right away
in those cases. That prevents the hardware from freezing up the screen,
but does mean there will be some visible tearing.
https://bugzilla.gnome.org/show_bug.cgi?id=746042
Rename the install projects to cogl-install, so that it is easier to
differentiate the projects when using the project set in a grand solution
file, such as a grand solution file that is used to build the entire
Clutter stack.
"Install" the .pdb files with the built DLLs and examples, as the .pdb
files are already generated for all builds, which are useful for debugging
during Cogl development, or during development of Cogl-using items.
Also be more selective on the LIBs, DLLs and EXEs that are copied, so that
we only copy the items built during Cogl compilation when the project set
is used in a grand solution, such as when building the entire Clutter
stack, which will avoid items being incorrectly copied or extra and
unneeded items being copied.
Use the multiprocessor compilation (/MP) option so that release build times
can be cut down quite a bit. This will generate a brief warning for debug
builds as such builds use /Gm, but otherwise the build will proceed
normally albeit it would be slower.
Also use the /d2Zi+ flag for Visual Studio 2010 (and later) builds to log
more useful information in the .pdb files that are generated, to aid
debugging release builds when necessary.
To make the .pdb filename match the filename of the built target, one must
specify the .pdb file name if the target filename does not match the
project name for Visual Studio 2010 and later. Update the projects
accordingly.
We can't just destroy and replace the EGL and gbm surfaces while
they are still in use i.e. while there is a pending flip. In fact, in
that case, we were calling gbm_surface_destroy() on a surface that
still had the front buffer locked and then, on the flip handler,
gbm_surface_release_buffer() for a buffer that didn't belong to the
new surface.
Instead, we still allocate new surfaces when requested but they only
replace the old ones on the next swap buffers when we're sure that the
previous flip has been handled and buffers properly released.
Currently the code queries the current msc then tries to approximate the
value of the next msc satisfing the modulus 2 for when to wait. This
introduces some instability as the msc may tick over during the
roundtrip leading to a 32ms wait instead of a 16ms wait. This happens
often enough to cause jerky animations, and affect gnome-shell-perf-tool.
A simpler solution is just use a single roundtrip by using WaitForMsc to
ask the driver to compute the next vblank itself.
Cc: Owen W. Taylor <otaylor@fishsoup.net>
Cc: Robert Bragg <robert@linux.intel.com>
Reviewed-by: Robert Bragg <robert@sixbynine.org>