summaryrefslogtreecommitdiffstats
path: root/libs/ui
Commit message (Collapse)AuthorAgeFilesLines
* libgui: Don't assign handle to NULL after free is commonCaio Schnepper2015-11-252-1/+5
| | | | | | | | | Reportedly Mali and PowerVR GPUs are crashing when setting handle to NULL So we will set a flag for the devices that might need this aswell Set BOARD_EGL_NEEDS_HANDLE_VALUE=true in BoardConfig.mk to use Change-Id: I6c967f62dc6adced7583d7b2045d11cf5b25fc80
* libgui: Don't assign handle to NULL after freeCaio Schnepper2015-11-231-0/+4
| | | | | | | | This reverts c784dfc39fa1471b0f653206970ac9a256269256 for exynos4 devices with Mali 400 GPUs, which causes a fatal signal (SIGSEGV) and death of the graphics subsystem Change-Id: I6dbf8f8664fca01baf63fece7c64016609fe3e1c
* libgui: assign handle to NULL after freePraveen Chavan2015-10-311-0/+1
| | | | | | to avoid use-after-free situations Change-Id: If9c09f509bc55795856302e5ca34470df019c622
* exynos4: getphys implementation on buffermanager for samsung omxRicardo Cerqueira2015-10-151-0/+13
| | | | Change-Id: I73d9633e1a7b3316ede28dd1369f8f069609cbb0
* libgui: Add generation numbers to BufferQueueDan Stoza2015-06-031-11/+14
| | | | | | | | | | | | | | | This change allows producers to set a generation number on a BufferQueue. This number will be embedded in any new GraphicBuffers created in that BufferQueue, and attempts to attach buffers which have a different generation number will fail. It also plumbs the setGenerationNumber method through Surface, with the additional effect that any buffers attached to the Surface after setting a new generation number will automatically be updated with the new number (as opposed to failing, as would happen on through IGBP). Bug: 20923096 Change-Id: I32bf726b035f99c3e5834beaf76afb9f01adcbc2
* libui: Apply GRALLOC_USAGE_ALLOC_MASK during allocDan Stoza2015-05-291-0/+3
| | | | | | | | | | Applies GRALLOC_USAGE_ALLOC_MASK to the incoming usage bits before calling alloc on the gralloc module. This filters out the new flag GRALLOC_USAGE_FOREIGN_BUFFERS, which is used to send a hint to the producer, but which does not affect the allocation of buffers. Bug: 19801661 Change-Id: Ia37a3eddba2e97598e50ac3e10877430adfa9247
* Close Fence FDs in error cases of Surface and GraphicBufferMapperTaiju Tsuiki2015-04-301-0/+3
| | | | | | | | Surface::{cancel,queue}Buffer and GraphicBufferMapper::lockAsyncYCbCr take the ownership of |fenceFd|s. Though they don't close it on error cases. Change-Id: I49a7ce8837d5c510c4ac4ad4649f310d18610e80 (cherry picked from commit c7263fb43297744eb04b11025424c0c526d5584c)
* Avoid closing invalid FD in Surface and GraphicBufferMapperTaiju Tsuiki2015-04-301-4/+8
| | | | | | | | GraphicBufferMapper::lockAsync{,YCbCr} close the fence FD even when the FD is invalid. Change-Id: Ia2b4dae3b2c06426e34f623f19ba92435f486ab7 (cherry picked from commit dcfe91e1f3f15b68793a69650f9bd0ca6a58ff4c)
* Merge "libgui: Allow an IGBProducer to disable allocation"Dan Stoza2015-04-241-0/+10
|\
| * libgui: Allow an IGBProducer to disable allocationDan Stoza2015-04-231-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a new method IGBP::allowAllocation, which controls whether dequeueBuffer is permitted to allocate a new buffer. If allocation is disallowed, dequeueBuffer will block or return an error as it normally would (as controlled by *ControlledByApp). If there are free buffers, but they are not of the correct dimensions, format, or usage, they may be freed if a more suitable buffer is not found first. Bug: 19801715 Change-Id: I0d604958b78b2fd775c2547690301423f9a52165
* | libui/libgui: Fix errors in parcelingDan Stoza2015-04-201-2/+2
|/ | | | | | | | | | BufferItem and GraphicBuffer were not parceling correctly, which had not been noticed because the libgui tests (specifically, one that tests placing a BufferQueue in a separate process from the IGBP/C) had not been run recently. This change fixes the errors found in those classes. Change-Id: Ie224361a534a79115a3481d83ff97f21d154d4f5
* libgui: Pass surface damage through BufferQueueDan Stoza2015-04-152-3/+13
| | | | | | | | | | This change adds support for passing surface damage all of the way down from the EGL interface through the consumer side of the BufferQueue. Depends on system/core change Ie645e6a52b37b5c1b3be19481e8348570d1aa62c Bug: 11239309 Change-Id: I4457ea826e9ade4ec187f973851d855b7b93a31b
* Merge "libui: Clean up Fence and Region flattening"Dan Stoza2015-04-152-16/+35
|\
| * libui: Clean up Fence and Region flatteningDan Stoza2015-04-152-16/+35
| | | | | | | | | | | | | | | | Fence was flattening incorrectly, causing issues with any fields flattened after it, and Region was relying on being the last object flattened. This change addresses both. Change-Id: If49de061de6e2f11f4d846b4d8c18627dfb7e109
* | Fix a memory corruption issue when vector resizeywen2015-04-101-18/+17
|/ | | | | | | | | | | | | | | There is memory corruption in below code const Rect* prev = &dst[prevIndex]; dst.add(Rect(prev->right, top, right, bottom)); prev points to a memory of vector dst, when dst resize in add() call, the memory that prev points to will be copy to the new allocated vector memory and the old memory will become undefined Avoid pointer in this case, use a local copy instead Change-Id: I4d95ceedd00c8fb615ac153082ade1b1ce0d0fa8
* DO NOT MERGE Add dataSpace to buffer queues; remove old format enums.Eino-Ville Talvala2015-03-191-3/+0
| | | | | | | | | | | | | | | - Wire up new dataSpace parameter through buffer queue stack - Update tests to include the parameter - Switch eglApi to using dataSpace to indicate sRGB gamma/linear difference - Remove RAW_SENSOR in favor of RAW16 - Remove use of sRGB format enums - Add default dataspace to buffer queue core - Add query for default dataspace Cherry pick of I070bd2e7c56506055c419004c29e2e3feac725df Change-Id: I461952389c18051176c6b75e664f20ad369f5760
* Update maxNumber to be smaller.Michael Lentine2015-03-181-1/+5
| | | | | | | | | | There shouldn't be more than 4096 fds (probably signficantly smaller) and there shouldn't be more than 4096 ints. Cherry pick of I3a3e50ee3078a4710e9737114e65afc923ed0573 Bug: 18076253 Change-Id: I82a883572b401f115d252dcd3d00aa7252b49b0e
* resolved conflicts for merge of 1f9f71e1 to lmp-mr1-dev-plus-aospLajos Molnar2015-01-281-2/+9
|\ | | | | | | Change-Id: I627e58fe738e9a3b9831508853f26f9adc350f90
| * GraphicBufferMapper: handle devices that do not implement lock_ycbcrLajos Molnar2015-01-281-2/+9
| | | | | | | | | | Bug: 19179927 Change-Id: I09ffca954fed3cd2d3466c8396627dc7dbc0052d
| * Fix for corruption when numFds or numInts is too large.Michael Lentine2014-11-031-1/+16
| | | | | | | | | | Bug: 18076253 Change-Id: I4c5935440013fc755e1d123049290383f4659fb6
* | Restore Region::set(uint32_t, uint32_t)Bernhard Rosenkraenzer2014-12-221-0/+6
| | | | | | | | | | | | | | | | | | | | The Region::set(uint32_t,uint32_t) ABI is used by the Nexus 10 graphics driver blobs. After commit dd883c0b08d2a60f89542b9b9f5fdabcb14885c7, Nexus 10 blobs need a rebuild unless the old ABI is added back Change-Id: I138dcc1cc281b8d3cde0021282bf874054ec4eaf Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
* | Libui: Remove unused variablesAndreas Gampe2014-12-051-3/+0
| | | | | | | | | | | | | | For build-system CFLAGS clean-up, remove unused variables. Bug: 18632512 Change-Id: Ib78912ae442ddc6410960ab1efb4fb2faa1a9208
* | Fix -Werror on 64-bit buildsDan Stoza2014-12-041-1/+1
| | | | | | | | | | | | | | Add another static_cast to avoid an error on 64-bit builds Change-Id: I62fb2c67766c4aab70d9d1834f255d06ff82dd8d (cherry picked from commit 116c7a113cb2db4d3f7708627ac4713c7e92cd43)
* | Disable struct padding warning/errorDan Stoza2014-12-041-0/+3
| | | | | | | | | | | | | | Adds -Wno-padded, which was triggering on 64-bit devices Change-Id: If27bac27881f2081a222b32213901f5087554b07 (cherry picked from commit 4e84bd310c876e1450077959333c87e6e83dbf63)
* | libui: Enable -Weverything and -WerrorDan Stoza2014-12-049-263/+310
| | | | | | | | | | | | | | | | Enables -Weverything and -Werror, with just a few exceptions for warnings we can't (or shouldn't need to) work around. Change-Id: I470a267e9b1c373f2d5c960f005c3b0e02b2db63 (cherry picked from commit 303b9a51239d36d237a7d40c67b5085cdb3c1059)
* | Enable clang for libui/libgui/surfaceflingerDan Stoza2014-12-043-21/+23
| | | | | | | | | | | | | | | | Enables clang and C++11 for libui/libgui/surfaceflinger, and eliminates all compile-time warnings. Change-Id: Ie237fdb5ae44f2bfcddaa884f9c65ec3f08ae50f (cherry picked from commit f10c46ef855b6410b20ebd8b1351d4d78d8eca8e)
* | Fix for corruption when numFds or numInts is too large.Michael Lentine2014-12-041-1/+16
| | | | | | | | | | | | Bug: 18076253 Change-Id: I4c5935440013fc755e1d123049290383f4659fb6 (cherry picked from commit dfd06b89a4b77fc75eb85a3c1c700da3621c0118)
* | am c52e54c4: Merge "Some more test cleanup."Dan Albert2014-10-172-30/+36
|\ \ | |/ |/| | | | | * commit 'c52e54c47184704613d446eb15d051ceb43d82b3': Some more test cleanup.
| * Some more test cleanup.Dan Albert2014-10-162-30/+36
| | | | | | | | | | | | | | | | | | Needed to build successfully when libc++ is the default STL. Also fix a missing include. Not sure how this was getting by before. Probably some transitive include. Change-Id: Ie96b79e96b4e154d786fbf2d5ae5cf5892608837
* | crash if getNativeBuffer() called on NULL GraphicBufferColin Cross2014-07-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | If getNativeBuffer() is called on a NULL GraphicBuffer the static_cast of this from GraphicBuffer* to ANativeWindowBuffer* will return a small pointer like (ANativeWindowBuffer*)0x10. This value can propagate past NULL checks until it causes a crash far away from the original NULL pointer. Crash immediately instead. Change-Id: Id614b9eb1484108b3c3c733545309844c4b87532
* | am 38c9e132: am c1ffd351: am bd20e551: Merge "Use asynchronous lock/unlock API"Greg Hackmann2014-05-122-0/+108
|\ \ | |/ | | | | | | * commit '38c9e1327a5b24267c3dab5293bc9d7ada6e9fc9': Use asynchronous lock/unlock API
| * Use asynchronous lock/unlock APIFrancis Hart2014-05-122-0/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | The gralloc API now provides a way for using lock/unlock with the Android explicit synchronisation concept. This changes updates the GraphicBuffer class to also expose this functionality, and updates the Surface class to make use of in line with the dequeueBuffer/queueBuffer mechanism. This new behaviour is dependent on GRALLOC_MODULE_API_VERSION_0_3. If the local gralloc module does not support this then the existing synchronous lock/unlock mechanism will be used. Change-Id: I8c3fd9592e0c5400ac9be84450f55a77cc0bbdc5
* | am 9493d492: am 9eb142e3: am a9d49f99: Merge "Revert "Use asynchronous ↵Greg Hackmann2014-05-092-108/+0
|\ \ | |/ | | | | | | | | | | lock/unlock API"" * commit '9493d4924a59f14b698389386337a9c07a7ea3c4': Revert "Use asynchronous lock/unlock API"
| * Merge "Revert "Use asynchronous lock/unlock API""Greg Hackmann2014-05-092-108/+0
| |\
| | * Revert "Use asynchronous lock/unlock API"Greg Hackmann2014-05-092-108/+0
| | | | | | | | | | | | | | | | | | This reverts commit 378ef07760eda717367d9429428c42d54d54d9a7. Change-Id: I1de5ab973b5383633e75924fe90ac3ca8216c36a
* | | am 4b46776f: am 8a6cd189: am f60564a1: Merge "Use asynchronous lock/unlock API"Greg Hackmann2014-05-092-0/+108
|\ \ \ | |/ / | | | | | | | | | * commit '4b46776ff88c5a365700b88e8b2b04e1b2c77e6e': Use asynchronous lock/unlock API
| * | Merge "Use asynchronous lock/unlock API"Greg Hackmann2014-05-092-0/+108
| |\ \ | | |/
| | * Use asynchronous lock/unlock APIFrancis Hart2014-05-022-0/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The gralloc API now provides a way for using lock/unlock with the Android explicit synchronisation concept. This changes updates the GraphicBuffer class to also expose this functionality, and updates the Surface class to make use of in line with the dequeueBuffer/queueBuffer mechanism. This new behaviour is dependent on GRALLOC_MODULE_API_VERSION_0_3. If the local gralloc module does not support this then the existing synchronous lock/unlock mechanism will be used. Change-Id: I77daa1beb197b63b1c2f281b8414ac4ae4b5b03c
| * | fix GraphicBuffer::flatten crash issue when handle is nullJun Jiang2014-04-291-2/+4
| |/ | | | | | | | | Change-Id: I0d3727e4366cac355791e52cb7790bf8f3c51527 Signed-off-by: Jun Jiang <jun.a.jiang@intel.com>
* | am b8ceeb8f: am 85085cd6: Merge "libui: fix passing Fence object over binder"Colin Cross2014-04-151-2/+2
|\ \ | |/ | | | | | | * commit 'b8ceeb8f6cc3eea53d4b471747c401b9ae54d931': libui: fix passing Fence object over binder
| * libui: fix passing Fence object over binderColin Cross2014-04-141-2/+2
| | | | | | | | | | | | | | | | | | The Fence object was writing a size_t into the binder buffer in flatten, which changes size if the producer and consumer are running in a 32-bit and a 64-bit process. Use a uint32_t instead. Change-Id: Ifed526513800ce27f9d605101cddd922292cca37
* | Merge "Add unique ID to GraphicBuffer"Dan Stoza2014-04-111-15/+28
|\ \
| * | Add unique ID to GraphicBufferDan Stoza2014-03-311-15/+28
| | | | | | | | | | | | | | | | | | | | | | | | Adds a globally-unique ID (PID + sequence number) to every GraphicBuffer, which will remain the same while crossing Binder, even if the underlying handles change. Change-Id: Ib11330a4c5e99621b82204e0adb31b9a88658426
* | | Adding render stats APIs to UiAutomation (framework native).Svetoslav2014-04-102-0/+85
|/ / | | | | | | | | | | bug:12927198 Change-Id: Ibb1c07f7d89e11281e5c1f27f412a29ac6f9c4ab
* | Added null checkAndy McFadden2014-03-171-2/+4
| | | | | | | | | | | | | | | | Don't dereference "handle" if it's NULL. Bug 13348578 Change-Id: Ifa6758616c41cf84467af6db29c779d26901a01c
* | am d4dabf87: am cdbf28b3: Merge "native frameworks: 64-bit compile issues"Mark Salyzyn2014-03-132-5/+6
|\ \ | |/ | | | | | | * commit 'd4dabf872ac0a12e12aebae9032f7d62762c2aeb': native frameworks: 64-bit compile issues
| * native frameworks: 64-bit compile issuesMark Salyzyn2014-03-122-5/+6
| | | | | | | | | | | | | | - Fix format (print/scanf) - Suppress unused argument warning messages (bonus) Change-Id: I05c7724d2aba6da1e82a86000e11f3a8fef4e728
* | am 0a643374: am 6b4e5b7f: Merge "Fix misuse of ."Ying Wang2014-03-011-2/+0
|\ \ | |/ | | | | | | * commit '0a6433749dcd87039f6e31c04ea662b238310b17': Fix misuse of $(my-dir).
| * Fix misuse of $(my-dir).Ying Wang2014-02-281-2/+0
| | | | | | | | Change-Id: I8b24f60826abe4b541de646cbc3df66929203301
* | Add contains point method to RegionMichael Wright2014-02-101-0/+16
| | | | | | | | Change-Id: I553433ff7ac39f14ffca8278960d2abc95b4dd63