Commit Graph

51761 Commits

Author SHA1 Message Date
Elliott Hughes
e814b43c58 Merge "Don't use TEMP_FAILURE_RETRY on close in frameworks/native." 2015-05-16 00:26:09 +00:00
Elliott Hughes
997abb668b Don't use TEMP_FAILURE_RETRY on close in frameworks/native.
Bug: http://b/20501816
Change-Id: Id13a62f02243c6c4831e2f47944dc34fa822f5b6
2015-05-15 17:05:40 -07:00
Dan Stoza
553cbb2544 Merge "SurfaceFlinger: Handle EGL errors more cleanly" 2015-05-14 17:56:27 +00:00
Dan Stoza
59bfd2bbed SurfaceFlinger: Handle EGL errors more cleanly
Adds some more safety checking for cases where we get an error while
trying to create the EGLImage. The checking puts the Layer into a
failed state after detecting an error, since the shadow queue may no
longer be synchronized.

Bug: 20957332
Change-Id: I68b4c40eab3e58731b875ed5752f2c7d17f14bcb
(cherry picked from commit 65476f3332)
2015-05-14 10:43:07 -07:00
Hiroshi Yamauchi
9188b4bb5d Merge "Replace JNI primitive array critical calls with non-critical ones." 2015-05-13 22:47:42 +00:00
Hiroshi Yamauchi
569bc1bcdd Replace JNI primitive array critical calls with non-critical ones.
The glgen part.

(cherry pick commit 4e7de461c1)

Bug: 19235243
Change-Id: I0d1e78acf39feb37a67e857216a6d52f4cede180
2015-05-13 13:11:30 -07:00
Dan Stoza
f984bad94a Merge "Fix PTS handling for buffer replacement" 2015-05-13 17:53:22 +00:00
Dan Stoza
bbb010b79c Merge "binder: add uint64 support to Parcel." 2015-05-13 17:52:46 +00:00
Dan Stoza
e64a79cd85 Fix PTS handling for buffer replacement
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
(cherry picked from commit a4650a50a0)
2015-05-13 09:43:35 -07:00
Ronghua Wu
f183395296 binder: add uint64 support to Parcel.
Bug: 19620911
Change-Id: Ifce5319e4e35afd344dead67ab7ba1cd399476a3
(cherry picked from commit 2d13afdfa1)
2015-05-13 09:43:35 -07:00
Dan Stoza
bfe211f00a Merge "libgui: Always allow allocation on connect" 2015-05-12 22:33:39 +00:00
Johan Euphrosine
b9009863cb Merge "frameworks/native: document native types and enums" 2015-05-12 22:05:22 +00:00
Dan Stoza
cbe5459a99 libgui: Always allow allocation on connect
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
(cherry picked from commit 2b83cc920a)
2015-05-12 15:03:52 -07:00
Johan Euphrosine
bf6d5e012c frameworks/native: document native types and enums
Change-Id: Id94b610f27b87426abb30e13484cbd16990aa995
2015-05-12 14:39:28 -07:00
Dan Stoza
38d7f7550f Merge "libgui: Hook up onFrameReplaced" 2015-05-12 17:18:12 +00:00
Dan Stoza
a3b6693272 libgui: Hook up onFrameReplaced
This completes the plumbing from ConsumerListener::onFrameReplaced into
SurfaceFlinger (and other consumers that may care).

Change-Id: I376e78ace95d6748e8662e6b4d47c0dfa697a300
(cherry picked from commit dc13c5b85b)
2015-05-12 09:35:29 -07:00
Jesse Hall
364ed95453 Merge "libEGL: whitelist the EGL_KHR_create_context_no_error extension" 2015-05-11 21:31:44 +00:00
Jesse Hall
5245af3cb7 libEGL: whitelist the EGL_KHR_create_context_no_error extension
Allow EGL implementations to expose the
EGL_KHR_create_context_no_error extension if they wish.

https://www.khronos.org/registry/egl/extensions/KHR/EGL_KHR_create_context_no_error.txt

Change-Id: I3290ccc2a69a1fa0b00ec3f1aa4f876906c64bfb
2015-05-11 13:59:15 -07:00
Chris Craik
05815996c9 Merge "Added Voltage and Current regulator ftrace events to atrace" 2015-05-07 16:20:52 +00:00
Dan Stoza
c4e98c40de Merge "SF: Apply pending transactions to new sidebands" 2015-05-06 16:50:38 +00:00
Dan Stoza
8afb76731a SF: Apply pending transactions to new sidebands
When a Layer's sideband stream is set, apply any pending transactions.
Otherwise they would never be applied since sideband streams don't
trigger updates by pushing new buffers.

Bug: 20125898
Change-Id: I0c7a91cdf84e6205801f4ab64eee0b09e4c0b3e0
(cherry picked from commit 3b04e1383eca6cb1d43ebe23a421c427007690c7)
2015-05-05 14:21:20 -07:00
Dan Stoza
e357f64945 Merge "libgui: Clear frame number while freeing slot" 2015-05-04 16:57:54 +00:00
Dan Stoza
24056507af libgui: Clear frame number while freeing slot
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
(cherry picked from commit 52937cd9a5)
2015-05-01 16:48:35 -07:00
Mark Salyzyn
dfe7e7e63f Merge "dumpstate: report per-partition MMC performance" 2015-05-01 21:48:51 +00:00
Dan Stoza
bb58111c22 Merge "SurfaceFlinger: Fix PTS on stale buffers" 2015-05-01 20:28:47 +00:00
Dan Stoza
2e36f2283f SurfaceFlinger: Fix PTS on stale buffers
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
2015-04-30 15:29:05 -07:00
Dan Stoza
32d4b6c8e1 Merge "SurfaceFlinger: Limit to 4k Layers" 2015-04-30 22:09:38 +00:00
Dan Stoza
676d10b270 Merge "SurfaceFlinger: Fix integer overflow in Mesh ctor" 2015-04-30 21:57:15 +00:00
Dan Stoza
ed6e907bc7 Merge "Close Fence FDs in error cases of Surface and GraphicBufferMapper" 2015-04-30 21:49:40 +00:00
Dan Stoza
e7f8dde3f3 SurfaceFlinger: Limit to 4k Layers
Sets a limit of 4k Layers which SurfaceFlinger will allow to be in
existence at any given time. An attempt to create Layers in excess of
this limit will fail with NO_MEMORY.

Bug: 20674586
Change-Id: I2dfaf59643d826f982b2fa44e8a9ed643176d972
2015-04-30 14:29:30 -07:00
Mark Salyzyn
540e3de99f dumpstate: report per-partition MMC performance
Change-Id: If5cabe186d8377056effa1c0672a90e277cd7221
2015-04-30 12:58:32 -07:00
Dan Stoza
ab79e33ef3 SurfaceFlinger: Fix integer overflow in Mesh ctor
Performs range checking on the inputs to Mesh::Mesh() before allocating
the storage array.

Bug: 20674682
Change-Id: I4fc918a8c312d967dd6d9f91a098b2e0a7081027
2015-04-30 12:44:03 -07:00
Dan Stoza
08a7c79284 Merge "Remove gamma correction from color correction shader" 2015-04-30 19:36:30 +00:00
Dan Stoza
f0c17b0831 Merge "Avoid closing invalid FD in Surface and GraphicBufferMapper" 2015-04-30 16:34:11 +00:00
Taiju Tsuiki
dcfe91e1f3 Avoid closing invalid FD in Surface and GraphicBufferMapper
GraphicBufferMapper::lockAsync{,YCbCr} close the fence FD even when the FD
is invalid.

Change-Id: Ia2b4dae3b2c06426e34f623f19ba92435f486ab7
2015-04-30 22:56:25 +09:00
Taiju Tsuiki
c7263fb432 Close Fence FDs in error cases of Surface and GraphicBufferMapper
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
2015-04-30 22:55:36 +09:00
Alan Viverette
ad84681d31 Remove gamma correction from color correction shader
Gamma correction was incorrectly skewing both color inversion and
Daltonization, which resulted in washed-out colors.

Bug: 20346301
Change-Id: I34d879f902c3be115b2d23f09c3ed3902799759e
(cherry picked from commit 3acd9f1d8f)
2015-04-29 12:27:18 -07:00
Dan Stoza
8de71a2408 Merge "BufferQueue: Add NATIVE_WINDOW_BUFFER_AGE query" 2015-04-29 17:21:51 +00:00
Dan Stoza
ca8c569598 Merge "libgui: Implement onTransact for sideband streams" 2015-04-29 17:17:52 +00:00
Nick Kralevich
becd89d185 Merge "Parcel.cpp: use calloc instead of malloc" 2015-04-29 04:16:23 +00:00
Nick Kralevich
6329f0199e Parcel.cpp: use calloc instead of malloc
Bug: 20669363
Change-Id: Ia4c8d8ca9d8b4b87954d7267e8b1c94cf4e570e1
2015-04-28 16:21:30 -07:00
Dan Stoza
81cde67a55 BufferQueue: Add NATIVE_WINDOW_BUFFER_AGE query
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
2015-04-28 14:26:05 -07:00
Dan Stoza
17166698d9 libgui: Implement onTransact for sideband streams
Implements the GET_SIDEBAND_STREAM case of
IGraphicBufferConsumer::onTransact

Change-Id: I46138b87ce2d70dde48b3561dcd378ce5fd8f383
2015-04-28 13:23:18 -07:00
Dan Stoza
b5c7ccfdc7 Merge "libgui: Change detachNextBuffer to return sp<GB>" 2015-04-28 17:36:54 +00:00
Dan Stoza
745ac038b9 libgui: Change detachNextBuffer to return sp<GB>
Changes Surface::detachNextBuffer to return an sp<GraphicBuffer>
instead of an ANativeWindowBuffer* to ensure that reference counting
works correctly.

Bug: 20092217
Change-Id: I3979ea6121aaf14845f0554477b778770413581e
2015-04-27 11:16:15 -07:00
Andreas Gampe
bec3de4ac5 Merge "Installd: Add debug.gencfi to run_dex2oat" 2015-04-27 15:14:43 +00:00
Andreas Gampe
816243d470 Installd: Add debug.gencfi to run_dex2oat
Add the debug.gencfi system property that forces generation of
CFI data.

Change-Id: Ida66f8c1567634d05cfdbba1a982be3684e94369
2015-04-27 08:12:23 -07:00
Michael Wright
7ecc8952c4 Merge "Check orientation range has been initialized first" 2015-04-27 14:13:22 +00:00
Dan Stoza
958f501189 Merge "libgui: Allow an IGBProducer to disable allocation" 2015-04-24 15:50:10 +00:00
Dan Stoza
fb6d43ff44 Merge "libgui: Change BufferQueue to use free lists" 2015-04-24 15:48:38 +00:00