summaryrefslogtreecommitdiffstats
path: root/libs/gui
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | Support forcing all screenshots into a CPU consumerRicardo Cerqueira2015-10-161-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Looks like a full GPU path is less efficient on some GPU drivers that we're still using, and CPU is reliably faster... (there's probably a locking condition going on somewhere, this needs to be looked into) Change-Id: I8878796a117d65bf2324507cf8755cadce49f6dc
* | | | | | | | Bring back support for glReadPixels screenshot pathPawit Pornkitprasan2015-10-162-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Squashed commit of the following: commit 012d3fe41d1d6cd38a0858b59145e9a4447641fa Author: Hashcode <hashcode0f@gmail.com> Date: Sun Dec 8 19:36:50 2013 +0000 sf: Always use opengles for screen capture Go back to the usage of GRALLOC_USAGE_HW_TEXTURE and GRALLOC_USAGE_HW_RENDERER in captureScreenImplLocked regardless of useReadPixels value This fixes the EGL_NO_IMAGE_KHR error returned from eglCreateImageKHR (blank images returned from screenshot path) Change-Id: I62fe90a081607b9e89c67f3dcfd34c84efc89d35 commit 4866ddf98ac98d8e22a1cd6a21894bb17f274588 Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org> Date: Thu Oct 31 03:53:39 2013 +0000 Revert "remove support for glReadPixels screenshot path" This reverts commit 3ca76f416bc8665a97636ca8a2d0128b9da9d92c. Conflicts: include/gui/ISurfaceComposer.h libs/gui/ISurfaceComposer.cpp libs/gui/SurfaceComposerClient.cpp services/surfaceflinger/SurfaceFlinger.cpp services/surfaceflinger/SurfaceFlinger.h Change-Id: I8c239e533757af770e418dbb198f5a86c736961f Change-Id: I8c239e533757af770e418dbb198f5a86c736961f
* | | | | | | | libgui: Copyback all region except dirty region for newly allocated bufferBaldev Sahu2015-10-061-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Inside Surface::lock if new buffer is allocated and DirtyRegion does not cover complete buffer bounds then copyback may not cover all remaining area as it copyback only area covered by dirty regions from other buffers. This will lead to left out black area which may cause flicker. Change-Id: I4a3f7a56fc5fbaf4af926584919577d8d34bed57
* | | | | | | | fix copy back dirty regionOmprakash Dhyade2015-10-061-10/+9
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Copyback dirty region logic does copyback, even when its not necessary causing 2ms delay. Fix the logic to copy back only what is necessary CRs-fixed: 562334 Change-Id: I52de68258ac9f87d704ee5401f93417805fa6773
* | | | | | | Add body sensors app op for custom sensorsPrashant Malani2015-09-031-0/+4
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the custom sensor requires the BODY SENSOR permission, we should add the body sensors app op for the custom sensor Bug: 23396558 Change-Id: I132917d1bca12c76c8a9fb146e00951cba3e6d7a
* | | | | | Revert "Bug fix in SensorManager."Narayan Kamath2015-07-291-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 869eb2089ec8a6286b944bfcff57e4cbe0c7e207. Change-Id: I4fb865e3b18bbb011fa4e4b4732336930c3a45ae
* | | | | | Bug fix in SensorManager.Aravind Akella2015-07-261-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If SensorService hasn't started when SensorManager instance is requested, keep retrying for a longer duration. Bug: 22529981 Change-Id: I4ba6b760608e34d79273aeb39568f0fa72fbaf9d
* | | | | | BufferQueueConsumer: signal onFrameReleased on dropped framesLajos Molnar2015-07-171-129/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 22552826 Change-Id: I9bdfeb8c68f403301af90d4b494f0ae7166a767c
* | | | | | Merge "Revert "Revert "Modify EGL to disconnect the window when the surface ↵Amith Dsouza2015-07-011-2/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | gets destroyed.""" into mnc-dev
| * | | | | | Revert "Revert "Modify EGL to disconnect the window when the surface gets ↵Amith Dsouza2015-07-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | destroyed."" This reverts commit 6e1a2fea67006b58e83ebbcc72f7b12f18c49d15. Driver level issues fixed by an updated graphics driver. Bug: 21266976 Change-Id: I93339fb6c6bab988f3550adb49ef8e70cda6473e
* | | | | | | Enable sensor data injection mode through adb.Aravind Akella2015-06-303-14/+20
|/ / / / / / | | | | | | | | | | | | | | | | | | Change-Id: I415cf8ff0871fa74babaf9b879c68f210298b472
* | | | | | libgui: Fix handling of rotated surface damageDan Stoza2015-06-251-10/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Incoming surface damage was not aware that the EGL implementation was rotating buffers in response to SurfaceFlinger's transform hint. This didn't affect all cases because the effect was to apply a 90 degree rotation instead of a 270 degree rotation. For full-screen updates, things more or less worked, but in other cases this caused corruption. This fixes that by correctly undoing the effect of rotated buffers on the incoming surface damage, and then passing that damage down untouched to HWC. Bug: 22068334 Change-Id: I226ecfc7a91fe2e16edd2aa6d9149f0d26b529d6
* | | | | | libgui/SF: Propagate SECURE Layer flag changesDan Stoza2015-06-181-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows changes to the SECURE flag to propagate down to Layers in SurfaceFlinger so that WindowManager can change it on the fly in response to device policy updates. Bug: 20934462 Change-Id: I558f6d22c6273be373f1f480365e42536af18a33
* | | | | | GLConsumer: Fix crop mathDan Stoza2015-06-101-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we have excess pixels that need to be removed from (for example) the left and right sides, we currently do something like: left += excess / 2; right -= excess / 2; If excess is odd, however, this removes 1 too few pixels since the odd pixel gets rounded down twice. This changes the math to effectively: left += excess / 2; right -= (excess - excess / 2); Which removes the correct total number of pixels. Bug: 19611086 Change-Id: I8d1ad9fe7ba67c149794c148663d12acbccccef0
* | | | | | libgui/SurfaceFlinger: Add getConsumerNameDan Stoza2015-06-086-6/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a getConsumerName method to IGraphicBufferProducer and Surface. Currently, the name is cached inside of IGBP and is update on connect and dequeueBuffer, which should be good enough for most uses. Bug: 6667401 Change-Id: I22c7881d778e495cf8276de7bbcd769e52429915
* | | | | | Revert "libgui: Add getConsumerName"Dan Stoza2015-06-086-74/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 107fbe5599016b0e35145a1a00c4f238b63d61e4. Change-Id: I0c2b0f7c81193b05eb3dd2f5a59f83598434b744
* | | | | | libgui: Add getConsumerNameDan Stoza2015-06-056-6/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a getConsumerName method to IGraphicBufferProducer and Surface. Currently, the name is cached inside of IGBP and is updated on connect and dequeueBuffer, which should be good enough for most uses. Bug: 6667401 Change-Id: Ife94bd89023fe7c00bad916932b9a19233fd2290
* | | | | | libgui: Add generation numbers to BufferQueueDan Stoza2015-06-037-2/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | libgui: Propagate error by clearing sp<GB>Dan Stoza2015-06-011-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clears the sp<GraphicBuffer> returned by createGraphicBuffer when there is an error during unflattening. Bug: 21498231 Change-Id: I886da4474fc06853cc59188d62044b7d7549126b
* | | | | | Fix libgui crop matrix test.Michael Lentine2015-05-291-6/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On devices that have the crop image extension the crop is not applied to the transform matrix so we have to expect different results in this case. Change-Id: If62dec1111fb77c9fa2c4332d121665960ce0216
* | | | | | Revert "Modify EGL to disconnect the window when the surface gets destroyed."Michael Lentine2015-05-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 00699fa64197cc72a160d69e1f0003cdd43dc136.
* | | | | | libgui: Fix surface damage on rotated buffersDan Stoza2015-05-261-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Flips the width and height when the buffer comes in with a 90 degree rotation so that performing the Y-flip from GL works correctly. Bug: 20761426 Change-Id: I41c9edc8549c6cbdb534277b996ff20c59034582
* | | | | | Merge "Fix libgui tests." into mnc-devMichael Lentine2015-05-222-8/+13
|\ \ \ \ \ \
| * | | | | | Fix libgui tests.Michael Lentine2015-05-222-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update IGraphicsBufferProducerTest to the new maximum enum value which is now NATIVE_WINDOW_BUFFER_AGE. Update SurfaceTextureGLToGL_test to use the correct counts for GraphicsBuffer refs. Buf: 18138368 Change-Id: Ie2f7e00b414d63100b16944e3ab36b1ffceecd57
* | | | | | | Merge "fix BufferItem flatten/unflatten alignment" into mnc-devChong Zhang2015-05-221-13/+12
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | |
| * | | | | | fix BufferItem flatten/unflatten alignmentChong Zhang2015-05-221-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bug: 21370100 Change-Id: Ia3991dc591c176bdbd1d78d1804aa22777525b62
* | | | | | | Merge "Refactor ConsumerBase and it's derived classes." into mnc-devMichael Lentine2015-05-183-35/+16
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | |
| * | | | | | Refactor ConsumerBase and it's derived classes.Michael Lentine2015-05-183-35/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move setDefaultBufferSize, setDefaultBufferFormat, and setDefaultBufferDataSpace into ConsumerBase and remove them from CpuConsumer and BufferItemConsumer. Bug: 19977701 Change-Id: Ic68992464c5da6da7a41c4063a53029a69efcd1b
* | | | | | | Merge "Add ConsumerBase::isAbandoned" into mnc-devJohn Reck2015-05-141-0/+5
|\ \ \ \ \ \ \
| * | | | | | | Add ConsumerBase::isAbandonedJohn Reck2015-05-141-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 20105644 Change-Id: I21526b5397ea51a15500c44a99daa9d75fc4ea67
* | | | | | | | Merge "Modify EGL to disconnect the window when the surface gets destroyed." ↵Michael Lentine2015-05-141-2/+2
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| / / / / / / | |/ / / / / / into mnc-dev
| * | | | | | Modify EGL to disconnect the window when the surface gets destroyed.Michael Lentine2015-05-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 14445579 Change-Id: I1d263ff6cffcb6e448761fca7ca4b06466ad65aa
* | | | | | | Merge "Fix PTS handling for buffer replacement" into mnc-devDan Stoza2015-05-135-53/+27
|\ \ \ \ \ \ \
| * | | | | | | Fix PTS handling for buffer replacementDan Stoza2015-05-125-53/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the way that SurfaceFlinger's shadow buffer management works such that instead of tracking the size of the shadow queue in the BufferQueue, SF tracks the last frame number it has seen, and passes that into the acquireBuffer call. BufferQueueConsumer then ensures that it never returns a buffer newer than that frame number, even if that means that it must return PRESENT_LATER for an otherwise valid buffer. Change-Id: I3fcb45f683ed660c3f18a8b85ae1f8a962ba6f0e
* | | | | | | | libgui: Always allow allocation on connectDan Stoza2015-05-121-0/+1
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change places BufferQueue into a predictable state where allocation is allowed whenever a producer connects. This allows clients to disconnect and reconnect without having to worry about being locked out of allocation. Bug: 20554276 Change-Id: Ic0f920a3d4204f2cafdfa69e46f3bb4204571d7e
* | | | | | | libgui: Hook up onFrameReplacedDan Stoza2015-05-112-0/+23
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This completes the plumbing from ConsumerListener::onFrameReplaced into SurfaceFlinger (and other consumers that may care). Change-Id: I376e78ace95d6748e8662e6b4d47c0dfa697a300
* | | | | | Merge "libgui: Clear frame number while freeing slot" into mnc-devDan Stoza2015-05-042-1/+4
|\ \ \ \ \ \
| * | | | | | libgui: Clear frame number while freeing slotDan Stoza2015-05-012-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clears the frame number of a slot when it is freed, since it is used to determine if a released buffer is stale. Bug: 20445852 Change-Id: I02415e7b25a1eafe7414d6eb1cedf62ac5543cd9
* | | | | | | Merge "Add body sensors app op - framework native" into mnc-devSvetoslav2015-05-013-13/+45
|\ \ \ \ \ \ \
| * | | | | | | Add body sensors app op - framework nativeSvetoslav2015-05-013-13/+45
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | Change-Id: I727a2bb1e28ae9158f2df9c74dd0aee977dfd47f
* | | | | | | SurfaceFlinger: Fix PTS on stale buffersDan Stoza2015-05-013-1/+43
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SurfaceFlinger's (Layer's) shadow copy of the BufferQueue queue was getting out of sync for a few reasons. This change fixes these by doing the following: - Adds a check to re-synchronize the shadow copy every time we successfully acquire a buffer by first dropping stale buffers before removing the current buffer. - Avoids trying to perform updates for buffers which have been rejected (for incorrect dimensions) by SurfaceFlinger. - Adds IGraphicBufferConsumer::setShadowQueueSize, which allows the consumer to notify the BufferQueue that it is maintaining a shadow copy of the queue and prevents it from dropping so many buffers during acquireBuffer that it ends up returning a buffer for which the consumer has not yet received an onFrameAvailable call. Bug: 20096136 Change-Id: I78d0738428005fc19b3be85cc8f1db498043612f (cherry picked from commit 2e36f2283f48ab764b496490c73a132acf21df3a)
* | | | | | Close Fence FDs in error cases of Surface and GraphicBufferMapperTaiju Tsuiki2015-04-301-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* | | | | | libgui: Fix buffer age on 64-bit targetsDan Stoza2015-04-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes a %llu to a PRIu64 to fix compilation on 64-bit targets. Change-Id: I8ba982662dbe8ee2e1e47c4f6ce4bbdbe2020960
* | | | | | BufferQueue: Add NATIVE_WINDOW_BUFFER_AGE queryDan Stoza2015-04-282-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a NATIVE_WINDOW_BUFFER_AGE query, which returns the age of the contents of the most recently dequeued buffer as the number of frames that have elapsed since it was last queued. Change-Id: Ib6fd62945cb62d1e60133a65beee510363218a23 (cherry picked from commit 49f810c72df8d1d64128e376757079825c8decd4)
* | | | | | libgui: Implement onTransact for sideband streamsDan Stoza2015-04-281-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements the GET_SIDEBAND_STREAM case of IGraphicBufferConsumer::onTransact Change-Id: I46138b87ce2d70dde48b3561dcd378ce5fd8f383 (cherry picked from commit 17166698d935a004adab216aca83a585f91e9d96)
* | | | | | libgui: Change detachNextBuffer to return sp<GB>Dan Stoza2015-04-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes Surface::detachNextBuffer to return an sp<GraphicBuffer> instead of an ANativeWindowBuffer* to ensure that reference counting works correctly. Bug: 20092217 Change-Id: I3979ea6121aaf14845f0554477b778770413581e (cherry picked from commit 8b2daa3ca29492b181fb67840640d771c4a2b3ac)
* | | | | | Build fix SensorEventQueue.Aravind Akella2015-04-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I3e6ba031d42bd37067591771f378b7185169ab48
* | | | | | Merge "Enable data injection mode in SensorService."Aravind Akella2015-04-253-10/+44
|\ \ \ \ \ \
| * | | | | | Enable data injection mode in SensorService.Aravind Akella2015-04-233-10/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I0cd32a017235c31c54816e4a357ce3b988350ed6
* | | | | | | am 5d10894c: am ef47c080: am 958f5011: Merge "libgui: Allow an IGBProducer ↵Dan Stoza2015-04-244-22/+108
|\ \ \ \ \ \ \ | | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to disable allocation" * commit '5d10894c9d547449cf231f02b736da9dfdebec11': libgui: Allow an IGBProducer to disable allocation