summaryrefslogtreecommitdiffstats
path: root/opengl/system
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | Merge "Guard against negative buffer size"bohu2014-10-212-0/+53
|\ \ \ \ \ \ \
| * | | | | | | Guard against negative buffer sizebohu2014-10-172-0/+53
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When negative buffer sizes are passed, emulator crashes. This commit checks the buffer size and handles properly. Change-Id: I223d5f5bcde2455e4b39354f9527dceb193b8e47
* / / / / / / Handle empty buffer in QemuPipeStream::writeFullybohu2014-10-171-0/+4
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Print error message and return 0 when this happens (and it does happen), similar to what QemuPipeStream::readFully does. Change-Id: I14f2f2877e6b22e676d5bfe34a54435220e46127
* | | | | / Fix emulator crashes on glDrawElements commandbohu2014-10-131-2/+2
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current implementation does not properly handle the case when glDrawElements is called without a buffer binded. This commit fixes this problem and fixes the crash. Change-Id: Ic7a5b2fb90c860dad878ed53a369349d479ba4e5
* | | | | Use more appropriate type in cb_handle_t::validate.Alex Vallée2014-09-241-2/+2
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The interface specified by the HWC hal includes const native_handle (through a typedef) which makes it annoying to const_cast away in order to call validate. Validate does not change the handle so this is safe. Change-Id: I78b2997eb24074c186ab2d497b2faf332c7f4a85
* | | | Merge "Remove display initialization from eglGetProcAddress API"David Turner2014-07-231-9/+0
|\ \ \ \ | |_|_|/ |/| | |
| * | | Remove display initialization from eglGetProcAddress APITina Zhang2014-07-231-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. Change-Id: I74ddc0db5c91c84afe0916f118937ef8f891b162 Signed-off-by: Tina Zhang <tina.zhang@intel.com> Signed-off-by: WeixingX Tian <weixingx.tian@intel.com>
* | | | Make the size of "cb_handle_t" same for 32/64-bitTina Zhang2014-06-061-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. Change-Id: I11011576a389db2662888abfaf62dfb8e5611b7c Signed-off-by: Tina Zhang <tina.zhang@intel.com>
* / / 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
* | 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>
* | 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>
* | 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 #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-242-2/+2
| | | | | | | 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
* | 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
* migrate opengl and system from development/toolskeunyoung2013-03-1167-0/+23886
- components under system are moved one directory up like all other HALs Change-Id: I03b870b870d83b247ac398cadfb155f03c9adfa0