diff options
author | Jesse Hall <jessehall@google.com> | 2012-04-18 10:28:46 -0700 |
---|---|---|
committer | Jesse Hall <jessehall@google.com> | 2012-04-18 15:24:31 -0700 |
commit | 6699b688d7dbd7ad4a07ca1c1f77db864012010a (patch) | |
tree | c3436a966688523e681e143a5f9d595311265f3a /hw | |
parent | bdd020b108b63fcfccefb2905b9d0401f739981a (diff) | |
download | external_qemu-6699b688d7dbd7ad4a07ca1c1f77db864012010a.zip external_qemu-6699b688d7dbd7ad4a07ca1c1f77db864012010a.tar.gz external_qemu-6699b688d7dbd7ad4a07ca1c1f77db864012010a.tar.bz2 |
Publish and use libOpenglRender interface header
The emulator opengles.c file duplicated the function declarations from
libOpenglRenderer's render_api.h instead of including it directly.
This led to multiple bugs since the declarations didn't actually
match, but there was no way for the compiler or dynamic loader to
check this.
This change makes opengles.c include render_api.h to get function
pointer prototypes, and changes the prototypes/implementation as
necessary to make both sides actually match. It should be much more
difficult to introduce interface mismatch bugs now.
Two bugs this change would have prevented:
(a) The interface mismatch caused by inconsistent branching which led
to GPU acceleration crashing on Windows. With this change, we
would have caught the problem at compile time.
(b) The emulator verbose log has always been printing "Can't start
OpenGLES renderer?" even when the renderer started fine. This is
because the renderer was returning a bool (true == success) but
the emulator's declaration said it returned int, and the emulator
assumed 0 meant success. This difference in return type should now
be caught at compile time.
Change-Id: I5b3c70c9a40854332d67e37333acd6edb6ad01f6
Diffstat (limited to 'hw')
0 files changed, 0 insertions, 0 deletions