summaryrefslogtreecommitdiffstats
path: root/opengl
Commit message (Collapse)AuthorAgeFilesLines
* guest system gles fix: Enable screen capture with gpu onstaging/cm-12.1stable/cm-12.1-YOG7Dstable/cm-12.1-YOG4Pstable/cm-12.1-YOG3Ccm-12.1bohu2015-01-291-6/+11
| | | | | | | | | | | | | | | | Currently, when running emulator with gpu on, screen capture does not work. This commit fixes that by doing the following steps: 1. enable gralloc to allocate buffer in gralloc_alloc for screen capture usage mode. 2. read back screen pixels in gralloc_lock for screen capture usage mode Note: This commit only fixes guest side, and to make screen capture work, we also need the corresponding fix on host side in the following CL: e36c098b5563adcc7442cb3a172ff769ee3fb4b6 (cherry picked from commit 5a50ac8819525f851c677be88a466b14737dbb18) Change-Id: Ie9307eda411ab3d0b3842fbb4a71926dd62a1875
* Fix a missed function override in GLEncoder.cppbohu2014-12-101-0/+1
| | | | | | | | glColorPointer override was missed and this commit fixes that. (cherry picked from commit 2e74d05cf71810cd25ac69d656c3bfa01aef7907) Change-Id: I8b303c5751aa38bd246903aeb418815f9ffd97f5
* Update goldfish from aosp/masterbohu2014-12-0237-3156/+2247
| | | | | | | | | | | | | | | | | | | | Merge aosp/master fixes into lmp-dev This patch updates the goldfish device to match the following patches: 1c9492dd Fix GPU emulation crash. 1da62b8c opengl: Fix a few function name typos. a4d0e1ca opengl: Remove accessor functions from encoders. 223a765d opengl: Remove compiler warnings. b7837c3c opengl: Regenerate GPU emulation encoder sources. 622970b4 opengl: Fix 64-bit build. 5fa17220 Unbind buffer when buffer is deleted 4a01a642 Properly initialize GLClientState's m_states 2c71ccd4 handles glGetBooleanv when value is nonboolean 4f9ec391 Fix eglDestroyContext and glTexImage2D 585a4b03 opengl: Fix pixelDataSize() ambiguity. Change-Id: I3f574149558b4b4cee8a3e354314f6da8f49957d
* Merge aosp/master fixes into lmp-devbohu2014-10-216-8/+67
| | | | | | | | | | | | | | | | | | | This patch updates the goldfish device to match the following patches: 3f62b50d Make the size of "cb_handle_t" same for 32/64-bit 7a2929cd Remove display initialization from eglGetProcAddress API d0fead3c ranchu: Add ARM64-specific root/ramdisk config files. 58ab34d9 Upgrade goldfish sensor HAL module to 1_0 e3e68659 ranchu: Fix goldfish_pipe definitions. fe2c5beb Use more appropriate type in cb_handle_t::validate. 40a674e0 Fix emulator crashes on glDrawElements command 972291ae Handle empty buffer in QemuPipeStream::writeFully 4aad46d9 Allow glGetProgramInfoLog_enc to have empty length 691e021d Guard against negative width and height f2f04f45 Guard against negative buffer size ebe80e44 Handle empty data parameter in glTexSubImage2D_enc Change-Id: Ib272952af902dc57fa6c76f966eb508a5fda838e
* Merge "Make the size of "cb_handle_t" same for 32/64-bit" into lmp-devVince Harron2014-09-191-1/+5
|\
| * Make the size of "cb_handle_t" same for 32/64-bitTina Zhang2014-09-181-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | cb_handle_t is usually created by Surfaceflinger which is a 64-bit process on 64-bit platform, and used by client processes which could be 32-bit processes or 64-bit processes. Since the "cb_handle_t" is like a protocol, we should make its size same for both 32-bit and 64-bit processes. Signed-off-by: Tina Zhang <tina.zhang@intel.com> (cherry picked from commit 3f62b50d45441ae077c958423e9e301acd5dcc11) Change-Id: I12aace9446e4566d9b12b0f50970ec00e8537dd9
* | Remove display initialization from eglGetProcAddress APITina Zhang2014-09-181-9/+0
|/ | | | | | | | | | | | | | | | | We don't need to do the initialization in the eglGetProcAddress API. The work can be finished in the eglInitialize API. When zygote pre-loading resources, eglGetProcAddress will be called. If we let eglGetProcAddress do the display initialization, zygote will get the "qemu-pipe" handle of the "opengles" service. This is bad, because all the java processes which forked from zygote will get the same handle from zygote. Then the host service cannot distinguish from the device threads, and this will lead the emulator to crash. Signed-off-by: Tina Zhang <tina.zhang@intel.com> Signed-off-by: WeixingX Tian <weixingx.tian@intel.com> (cherry picked from commit 7a2929cd6548693b581c17ba69308a49e03c56be) Change-Id: I156970e004172e0bbe23a1a0c6c6b86850fd2ba6
* am dc684041: am c04a27cb: opengl: rcOpenColorBuffer must be synchronousJesse Hall2014-05-289-2/+36
|\ | | | | | | | | * commit 'dc684041d9fbfd3b7db6fb0294286764d92564d0': opengl: rcOpenColorBuffer must be synchronous
| * am c04a27cb: opengl: rcOpenColorBuffer must be synchronousJesse Hall2014-05-289-2/+36
| |\ | | | | | | | | | | | | * commit 'c04a27cb9a25ba26893212914fd725a85f8d6694': opengl: rcOpenColorBuffer must be synchronous
| | * opengl: rcOpenColorBuffer must be synchronousJesse Hall2014-05-279-2/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The gralloc register_buffer() function, which calls rcOpenColorBuffer, must actually increment the reference count before returning. Otherwise the buffer allocator may release its reference before the client has obtained one, and the buffer will be freed prematurely. Since rcOpenColorBuffer was just sending a message to the host without waiting for it to be received/processed, this guarantee was not met. Adding a return value makes the call synchronous. Bug: 12988668 Change-Id: I8b2399cfb0f600f99b3387f630343291b59bc9a6
* | | opengl: Fix const-ness of GLES prototypes to match new headersJesse Hall2014-05-216-17/+17
|/ / | | | | | | | | Bug: 1502849 Change-Id: I902517c23354e14f9c63b1584db286d682315bb5
* | gralloc: don't initialize reserved_procGreg Hackmann2014-05-092-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | gcc supports designated initializers in C++ mode as an extension, but *only* when all of the specified fields are at the beginning of the struct. Hence initializing reserved_proc breaks compilation when new procs are added. Initializing reserved_proc makes a (spurious) warning go away, so instead directly suppress that warning. Change-Id: I279b7070b1aa7068c23fb59422589ff31980432d Signed-off-by: Greg Hackmann <ghackmann@google.com>
* | Add 64-bit software GLES/EGL support in gralloc.goldfish moduleTina Zhang2014-04-181-0/+4
| | | | | | | | | | | | | | | | | | | | | | If the emulator chooses running without using the host GPU to do the GLES/EGL acceleration, the gralloc.goldfish module must let the emulator use gralloc.default module which can support the software GLES/EGL. Add this support for 64-bit emulator. Change-Id: I241e70ce26a8f0298a32e3a55037fc3028a2e2a7 Signed-off-by: Tina Zhang <tina.zhang@intel.com>
* | Merge "Fix the Chrome app crash in emulator issue"David Turner2014-04-141-0/+1
|\ \
| * | Fix the Chrome app crash in emulator issueTina Zhang2014-04-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The TLS desctuctor callback function eglReleaseThread needs to access EGLThreadInfo but it has been released by tlsDestruct. That causes the crash issue when Chrome app is opened. Change the EGLThreadInfo pointer value to NULL just after EGLThreadInfo object is released, can fix the problem. Change-Id: I7cdc7bdcd602af00369e570b0d2be168b76143a6 Signed-off-by: Tina Zhang <tina.zhang@intel.com>
* | | Merge "Support GLES acceleration in 64bit emulator on device side"David Turner2014-04-127-28/+47
|\| |
| * | Support GLES acceleration in 64bit emulator on device sideTina Zhang2014-04-097-28/+47
| | | | | | | | | | | | | | | | | | | | | Support both 32bit and 64bit emulator GLES acceleration. Change-Id: Ibd8b970d23937ae40732324706074ff00f433a14 Signed-off-by: Tina Zhang <tina.zhang@intel.com>
* | | Remove the useless folder and files in emulator GLES/EGL driversTina Zhang2014-04-0910-869/+0
|/ / | | | | | | | | | | | | Files in OpenglOsUtils folder are useless for emulator GLES/EGL drivers. Remove them to simplify the content. Change-Id: I0a3cb572328cfa22b8567e8cd938f2a228f6167a Signed-off-by: Tina Zhang <tina.zhang@intel.com>
* / Remove #include <asm/page.h>.Elliott Hughes2014-02-241-5/+1
|/ | | | Change-Id: I1476efe9a706fe322ec23571c6375b847a0ccf2f
* device/generic/goldfish: convert LOCAL_MODULE_PATH to LOCAL_MODULE_RELATIVE_PATHColin Cross2014-01-243-6/+4
| | | | | | | LOCAL_MODULE_PATH doesn't work for multiarch builds, replace it with LOCAL_MODULE_RELATIVE_PATH. Change-Id: I4e4ceec61d026bbe74ba604554c06104bde42e5e
* Merge commit '828bd482a1aeacf96d5f3a3e0701029d9f890c5f' into HEADThe Android Open Source Project2013-11-222-12/+0
|\
| * am 3bd0e079: Merge "Return EGL_FALSE if eglChooseConfig failed to find any ↵Jesse Hall2013-08-131-0/+2
| |\ | | | | | | | | | | | | | | | | | | matching configs" * commit '3bd0e079a9d5321f952c2871fb453775810879f7': Return EGL_FALSE if eglChooseConfig failed to find any matching configs
| * | get rid of HAL pixelformats 5551 and 4444Mathias Agopian2013-07-262-12/+0
| | | | | | | | | | | | Change-Id: If69c5cdb02dd8308963165a09b5d7fe3b00077ae
* | | Modify the build targets for goldfish from to include aosp*.Raghu Gandham2013-11-111-1/+1
| | | | | | | | | | | | | | | | | | | | | This allows egl.cfg to be copied to $(TARGET_OUT)/lib/egl for aosp* build targets. This patch fixes the emulator to boot with "-gpu on" flag. Change-Id: I6c291a4a0fd82242d7f2ac41229be202aa7c71e0
* | | Delete buffer data when removing it from the SharedGroup namespaceJesse Hall2013-11-091-14/+36
| |/ |/| | | | | | | | | | | | | | | | | Updating or deleting data associated with a buffer object was clearing the name->data association, but not actually deallocating the data. Thanks to manjian2006 for finding the bug and proposing the fix. Bug: 60468 Change-Id: I477f1e67d33a486419127ac790f32ddbbf566089
* | Return EGL_FALSE if eglChooseConfig failed to find any matching configsMartin Storsjo2013-08-111-0/+2
|/ | | | | | | | | | | Technically, we shouldn't have touched *num_config at all in this case, but the remote interface to the host doesn't return a separate boolean return value, only the number of matching configs. This makes sure that callers that only check the return value of eglChooseConfig notice a failure to find configs. Change-Id: I7f660a4a5b8306184608a86c34329d3163ad05ba
* Flush QemuPipeStream when neededPetar Jovanovic2013-06-042-0/+3
| | | | | | | | | | | | | | | Under some circumstances, close color buffer messages in the command stream do not reach the host as the size of the undelivered commands is small. This results in refcounts of ColorBuffer never dropping to zero and color buffers not being freed. The patch calls flush at the end of rcCloseColorBuffer_enc(). In addition, the stream is flushed before it is deleted in the destructor of QemuPipeStream, since it may also have important messages. bug: 9278661 Change-Id: I46f20af8e0c272ec8d831d62f57cb2f22c7b28a7
* Gralloc/Camera3: Support new HAL_PIXEL_FORMAT_YCbCr_420_888 formatEino-Ville Talvala2013-05-072-9/+138
| | | | | | | | | | | | Enable flexible YUV format buffers from the camera. - Add gralloc alloc support for YCbCr_420_888, mapped to NV21 - Add gralloc lock_ycbcr method - Add new format to list supported by camera HAL - Fix minor compilation warnings Bug: 8734880 Change-Id: I68a8cc126985c7d5ae100a87b31c60ee59074cd3
* goldfish: fix gralloc moduleAlex Ray2013-04-191-2/+1
| | | | | | | | Explicitly setting reserved (in C++) breaks future extensions of the module format. Removed these explicit settings for future compatibility. Change-Id: Iaacd5c2f55121bcb8f1761f646ace374eceb2b4f
* Add liblogYing Wang2013-04-091-1/+1
| | | | | Bug: 8580410 Change-Id: I2c07b8ce85aff341575ee8c3f509f64e252b8ed4
* migrate opengl and system from development/toolskeunyoung2013-03-11131-0/+32974
- components under system are moved one directory up like all other HALs Change-Id: I03b870b870d83b247ac398cadfb155f03c9adfa0