To enable multi-touch on a tethered device, allow a callback to be
registered with the OpenGL renderer. On every frame, the framebuffer
is read into system memory and provided to the callback, so it can be
mirrored to the device.
This change is co-dependent on Idae3b026d52ed8dd666cbcdc3f3af80175c90ad3
in external/qemu.
Change-Id: I03c49bc55ed9e66ffb59462333181f77e7e46035
All ten libraries can now be built in 64-bit named "lib64*" (*)
in addition to the original 32-bit form named "lib*".
Also, dlopen "lib64*so" in 64-bit.
(*) eg. In Ubuntu, all can be built with the following command:
make out/host/linux-x86/lib/lib64OpenglRender.so \
out/host/linux-x86/lib/lib64EGL_translator.so \
out/host/linux-x86/lib/lib64GLES_CM_translator.so \
out/host/linux-x86/lib/lib64GLES_V2_translator.so
Rules to build static libraries lib64log.a, lib64cutils.a and lib64utils.a
they depend were added in other CLs.
Change-Id: I3afb64de6dda1d55dbd1b4443d2dbc78a683b19f
1. "emugen" generates four *dec.cpp files containing code like this
to decode offset to pointer in stream
tmp = *(T *)(ptr + 8 + 4 + 4 + 4 + *(size_t *)(ptr +8 + 4 + 4));
If *dec.cpp are compiled in 64-bit, size_t is 8-byte and dereferencing of
it is likley to get wild offset for dereferencing of *(T *) to crash the
code. Solution is to define tsize_t for "target size_t" instead
of using host size_t.
2. Cast pointer to "uintptr_t" instead of "unsigned int" for 2nd param of
ShareGroup::getGlobalName(NamedObjectType, ObjectLocalName/*64bit*/).
3. Instance of EGLSurface, EGLContext and EGLImageKHR are used as 32-bit
key for std::map< unsigned int, * > SurfacesHndlMap, ContextsHndlMap,
and ImagesHndlMap, respectively. Cast pointer to uintptr_t and assert
upper 32-bit is zero before passing to map::find().
4. Instance of GLeglImageOES is used to eglAttachEGLImage() which expect
"unsigned int". Cast it to uintptr_t and assert upper 32-bit is zero.
5. The 5th param to GLEScontext::setPointer is GLvoid* but contains 32-bit
offset to vbo if bufferName exists. Cast it to uintptr_t and assert
upper 32-bit is zero.
6. Use %zu instead of %d to print size_t
7. Cast pointer to (uintptr_t) in many other places
Change-Id: Iba6e5bda08c43376db5b011e9d781481ee1f5a12
Emulator now allows fake camera to emulate both, back and front cameras at the same time.
Camera HAL is changed in this CL in order to support this.
Change-Id: I4dcf2d569bb0c6a3800b4a8da5edd4777b5a078a
All ten libraries can now be built in 64-bit named "lib64*" (*)
in addition to the original 32-bit form named "lib*".
Also, dlopen "lib64*so" in 64-bit.
(*) eg. In Ubuntu, all can be built with the following command:
make out/host/linux-x86/lib/lib64OpenglRender.so \
out/host/linux-x86/lib/lib64EGL_translator.so \
out/host/linux-x86/lib/lib64GLES_CM_translator.so \
out/host/linux-x86/lib/lib64GLES_V2_translator.so
Rules to build static libraries lib64log.a, lib64cutils.a and lib64utils.a
they depend were added in other CLs.
Change-Id: I3afb64de6dda1d55dbd1b4443d2dbc78a683b19f
On Macs running OS X 10.6 and 10.7 with Intel HD Graphics 3000, some
screens or parts of the screen are displayed upside down. The exact
conditions/sequence that triggers this aren't known yet; I haven't
been able to reproduce it in a standalone test. This also means I
don't know whether it is a driver bug, or a bug in the OpenglRender or
Translator code that just happens to work elsewhere.
Thanks to zhiyuan.li@intel.com for a patch this change is based on.
Change-Id: I04823773818d3b587a6951be48e70b03804b33d0
Several EmuGL files were missing copyright notices; added them. Others
had them but below other code, which makes checking for them more
difficult -- I moved these to the top of the file.
These files were all created by GraphTech as a work for hire for AOSP.
Change-Id: Iee67bcf1c9b54ad5aa8a9288ded0382a974c32cb
On Macs running OS X 10.6 and 10.7 with Intel HD Graphics 3000, some
screens or parts of the screen are displayed upside down. The exact
conditions/sequence that triggers this aren't known yet; I haven't
been able to reproduce it in a standalone test. This also means I
don't know whether it is a driver bug, or a bug in the OpenglRender or
Translator code that just happens to work elsewhere.
Thanks to zhiyuan.li@intel.com for a patch this change is based on.
Change-Id: I04823773818d3b587a6951be48e70b03804b33d0
The missing headers were being transitively included through a
Skia header which is being removed.
Change-Id: I6a5b26c1f1bb3ed4c65e7e39fff3b927cb14eabf
HAL_MODULE_INFO_SYM was declared as read-only, but
the struct is written to by libhardware. This causes
a segfault when -Wl,-z,relro is enabled.
Fixed.
Change-Id: I3a3e8366bc2468aef75a3480edd0b3e8fcfeafa5
1. "emugen" generates four *dec.cpp files containing code like this
to decode offset to pointer in stream
tmp = *(T *)(ptr + 8 + 4 + 4 + 4 + *(size_t *)(ptr +8 + 4 + 4));
If *dec.cpp are compiled in 64-bit, size_t is 8-byte and dereferencing of
it is likley to get wild offset for dereferencing of *(T *) to crash the
code. Solution is to define tsize_t for "target size_t" instead
of using host size_t.
2. Cast pointer to "uintptr_t" instead of "unsigned int" for 2nd param of
ShareGroup::getGlobalName(NamedObjectType, ObjectLocalName/*64bit*/).
3. Instance of EGLSurface, EGLContext and EGLImageKHR are used as 32-bit
key for std::map< unsigned int, * > SurfacesHndlMap, ContextsHndlMap,
and ImagesHndlMap, respectively. Cast pointer to uintptr_t and assert
upper 32-bit is zero before passing to map::find().
4. Instance of GLeglImageOES is used to eglAttachEGLImage() which expect
"unsigned int". Cast it to uintptr_t and assert upper 32-bit is zero.
5. The 5th param to GLEScontext::setPointer is GLvoid* but contains 32-bit
offset to vbo if bufferName exists. Cast it to uintptr_t and assert
upper 32-bit is zero.
6. Use %zu instead of %d to print size_t
7. Cast pointer to (uintptr_t) in many other places
Change-Id: Iba6e5bda08c43376db5b011e9d781481ee1f5a12
Whenever a surface was attached to a context, it was dequeing a new
buffer, and enqueing it when detached. This has the effect of doing a
SwapBuffers on detach/attach cycle, which is just wrong and
occasionally caused visible glitches (e.g. animations going backwards
for one frame). It also broke some SurfaceTexture tests which
(validly) depend on specific buffer production/consumption counts.
Change-Id: Ibd4761e8842871b79fd9edf52272900193cb672d
Pass the swap interval from eglSwapInterval to the native window so it
can enable/disable SurfaceTexture's async mode. Fixes the deadlock in
SurfaceTextureGLToGLTest.EglDestroySurfaceUnrefsBuffers.
Change-Id: I19bf69247341f5617223722df63d6c7f8cf389c6
* EGLImageTargetRenderbufferStorageOES was incorrectly accepting
TEXTURE_EXTERNAL_OES as a target. Revert that; the host GL will
correctly reject it with INVALID_ENUM.
* Handle the REQUIRED_TEXTURE_IMAGE_UNITS_OES texparameter query.
* Validate texture parameters set on TEXTURE_EXTERNAL textures;
otherwise invalid parameters would work on the emulator but not on a
real device.
Change-Id: I49a088608d58a9822f33e5916bd354eee3709127
The gralloc API assumes system-wide reference counting of gralloc
buffers. The host-GL accelerated gralloc maps buffers to host-side
ColorBuffer objects, but was destroying them unconditionally in
gralloc_free(), ignoring any additional references from
gralloc_register_buffer().
This affected the SurfaceTexture gralloc buffers used by the
Browser/WebView. For some reason these buffers are actually allocated
by SurfaceFlinger and passed back to the WebView through Binder. But
since SurfaceFlinger doesn't actually need the buffer for anything,
sometime after the WebView has called gralloc_register_buffer()
SurfaceFlinger calls gralloc_free() on it. This caused the host
ColorBuffer to be destroyed long before the WebView is done using it.
Change-Id: I33dbee887a48a6907041cf19e9f38a1f6c983eff
Copy changes faaf1553cf and
f37a7ed6c5 from the GLESv1 translator to
the GLESv2 translator. After this, both translators use the same logic
for glEGLImageTargetTexture2DOES().
Change-Id: I0a95bf2301df7b7428abc593f38170edf4cbda30