Commit Graph

1558 Commits

Author SHA1 Message Date
Svetoslav b412f6e203 Add body sensors app op - framework native
Change-Id: I727a2bb1e28ae9158f2df9c74dd0aee977dfd47f
2015-05-01 13:51:45 -07:00
Dan Stoza 7b2fc93007 Merge "SurfaceFlinger: Limit to 4k Layers" into mnc-dev 2015-04-30 22:12:46 +00:00
Dan Stoza 7d89d06a6f 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
(cherry picked from commit e7f8dde3f3)
2015-04-30 15:10:00 -07:00
Dan Stoza aa4041f70a 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
(cherry picked from commit ab79e33ef3)
2015-04-30 14:57:41 -07:00
Alan Viverette 3acd9f1d8f 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
2015-04-28 17:15:57 -07:00
Aravind Akella cc60dc2128 Merge "Enable data injection mode in SensorService." 2015-04-25 01:40:35 +00:00
Dan Stoza 6febf6c150 am 5d10894c: am ef47c080: am 958f5011: Merge "libgui: Allow an IGBProducer to disable allocation"
* commit '5d10894c9d547449cf231f02b736da9dfdebec11':
  libgui: Allow an IGBProducer to disable allocation
2015-04-24 16:33:38 +00:00
Dan Stoza 5d10894c9d am ef47c080: am 958f5011: Merge "libgui: Allow an IGBProducer to disable allocation"
* commit 'ef47c080fd0e7fb8bf1fc4b0ecadae277a22f2cf':
  libgui: Allow an IGBProducer to disable allocation
2015-04-24 16:12:30 +00:00
Aravind Akella a9e6cc3870 Enable data injection mode in SensorService.
Change-Id: I0cd32a017235c31c54816e4a357ce3b988350ed6
2015-04-23 17:42:37 -07:00
Dan Stoza 9de7293b0a libgui: Allow an IGBProducer to disable allocation
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
2015-04-23 15:28:12 -07:00
Dan Stoza c7a3cd6228 am 423b40f7: am 368270fd: am de5c15b8: Merge "SF: Always perform sideband transactions"
* commit '423b40f7bd004a8ab5bca887e3855cd20c6bcc28':
  SF: Always perform sideband transactions
2015-04-23 02:17:42 +00:00
Dan Stoza 423b40f7bd am 368270fd: am de5c15b8: Merge "SF: Always perform sideband transactions"
* commit '368270fd6d4681d2de5502ffc6194ade9a13e65a':
  SF: Always perform sideband transactions
2015-04-23 00:17:59 +00:00
Dan Stoza 9e9b044554 SF: Always perform sideband transactions
On normal Layers, we defer applying resize transactions until a buffer
of the correct size arrives. This breaks with sideband streams, because
buffers are not seen by SurfaceFlinger. This change applies
transactions immediately for Layers which have a sideband stream
attached to avoid that problem.

Bug: 20428254
Change-Id: I379d8aaef460d467cdf8432764b4a504928fb65a
(cherry picked from commit c300b8b506536e1bf94ffd8a3b75d46e776923e0)
2015-04-22 16:53:15 -07:00
Michael Wright e893dddb3f Merge "Default to TOOL_TYPE_STYLUS for external stylus events." 2015-04-21 21:46:32 +00:00
Michael Wright 5e17a5de88 Increase stylus data timeout.
Temporarily increase the stylus timeout while we figure out where the
delay in BT information is coming from.

Change-Id: I27ab5a4db4ad14358c6e6803961612420371fce9
2015-04-21 22:45:13 +01:00
Michael Wright 45ccacf937 Default to TOOL_TYPE_STYLUS for external stylus events.
Change-Id: Ife6a7c4802e8b1ec1ff8445e639f8a6d90a00592
2015-04-21 22:41:15 +01:00
Michael Wright e2434fecb9 Revert "Increase stylus data timeout."
This reverts commit 8b0673ce0c.
2015-04-21 22:37:02 +01:00
Michael Wright 8b0673ce0c Increase stylus data timeout.
Sometimes stylus data will be delayed by 30 - 40ms. By increasing the
timeout we pretty much always pick up stylus data and the touch
latency feels surprisingly small.

Change-Id: I39f5b9037ce0444b1e957149d3f1c3a3137804cb
2015-04-21 15:06:43 +01:00
Michael Wright 4af18b90c1 Always update external stylus state.
This prevents us from dropping any states (namely the pressure
transition from non-zero to zero) if we get the touch up before we
get the stylus data.

Change-Id: Ifc198628d35b7079dc5ec23d81f9681d122757a0
2015-04-20 22:03:54 +01:00
Michael Wright b85401d4ba Mark all InputReaderContext methods as pure virtual
Also, fix the build.

Change-Id: I45d3daa8c0710b2f9421e8ffd011d2d39c05e030
2015-04-17 18:35:15 +01:00
Michael Wright 842500e146 Fuse stylus and touch screen data.
TODO: Ensure we dispatch new pressure and button data when stylus
is stationary.

Change-Id: I10a665a9b81ff4b9acd01bf72f0fc2e0c2abc203
2015-04-17 16:37:16 +00:00
Tim Kilbourn e5364c8c02 Add method stubs for input device properties.
Change-Id: Icd785cb55ae2b225102fa249240837a91a41aae3
2015-04-16 11:12:49 -07:00
Dan Stoza d5296b342e am 66dc4ee3: am b47584f4: am 2e398e64: Merge "SF: Permit changing DispSync offsets at runtime"
* commit '66dc4ee3729c4e6fea624805a1e58843ce920477':
  SF: Permit changing DispSync offsets at runtime
2015-04-15 22:16:03 +00:00
Dan Stoza 66dc4ee372 am b47584f4: am 2e398e64: Merge "SF: Permit changing DispSync offsets at runtime"
* commit 'b47584f46bd850723679d9212f66df1951bbdf5d':
  SF: Permit changing DispSync offsets at runtime
2015-04-15 21:54:30 +00:00
Dan Stoza 91dea34652 am 19f06de0: am 40b2a8b4: am e7d20eb0: Merge "SurfaceFlinger: Pass surface damage to HWC"
* commit '19f06de0930e0f741ed113c37faf306fceee39bd':
  SurfaceFlinger: Pass surface damage to HWC
2015-04-15 21:42:44 +00:00
Dan Stoza 19f06de093 am 40b2a8b4: am e7d20eb0: Merge "SurfaceFlinger: Pass surface damage to HWC"
* commit '40b2a8b48c8b760699bde3f29e3dbee76015cc98':
  SurfaceFlinger: Pass surface damage to HWC
2015-04-15 20:57:33 +00:00
Dan Stoza db4ac3ce63 SF: Permit changing DispSync offsets at runtime
This modifies EventThread such that its phase offsets for both
Choreographer and SurfaceFlinger may be modified at runtime. It also
plumbs this functionality up to the SurfaceFlinger debug interface so
that it is possible to rapidly test different offsets without
restarting the framework.

Change-Id: I426873f8553f931250dfebc9a8a4a78e9f1f4309
2015-04-15 13:56:28 -07:00
Dan Stoza ee44edd0ac SurfaceFlinger: Pass surface damage to HWC
Passes the surface damage from the incoming SurfaceFlingerConsumer
BufferQueue down to the hardware composer HAL interface, if the
HWC version number is 1.5 or greater.

Bug: 11239309
Change-Id: Ic4305210593874a8d6deba3319055b2b8c57e926
2015-04-15 13:20:01 -07:00
Jeff Brown 3bfe51d790 Bypass surface flinger permission check for calls from system.
Early during the boot, before activity manager is ready to handle
permission checks, the system needs to be able to change the display
state.  Added a hardcoded exemption for AID_SYSTEM (which already
has permission to talk to surface flinger anyhow).

Bug: 19029490
Change-Id: I6222edcab8e394e5fb6adf7a982be446e4505a1e
2015-04-10 20:26:51 -07:00
Tim Kilbourn 063ff53d0b Pass through availability of audio mic for input devices.
Bug: 15374820
Change-Id: Id2ca6da10165e3a887ebfbb18f663a3bf316ac79
2015-04-09 10:02:16 -07:00
Eino-Ville Talvala 1c2001efcf Cherry-pick dataSpace and BufferItem changes
Add dataSpace to buffer queues; remove old format enums.
(cherry picked from commit 82c6bcc970)

libgui: Prepare for IGBC::BufferItem removal
(cherry picked from commit cf3834db10)

SurfaceFlinger: Stop using IGBC::BufferItem
(cherry picked from commit 11611f9be5)

Change-Id: Ic2e4770b916d2d1477e5ce98c4b49a0072ea03ff
(cherry picked from commit 6c45010175)
2015-04-07 11:11:43 -07:00
Tim Kilbourn 943f0a45d0 Merge "Stub implementations of HAL usage callbacks." 2015-03-31 20:22:44 +00:00
Tim Kilbourn 62535f0936 Merge "Use EPOLLWAKEUP properly." 2015-03-27 16:24:15 +00:00
Tim Kilbourn 3447df165f Use EPOLLWAKEUP properly.
We were trying to use it only when it wasn't supported.

Bug: 19937342
Change-Id: Id35aef9ad84f101f7ada2eb87fb91e5c5e2b3357
2015-03-26 14:12:42 -07:00
Aravind Akella 4949c50372 Support restricted mode in SensorService.
In restricted mode, only CTS tests can register for sensors or call flush() on them. The requests
from other applications will be ignored.

Change-Id: Ieb923df3e0cfe3390fe2d052af776da79589744b
2015-03-24 15:41:35 -07:00
Jesse Hall 5b20fd0882 am 28c03cca: am c2a5b469: am a527c07b: Merge "Fix mistake using width instead of height."
* commit '28c03cca9835957f6e304b18358243b184fa46f8':
  Fix mistake using width instead of height.
2015-03-24 21:20:24 +00:00
Jesse Hall 28c03cca98 am c2a5b469: am a527c07b: Merge "Fix mistake using width instead of height."
* commit 'c2a5b469a311891d8e3025aea0e4b348044dfaeb':
  Fix mistake using width instead of height.
2015-03-24 21:06:56 +00:00
Jesse Hall c2a5b469a3 am a527c07b: Merge "Fix mistake using width instead of height."
* commit 'a527c07b8d078f7da1114b7055f65b479a148729':
  Fix mistake using width instead of height.
2015-03-24 20:59:51 +00:00
Christopher Ferris 0e7497957a Fix mistake using width instead of height.
Found by rodrigo.chiossi@intel.com.

Change-Id: I49d590ed39f6b47ba58a77a75d66b2964ea1cb1d
2015-03-23 14:37:26 -07:00
Dan Stoza 11611f9be5 DO NOT MERGE SurfaceFlinger: Stop using IGBC::BufferItem
Switches all uses of IGraphicBufferConsumer::BufferItem (and
BufferQueue::BufferItem) to the BufferItem in libgui. Depends on
frameworks/native I699ed0a6837076867ca756b28d1ffb2238f7a0d9.

Cherry pick of I187b3a7d05196b6289596afac8fb9a9d4aebff76

Change-Id: I5bc79fb96b6cba6021af64b20890967aa3b7fcbf
2015-03-19 13:59:12 -07:00
Eino-Ville Talvala 82c6bcc970 DO NOT MERGE Add dataSpace to buffer queues; remove old format enums.
- 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
2015-03-19 13:56:00 -07:00
Dan Stoza 7ab0d37dbf am 3d5efd55: Merge "libgui: Enable -Weverything and -Werror"
* commit '3d5efd553ea433e81464b0b817b3455716884bb0':
  libgui: Enable -Weverything and -Werror
2015-03-19 17:19:28 +00:00
Dan Stoza 3be1c6b60a libgui: Enable -Weverything and -Werror
Enables -Weverything and -Werror, with just a few exceptions for
warnings we can't (or shouldn't need to) work around.

Cherry pick of I034abec27bf4020d84af60d7acc1939c59986dd6 plus a
couple of minor changes to CpuConsumer.cpp to make it work with a
prior change:
    Uncomment CC_LOGV on line 46
    Change C-style cast to static_cast on line 71

Change-Id: Iaec610477ea0122317b0578fb74caf2383d4cf08
2015-03-18 15:57:27 -07:00
Dan Stoza 84493cd420 SurfaceFlinger: Stop using IGBC::BufferItem
Switches all uses of IGraphicBufferConsumer::BufferItem (and
BufferQueue::BufferItem) to the BufferItem in libgui. Depends on
frameworks/native I699ed0a6837076867ca756b28d1ffb2238f7a0d9.

Change-Id: I187b3a7d05196b6289596afac8fb9a9d4aebff76
2015-03-12 15:12:44 -07:00
Dan Stoza 35283ef01b am 105aa28e: am b275b4dc: am 3949f664: Merge "SurfaceFlinger: Fix null pointer exception"
* commit '105aa28eeff9d31eebc7645aecb7630918a09b2a':
  SurfaceFlinger: Fix null pointer exception
2015-03-10 15:48:55 +00:00
Dan Stoza 105aa28eef am b275b4dc: am 3949f664: Merge "SurfaceFlinger: Fix null pointer exception"
* commit 'b275b4dc3e5dcbae1e171bd51165a93f16332ef4':
  SurfaceFlinger: Fix null pointer exception
2015-03-09 18:09:17 +00:00
Dan Stoza b275b4dc3e am 3949f664: Merge "SurfaceFlinger: Fix null pointer exception"
* commit '3949f664c71ad1269ee0c921d176e3b4484015cc':
  SurfaceFlinger: Fix null pointer exception
2015-03-09 18:05:26 +00:00
Dan Stoza 24a42e9f54 SurfaceFlinger: Fix null pointer exception
Fixes a null pointer exception in getActiveConfig

Bug: 19416124
Change-Id: I45a01f67affb63a348866ce42a6013c5eb71fe8f
2015-03-09 10:04:11 -07:00
Eino-Ville Talvala 94d5ac4802 Merge "Add dataSpace to buffer queues; remove old format enums." 2015-03-06 22:13:07 +00:00
Dan Stoza b90cf07f8b SurfaceFlinger: Add --static-screen stats
Adds a --static-screen option to dumpsys SurfaceFlinger, which
displays screen-on time broken down by the time between the prior
frame and the current frame. An example dump looks like this:

$ adb shell dumpsys SurfaceFlinger --static-screen
Static screen stats:
  < 1 frames: 12.235 s (3.5%)
  < 2 frames: 29.898 s (8.7%)
  < 3 frames: 15.370 s (4.4%)
  < 4 frames: 13.103 s (3.8%)
  < 5 frames: 15.780 s (4.6%)
  < 6 frames: 2.022 s (0.6%)
  < 7 frames: 0.201 s (0.1%)
  7+ frames: 256.887 s (74.4%)

The buckets are exclusive, so '< 3 frames' covers the interval
[2, 3) frames

Bug: 19543586
Change-Id: I3253a54c23995d25e96016997acedd0775956b60
2015-03-05 14:43:08 -08:00