Properly initialize and cleanup GError

GLib complains when a pointer to GError isn't properly initialized to
NULL before it is used. When handling an error, g_clear_error() can be
used to free resources and initialize the variable to NULL again for
further use.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Remove generated files

Files that can be automatically generated by the autotools don't belong
in the repository.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Cleanup autotools build system

Simplify the configure.ac and add some macros required to stop autoconf
from complaining.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Enable more compiler warnings

Pass -Wall to the compiler to enable more compiler warnings which can
help in avoiding bugs. When building from a checkout, the autogen.sh
script will automatically enable -Werror as well so that warnings are
no longer easy to ignore.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Fix a few compiler warnings

There is quite a bit of dead code in the GLES sink implementation. It
can safely be removed.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Add getopt-based command-line parser

Allow the color depth to be specified on the command-line. Furthermore a
new mode is added in which the test pattern is generated on every frame
instead of once at the beginning to simulate dynamic input data such as
from a video input.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Beef up the run-tests.sh script

The script will now refuse to run on an existing X server and instead
spawn its own instance to make sure the X server runs at the same color
depth as the GLES test program.

The new --disable-sync option can be used to disable synchronization of
rendering operations with the VBLANK. A --performance option is added
which will automatically set the CPU governor to "performance", causing
the CPU to always operate at the maximum frequency. Finally a new mode
can be enabled with the --regenerate option, which causes the test
pattern to be regenerated for each frame in order to simulate dynamic
input data.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>