Commit Graph

1809 Commits

Author SHA1 Message Date
Aravind Akella ce5af4b234 am 52720f45: Merge "Use LOCATION_HARDWARE permission for data injection." into mnc-dev
* commit '52720f45098e9aed57c906e64a13e4a4a2173ce8':
  Use LOCATION_HARDWARE permission for data injection.
2015-06-11 02:08:19 +00:00
Aravind Akella 52720f4509 Merge "Use LOCATION_HARDWARE permission for data injection." into mnc-dev 2015-06-10 22:56:27 +00:00
Aravind Akella a8814ce478 Use LOCATION_HARDWARE permission for data injection.
Change-Id: Ie81cb0d5f537d5431f2127891cca1d39c969ee7b
2015-06-10 15:15:57 -07:00
Dan Stoza d1adebc2da am 355950c1: am d177e044: Merge "SF: Swap w/h when capturing rotated screenshots" into mnc-dev
* commit '355950c1fc19c35c75203ea761882168f0980181':
  SF: Swap w/h when capturing rotated screenshots
2015-06-10 18:08:31 +00:00
Dan Stoza 355950c1fc am d177e044: Merge "SF: Swap w/h when capturing rotated screenshots" into mnc-dev
* commit 'd177e044d129bbecc3900a7fcd442b354de768df':
  SF: Swap w/h when capturing rotated screenshots
2015-06-10 17:52:50 +00:00
Michael Wright a393c62f22 am f8b34319: am 043bd36b: Merge "Only log dropped input when disabled for the first event." into mnc-dev
* commit 'f8b34319a4c1ccce63b5a8e4732f162d228085cb':
  Only log dropped input when disabled for the first event.
2015-06-10 17:47:58 +00:00
Dan Stoza 65dc7eeff0 SF: Swap w/h when capturing rotated screenshots
Swaps width and height when capturing a screenshot that is rotated by
90 or 270 degrees.

Bug: 8433742
Change-Id: Ibf0b604f541e3cc271e56fe0ad04dc366beb5d79
(cherry picked from commit 3502416204)
2015-06-10 10:33:21 -07:00
Michael Wright f8b34319a4 am 043bd36b: Merge "Only log dropped input when disabled for the first event." into mnc-dev
* commit '043bd36b0d50efa81d010c64009317af160d5fec':
  Only log dropped input when disabled for the first event.
2015-06-10 17:32:41 +00:00
Dan Stoza d177e044d1 Merge "SF: Swap w/h when capturing rotated screenshots" into mnc-dev 2015-06-10 17:28:33 +00:00
Michael Wright 043bd36b0d Merge "Only log dropped input when disabled for the first event." into mnc-dev 2015-06-10 17:08:03 +00:00
Tim Kilbourn 82cdd76e60 Merge "Mock out more inputflinger host functions" 2015-06-10 16:38:42 +00:00
Michael Wright 3a98172289 Only log dropped input when disabled for the first event.
Bug: 19851495
Change-Id: I8cb8076723c1ca1732c3bc37f283d8eb48b7bee0
2015-06-10 15:26:13 +01:00
Dan Stoza 3502416204 SF: Swap w/h when capturing rotated screenshots
Swaps width and height when capturing a screenshot that is rotated by
90 or 270 degrees.

Bug: 8433742
Change-Id: Ibf0b604f541e3cc271e56fe0ad04dc366beb5d79
2015-06-09 16:46:20 -07:00
Dan Stoza 074a13a3cb SF: Don't crop surface damage against viewport
Apply the display transform to surface damage, but don't intersect it
with the viewport.

Bug: 21486007
Change-Id: I94e697cea52096a960385d5f3b89609fdcf30a02
(cherry picked from commit 17833a1b0d)
2015-06-09 13:27:45 -07:00
Dan Stoza 53a2e97a78 libgui/SurfaceFlinger: Add getConsumerName
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
(cherry picked from commit c6f30bdee1)
2015-06-09 11:28:37 -07:00
Tim Kilbourn c472986d4c Mock out more inputflinger host functions
Change-Id: I3de1e95930578410d8f7c1e77329c00f05b72325
2015-06-08 14:44:33 -07:00
Dan Stoza 271b69c4df am bcb868db: am c6f30bde: libgui/SurfaceFlinger: Add getConsumerName
* commit 'bcb868db922b7114e2a295282da723e1bad585f3':
  libgui/SurfaceFlinger: Add getConsumerName
2015-06-08 18:38:53 +00:00
Dan Stoza 993772a60a libgui: Add generation numbers to BufferQueue
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
(cherry picked from commit 812ed0644f)
2015-06-08 11:18:16 -07:00
Dan Stoza bcb868db92 am c6f30bde: libgui/SurfaceFlinger: Add getConsumerName
* commit 'c6f30bdee1f634eb90d68cb76efe935b6535a1e8':
  libgui/SurfaceFlinger: Add getConsumerName
2015-06-08 17:18:52 +00:00
Dan Stoza c6f30bdee1 libgui/SurfaceFlinger: Add getConsumerName
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
2015-06-08 09:40:49 -07:00
Dan Stoza 57f50e6a1e am d7214d62: am 9d2c5a7c: Merge "libgui: Add generation numbers to BufferQueue" into mnc-dev
* commit 'd7214d62639f02db9a420eb3f97259a4c909da45':
  libgui: Add generation numbers to BufferQueue
2015-06-05 16:07:35 +00:00
Dan Stoza a697ab7088 am 37fea879: am 17833a1b: SF: Don\'t crop surface damage against viewport
* commit '37fea879609963703e75f46cb3267fa86d1f2bd2':
  SF: Don't crop surface damage against viewport
2015-06-05 16:07:34 +00:00
Dan Stoza d7214d6263 am 9d2c5a7c: Merge "libgui: Add generation numbers to BufferQueue" into mnc-dev
* commit '9d2c5a7c678bd384df0fb29952cf8943e7b1b160':
  libgui: Add generation numbers to BufferQueue
2015-06-05 16:00:13 +00:00
Dan Stoza 37fea87960 am 17833a1b: SF: Don\'t crop surface damage against viewport
* commit '17833a1b0d70cd5cea342cadea9fdbbf16748bc6':
  SF: Don't crop surface damage against viewport
2015-06-05 16:00:12 +00:00
Dan Stoza 9d2c5a7c67 Merge "libgui: Add generation numbers to BufferQueue" into mnc-dev 2015-06-05 15:38:35 +00:00
Dan Stoza 17833a1b0d SF: Don't crop surface damage against viewport
Apply the display transform to surface damage, but don't intersect it
with the viewport.

Bug: 21486007
Change-Id: I94e697cea52096a960385d5f3b89609fdcf30a02
2015-06-04 19:41:06 -07:00
Tim Kilbourn 895a1bfc60 Merge "Basic implementation of input device properties." 2015-06-03 21:26:07 +00:00
Dan Stoza 812ed0644f libgui: Add generation numbers to BufferQueue
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
2015-06-03 11:09:33 -07:00
Dan Stoza 407cabe503 am 958e9bbd: am 75145aa2: Merge "SF: Reduce resync samples without present"
* commit '958e9bbdc6a048da386c62a71adcde5ec8a78cdd':
  SF: Reduce resync samples without present
2015-06-01 18:43:57 +00:00
Dan Stoza ef78916d86 SF: Reduce resync samples without present
Reduces the number of resync samples that DispSync will attempt to
collect without an intervening present from 12 to 4. The former value
was causing excessive power draw for some vendors' implementations, and
reducing it doesn't seem to harm anything.

Bug: 20724456
Change-Id: Ifd6e0490be67756ed001d509a38e8a36953b4618
(cherry picked from commit 9c64757f65)
2015-06-01 11:26:34 -07:00
Tim Kilbourn 3e38aad022 Basic implementation of input device properties.
The input host can load an idc file and pass the resulting property
map to a HAL module.

Change-Id: Ic8188c9eca193c78686ff67680cf37be91c47526
2015-06-01 10:54:47 -07:00
Dan Stoza 9c64757f65 SF: Reduce resync samples without present
Reduces the number of resync samples that DispSync will attempt to
collect without an intervening present from 12 to 4. The former value
was causing excessive power draw for some vendors' implementations, and
reducing it doesn't seem to harm anything.

Bug: 20724456
Change-Id: Ifd6e0490be67756ed001d509a38e8a36953b4618
2015-05-29 13:00:23 -07:00
Dan Stoza 42ace4b5c6 SurfaceFlinger: Tweak whitespace in DdmConnection
Change-Id: I99e7b09e4bc3611ffb790eddfbb9b3c8b9bc5d4c
2015-05-28 14:23:54 -07:00
Jeff Brown 8b04725f14 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
(cherry picked from commit 3bfe51d790)
2015-05-28 14:19:22 -07:00
Ajay Dudani ae569747b6 surfaceflinger: Fix range check for getFormat
Fix potential buffer overflow error in getFormat with indices
greater than MAX_HWC_DISPLAYS.

Change-Id: I5e5b69d8d043e900f5e33ca9a62e94ae5f857b68
(cherry picked from commit 4e3e30c2d5)
2015-05-28 14:19:10 -07:00
Dan Stoza 8e8eba5091 SF: Skip render-to-texture for color transforms
In cases where SurfaceFlinger is applying a color matrix (usually for
accessibility features), we previously would perform a render-to-
texture for the initial composition, and then apply the matrix during
a copy to the framebuffer. This changes that behavior to just apply the
matrix during composition without a render-to-texture pass.

This may result in a perceived change of the image in cases with alpha
blending, since the blending is performed at a different stage of the
pipeline and the system effectively performs non-linear blends.
However, neither this nor the prior render-to-texture pass is strictly
correct in that regard, and this approach is less error-prone and
likely faster.

Change-Id: I2110ff0374f61d76df7b087dde8a1ed98990440c
(cherry picked from commit f008799d37)
2015-05-28 13:35:39 -07:00
Michael Lentine d74ba85c6f Add hotplug support for primary display.
When the primary is connected/disconnected on tv devices HWComposer updates
it's display parameters but doesn't destroy or recreate the display.

Bug: 18698244

Change-Id: I759c8f75d3e3a7462b85eb51973fb5072b71a702
(cherry picked from commit 10613dc3b5)
2015-05-28 13:35:24 -07:00
Michael Lentine b64d875152 Fix surfaceflinger tests.
Update the screenshot code and add correct return values to surface flinger's
capturescreenshot function.

Buf: 18138368

Change-Id: Ieb42d289088589f941502fbd69da7aa939265e07
(cherry picked from commit 5a16a62950)
2015-05-28 13:33:25 -07:00
Dan Stoza 4808980eec am f008799d: SF: Skip render-to-texture for color transforms
* commit 'f008799d3753e52c10849824ff8146985ea66284':
  SF: Skip render-to-texture for color transforms
2015-05-28 18:26:40 +00:00
Dan Stoza f008799d37 SF: Skip render-to-texture for color transforms
In cases where SurfaceFlinger is applying a color matrix (usually for
accessibility features), we previously would perform a render-to-
texture for the initial composition, and then apply the matrix during
a copy to the framebuffer. This changes that behavior to just apply the
matrix during composition without a render-to-texture pass.

This may result in a perceived change of the image in cases with alpha
blending, since the blending is performed at a different stage of the
pipeline and the system effectively performs non-linear blends.
However, neither this nor the prior render-to-texture pass is strictly
correct in that regard, and this approach is less error-prone and
likely faster.

Change-Id: I2110ff0374f61d76df7b087dde8a1ed98990440c
2015-05-27 13:32:51 -07:00
Michael Lentine a71c03e9fa am 7fc3ef0e: Merge "Add hotplug support for primary display." into mnc-dev
* commit '7fc3ef0eb0077eedaa09a7b505b6ec067e814170':
  Add hotplug support for primary display.
2015-05-27 20:24:54 +00:00
Michael Lentine a6d93f5573 am 20828e63: Merge "Fix surfaceflinger tests." into mnc-dev
* commit '20828e633dd929b87c0297dadcdebb867f2b41d4':
  Fix surfaceflinger tests.
2015-05-22 22:09:01 +00:00
Michael Lentine 10613dc3b5 Add hotplug support for primary display.
When the primary is connected/disconnected on tv devices HWComposer updates
it's display parameters but doesn't destroy or recreate the display.

Bug: 18698244

Change-Id: I759c8f75d3e3a7462b85eb51973fb5072b71a702
2015-05-22 13:14:57 -07:00
Michael Lentine 5a16a62950 Fix surfaceflinger tests.
Update the screenshot code and add correct return values to surface flinger's
capturescreenshot function.

Buf: 18138368

Change-Id: Ieb42d289088589f941502fbd69da7aa939265e07
2015-05-22 13:14:57 -07:00
Michael Wright baaeb2b83f am 7c000280: Merge changes from topic \'button_actions\' into mnc-dev
* commit '7c000280a57f352c2485dcaea1d5bfe20f7bfe63':
  Fix input tests to work with new MotionEvent member
  Revert "Revert "Add new MotionEvent actions for button press and release.""
2015-05-14 19:29:01 +00:00
Michael Wright c01f5d2e19 am c921ce26: Merge "Revert "Add new MotionEvent actions for button press and release."" into mnc-dev
* commit 'c921ce268155e8e1d75bd423514bb5a3ee363440':
  Revert "Add new MotionEvent actions for button press and release."
2015-05-14 19:28:18 +00:00
Michael Wright 9897516aba am f27e6681: Merge "Add new MotionEvent actions for button press and release." into mnc-dev
* commit 'f27e6681048f3ee7a589ab824a1041667ff838e0':
  Add new MotionEvent actions for button press and release.
2015-05-14 19:28:10 +00:00
Dan Stoza 7472fa996a am 81103f12: am 553cbb25: Merge "SurfaceFlinger: Handle EGL errors more cleanly"
* commit '81103f128d651d705c90b3ab9fe55bff674320ef':
  SurfaceFlinger: Handle EGL errors more cleanly
2015-05-14 18:19:03 +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
Dan Stoza 4794879186 Merge "SurfaceFlinger: Handle EGL errors more cleanly" into mnc-dev 2015-05-14 17:42:21 +00:00
Dan Stoza 65476f3332 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
2015-05-14 09:48:19 -07:00
Michael Wright 7c000280a5 Merge changes from topic 'button_actions' into mnc-dev
* changes:
  Fix input tests to work with new MotionEvent member
  Revert "Revert "Add new MotionEvent actions for button press and release.""
2015-05-14 15:31:21 +00:00
Michael Wright 7b159c9a4f Revert "Revert "Add new MotionEvent actions for button press and release.""
This reverts commit 70b41ef580.
2015-05-14 14:48:03 +01:00
Michael Wright c921ce2681 Merge "Revert "Add new MotionEvent actions for button press and release."" into mnc-dev 2015-05-14 13:47:13 +00:00
Michael Wright 70b41ef580 Revert "Add new MotionEvent actions for button press and release."
This reverts commit 48a8a0e432.
2015-05-14 14:46:17 +01:00
Michael Wright f27e668104 Merge "Add new MotionEvent actions for button press and release." into mnc-dev 2015-05-14 13:31:25 +00:00
Michael Wright 48a8a0e432 Add new MotionEvent actions for button press and release.
Introduce ACTION_BUTTON_PRESS and ACTION_BUTTON_RELEASE as actions to
signal a button press or release. If these actions happen
simulanteously with a DOWN or UP event then they're explicitly
ordered to happen after the DOWN or preceding the UP in order to send
them to the most recently targeted view.

Also, introduce new stylus button constants that differ from the
constants we use for mouse buttons.

Bug: 20704355
Change-Id: Ib960a5004db5429ad2fc8db020704773e2978327
2015-05-14 13:25:41 +01:00
Michael Wright 9e40093346 am 4866f087: Merge "Use previous pressure value if the current fusion data is zero." into mnc-dev
* commit '4866f087181af02e870b2d2fc1d4be8d38c2f36e':
  Use previous pressure value if the current fusion data is zero.
2015-05-13 17:15:46 +00:00
Michael Wright eab5a1ed7c am 4eed0f8f: Merge "Synthesize events for pressure and button changes." into mnc-dev
* commit '4eed0f8f8dd3673e55a93c0b62b8b9ebefa135cf':
  Synthesize events for pressure and button changes.
2015-05-13 17:15:46 +00:00
Dan Stoza 119a03c5a2 am 09d561db: Merge "Fix PTS handling for buffer replacement" into mnc-dev
* commit '09d561dbee9a28db9632ff3d51f633c18aefe023':
  Fix PTS handling for buffer replacement
2015-05-13 17:15:45 +00:00
Michael Wright 4866f08718 Merge "Use previous pressure value if the current fusion data is zero." into mnc-dev 2015-05-13 16:56:07 +00:00
Michael Wright 4eed0f8f8d Merge "Synthesize events for pressure and button changes." into mnc-dev 2015-05-13 16:55:48 +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
Dan Stoza 09d561dbee Merge "Fix PTS handling for buffer replacement" into mnc-dev 2015-05-13 16:34:07 +00:00
Dan Stoza a4650a50a0 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
2015-05-12 13:10:17 -07:00
Aravind Akella d0e95fed02 am af8ed3f0: Merge "Improve logging in SensorService dump output." into mnc-dev
* commit 'af8ed3f06cf5a0fd37357b438da803f53f33fa56':
  Improve logging in SensorService dump output.
2015-05-12 19:30:30 +00:00
Aravind Akella af8ed3f06c Merge "Improve logging in SensorService dump output." into mnc-dev 2015-05-12 19:12:43 +00:00
Aravind Akella 444f267572 Improve logging in SensorService dump output.
Maintain a per sensor circular buffer of last 10 sensor_events and the wall clock time
at which each event is received.

Change-Id: Ia50c825ab5a7aaf0932ce7dce7ac8b9be7071e77
2015-05-12 11:44:01 -07:00
Dan Stoza c340dc0a75 am dc13c5b8: libgui: Hook up onFrameReplaced
* commit 'dc13c5b85b099050c73297a19f1ef89308f7620b':
  libgui: Hook up onFrameReplaced
2015-05-12 16:49:10 +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
Michael Wright 53dca3aadd Use previous pressure value if the current fusion data is zero.
Occasionally we'll receive the stylus up signal (pressure = 0) before
we receive the touch screen up signal. Rather than giving pointer a
pressure value of 0 (which is one of the signals of hovering) or
falling back to the touchscreen pressure values (which would make for
an inconsistent stream), use the previous pressure value which should
always be non-zero for a stream of fused data.

Bug: 20449776
Change-Id: I71eb97e7c4ea53e42b0eb54fc1f8ae7f89aad9d1
2015-05-12 14:17:42 +01:00
Michael Wright 43fd19fd1a Synthesize events for pressure and button changes.
Even when there isn't movement on the touchscreen we should produce
events for pressure and button state changes generated by external
stylii.

Change-Id: I9fd7ba85902d5d6bfb28d5e5ff5d8f340a94c2bf
2015-05-12 14:08:47 +01:00
Dan Stoza dc13c5b85b libgui: Hook up onFrameReplaced
This completes the plumbing from ConsumerListener::onFrameReplaced into
SurfaceFlinger (and other consumers that may care).

Change-Id: I376e78ace95d6748e8662e6b4d47c0dfa697a300
2015-05-11 15:33:01 -07:00
Aravind Akella adc3b4cd8f am be451b57: Merge "Fix the arguments to memcpy." into mnc-dev
* commit 'be451b57b97c21747c637f4af06743318d42c36c':
  Fix the arguments to memcpy.
2015-05-09 00:41:56 +00:00
Aravind Akella be451b57b9 Merge "Fix the arguments to memcpy." into mnc-dev 2015-05-09 00:17:40 +00:00
Aravind Akella 08f04bf36c Fix the arguments to memcpy.
Change-Id: Ieaee26f46f43a9d412537047566178985370198b
2015-05-08 15:59:23 -07:00
Dan Stoza 98a13a1475 Merge "SF: Apply pending transactions to new sidebands" into mnc-dev 2015-05-08 16:32:27 +00:00
Pat Tjin 814e728b33 am deb6baa6: Merge "surfaceflinger: Fix range check for getFormat" into mnc-dev
* commit 'deb6baa6b349cc5c176b911bcd1e551d15404bf7':
  surfaceflinger: Fix range check for getFormat
2015-05-07 21:21:13 +00:00
Ajay Dudani 4e3e30c2d5 surfaceflinger: Fix range check for getFormat
Fix potential buffer overflow error in getFormat with indices
greater than MAX_HWC_DISPLAYS.

Change-Id: I5e5b69d8d043e900f5e33ca9a62e94ae5f857b68
2015-05-07 13:23:32 -07:00
Dan Stoza e63633e53d am c037ca7f: am c4e98c40: Merge "SF: Apply pending transactions to new sidebands"
* commit 'c037ca7fb1c0163c58e8707d1184bb73aabc0730':
  SF: Apply pending transactions to new sidebands
2015-05-06 23:48:07 +00:00
Dan Stoza 12e0a27aa3 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 16:05:32 -07: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
Sasha Levitskiy 7cb57cee21 am b0474e78: SensorServiceTest: Fix build, warnings.
* commit 'b0474e78df2a778c42c6746da815f397bb2df374':
  SensorServiceTest: Fix build, warnings.
2015-05-04 00:14:28 +00:00
Sasha Levitskiy b0474e78df SensorServiceTest: Fix build, warnings.
Change-Id: I3ed5247d3eb6c43d185049cf9011c2ee01b5662e
Signed-off-by: Sasha Levitskiy <sanek@google.com>
2015-05-02 21:03:44 -07:00
Svetoslav 04db89b7aa am c28fe8f5: Merge "Add body sensors app op - framework native" into mnc-dev
* commit 'c28fe8f5c54c5e98be7664dcffdbd5b324b850d6':
  Add body sensors app op - framework native
2015-05-01 23:40:51 +00:00
Svetoslav c28fe8f5c5 Merge "Add body sensors app op - framework native" into mnc-dev 2015-05-01 23:10:56 +00:00
Svetoslav b412f6e203 Add body sensors app op - framework native
Change-Id: I727a2bb1e28ae9158f2df9c74dd0aee977dfd47f
2015-05-01 13:51:45 -07:00
Dan Stoza cb155bbb52 am a0162542: am bb58111c: Merge "SurfaceFlinger: Fix PTS on stale buffers"
* commit 'a0162542609b1dcd8158644e7ba5ae92e84b95d5':
  SurfaceFlinger: Fix PTS on stale buffers
2015-05-01 20:51:40 +00:00
Dan Stoza bb58111c22 Merge "SurfaceFlinger: Fix PTS on stale buffers" 2015-05-01 20:28:47 +00:00
Dan Stoza ecc504043f 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
(cherry picked from commit 2e36f2283f)
2015-05-01 12:23:44 -07: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 f7a862a1d6 am 6dbfc87d: am 32d4b6c8: Merge "SurfaceFlinger: Limit to 4k Layers"
* commit '6dbfc87da5b07547b7ce7a0218fef3a90d23a6c4':
  SurfaceFlinger: Limit to 4k Layers
2015-04-30 22:28:54 +00:00
Dan Stoza e8f454fd6e am c8ffe5a6: am 676d10b2: Merge "SurfaceFlinger: Fix integer overflow in Mesh ctor"
* commit 'c8ffe5a662d3e436beb05e14d2976925b86e26fd':
  SurfaceFlinger: Fix integer overflow in Mesh ctor
2015-04-30 22:16:32 +00: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 32d4b6c8e1 Merge "SurfaceFlinger: Limit to 4k Layers" 2015-04-30 22:09:38 +00: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
Dan Stoza 676d10b270 Merge "SurfaceFlinger: Fix integer overflow in Mesh ctor" 2015-04-30 21:57:15 +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
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
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
Alan Viverette 14a23e4727 am 3b4d68a2: Merge "Remove gamma correction from color correction shader" into mnc-dev
* commit '3b4d68a294a2d6d8dba072f4ec2661473f966a63':
  Remove gamma correction from color correction shader
2015-04-29 16:57:06 +00: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
Michael Wright 104e268c32 am 5da11106: am 7ecc8952: Merge "Check orientation range has been initialized first"
* commit '5da11106b3aa10d515d0f080c27f315d5830dc85':
  Check orientation range has been initialized first
2015-04-27 14:41:37 +00:00
Michael Wright 7ecc8952c4 Merge "Check orientation range has been initialized first" 2015-04-27 14:13:22 +00: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
baik.han 18a81488f9 Check orientation range has been initialized first
To avoid nan or infinity when orientation value is used for
calculation without being initialized, check mOrientedRanges.haveOrientation
value before using mOrientedRanges.orientation.min or .max value.

Change-Id: I68ed9ab36819c5faa6422e9f061e1275aeed11e3
Signed-off-by: Baik Han <baik.han@lge.com>
2015-04-14 19:49:28 +09: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
Eino-Ville Talvala 5b75a513e4 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

Change-Id: I070bd2e7c56506055c419004c29e2e3feac725df
2015-03-04 11:58:52 -08:00
Tim Kilbourn 8943ce38a6 Stub implementations of HAL usage callbacks.
Change-Id: I5c7effddb7fce85d7d33ea79ff7005d37943f520
2015-02-27 15:09:34 -08:00
Greg Hackmann 53ec1f0d18 am beb89e11: am 6f57b269: am 56f8c6c4: Merge "Error compiling waitforvsync.cpp"
* commit 'beb89e11ca777c92b7e2cc06c25f47d5a75ee7ad':
  Error compiling waitforvsync.cpp
2015-02-26 02:27:29 +00:00
Greg Hackmann beb89e11ca am 6f57b269: am 56f8c6c4: Merge "Error compiling waitforvsync.cpp"
* commit '6f57b269f9ae779a0e85919cdc7a54bfb383e402':
  Error compiling waitforvsync.cpp
2015-02-26 01:13:30 +00:00
Greg Hackmann 6f57b269f9 am 56f8c6c4: Merge "Error compiling waitforvsync.cpp"
* commit '56f8c6c42dab4c3636edb62162088e5d765fa956':
  Error compiling waitforvsync.cpp
2015-02-26 01:07:03 +00:00
Greg Hackmann 56f8c6c42d Merge "Error compiling waitforvsync.cpp" 2015-02-25 23:42:17 +00:00
Michael Wright ca870723d1 Merge "Remove eng tag from input tests." 2015-02-24 03:06:40 +00:00
Michael Wright eb4ed3e41d Remove eng tag from input tests.
Tests always get built with the platform now anyways. Also, remove
the dependency on libandroidfw since it causes issues on PDK builds.

Change-Id: Ib73ec620abac3782d9fdae48778064c06b30aae0
2015-02-23 17:20:16 -08:00
Michael Wright 857a35d267 Merge "Move inputflinger process to host directory" 2015-02-24 00:06:35 +00:00
Michael Wright 6f783602c0 Move inputflinger process to host directory
Change-Id: I08ee44bf8b93e7f1760ee9f8d9876a1e2e2e86c8
2015-02-23 16:04:57 -08:00
Mark Salyzyn 129da2ba07 am 453c6a78: am a455ec21: am d80268ba: Merge "vsync.cpp test is throwing error whe compiled"
* commit '453c6a781de3dc728212d66f1ca7fda2ae984974':
  vsync.cpp test is throwing error whe compiled
2015-02-23 15:30:22 +00:00
Mark Salyzyn 453c6a781d am a455ec21: am d80268ba: Merge "vsync.cpp test is throwing error whe compiled"
* commit 'a455ec21fa5341b8cee09eff73a9b465a6c28faa':
  vsync.cpp test is throwing error whe compiled
2015-02-23 15:23:37 +00:00
Mark Salyzyn a455ec21fa am d80268ba: Merge "vsync.cpp test is throwing error whe compiled"
* commit 'd80268ba19f9217c5459a2952580090ef84a7b78':
  vsync.cpp test is throwing error whe compiled
2015-02-23 15:19:59 +00:00
Nanik Tolaram 5b06dc00ac vsync.cpp test is throwing error whe compiled
frameworks/native/services/surfaceflinger/tests/vsync/vsync.cpp:55:44: error: 'ALOOPER_EVENT_INPUT' was not declared in this scope
     loop->addFd(myDisplayEvent.getFd(), 0, ALOOPER_EVENT_INPUT, receiver,
                                            ^
frameworks/native/services/surfaceflinger/tests/vsync/vsync.cpp:64:18: error: 'ALOOPER_POLL_WAKE' was not declared in this scope
             case ALOOPER_POLL_WAKE:
                  ^
frameworks/native/services/surfaceflinger/tests/vsync/vsync.cpp:67:18: error: 'ALOOPER_POLL_CALLBACK' was not declared in this scope
             case ALOOPER_POLL_CALLBACK:
                  ^
frameworks/native/services/surfaceflinger/tests/vsync/vsync.cpp:70:18: error: 'ALOOPER_POLL_TIMEOUT' was not declared in this scope
             case ALOOPER_POLL_TIMEOUT:
                  ^
frameworks/native/services/surfaceflinger/tests/vsync/vsync.cpp:73:18: error: 'ALOOPER_POLL_ERROR' was not declared in this scope
             case ALOOPER_POLL_ERROR:
                  ^

it is missing one header file

Change-Id: Ie2fb02523a866b13a99edf837f072d101cacb466
Signed-off-by: Nanik Tolaram <nanikjava@gmail.com>
2015-02-23 15:13:56 +00:00
Jeff Brown ae5a081ddf am 7735c058: am c9aa628d: Cancel touch events when a low-level touch gesture occurs.
* commit '7735c058869e0a7fd716054110aa6cb4eff4b075':
  Cancel touch events when a low-level touch gesture occurs.
2015-02-18 11:38:55 +00:00
Jeff Brown 7735c05886 am c9aa628d: Cancel touch events when a low-level touch gesture occurs.
* commit 'c9aa628d065eb08d6fa30f0ac21c6eca4cfbab75':
  Cancel touch events when a low-level touch gesture occurs.
2015-02-18 02:17:08 +00:00
Nanik Tolaram ee9701744a Error compiling waitforvsync.cpp
The waitforvsync.cpp throws error when compiling. Following is the error log

target thumb C++: test-waitforvsync <= frameworks/native/services/surfaceflinger/tests/waitforvsync/waitforvsync.cpp
frameworks/native/services/surfaceflinger/tests/waitforvsync/waitforvsync.cpp: In function 'int main(int, char**)':
frameworks/native/services/surfaceflinger/tests/waitforvsync/waitforvsync.cpp:43:17: error: 'close' was not declared in this scope
         close(fd);
                 ^
....
....

make: *** [out/target/product/grouper/obj/EXECUTABLES/test-waitforvsync_intermediates/waitforvsync.o] Error 1

the file is missing #include <unistd.h>

Change-Id: I57728dbde65641cd3138625f9a590f9db8648158
Signed-off-by: Nanik Tolaram <nanikjava@gmail.com>
2015-02-14 00:26:59 +11:00
Jeff Brown c9aa628d06 Cancel touch events when a low-level touch gesture occurs.
When the touch firmware or driver sends a key event that is triggered
by a low-level gesture such as a palm slap.  For this to work, the
touch device's .kl file must specify the "GESTURE" flag for each
key that is produced by a gesture.

Note that the "VIRTUAL" flag should also be specified for any such
keys for which we would like to generate haptic feedback.

eg. key 142   SLEEP   VIRTUAL GESTURE

Bug: 19264992
Change-Id: Ief494ec7e3ca66d2358a1001fdfae4f263ee1cd1
2015-02-12 11:27:24 -08:00
Dan Stoza 3890c83721 am 40b4e23a: Merge "resolved conflicts for merge of 1665c8e1 to lmp-mr1-dev-plus-aosp" into lmp-mr1-dev-plus-aosp
* commit '40b4e23a0396614c841977e932218e3f53089a4a':
  Revert "SurfaceFlinger: Attempt to attribute fds to layers"
2015-01-27 23:42:56 +00:00
Yabin Cui 3d6c569140 am 39d890d9: am 6e32c037: Merge "Kill HAVE_PTHREADS."
* commit '39d890d9aed5cb07b8a166a749299b9d24d8f137':
  Kill HAVE_PTHREADS.
2015-01-27 23:42:55 +00:00
Dan Stoza 40b4e23a03 Merge "resolved conflicts for merge of 1665c8e1 to lmp-mr1-dev-plus-aosp" into lmp-mr1-dev-plus-aosp 2015-01-27 20:06:34 +00:00
Yabin Cui 39d890d9ae am 6e32c037: Merge "Kill HAVE_PTHREADS."
* commit '6e32c0377db89bafa477715b3a02431d651978cf':
  Kill HAVE_PTHREADS.
2015-01-27 19:56:06 +00:00
Dan Stoza 22d0bdf326 resolved conflicts for merge of 1665c8e1 to lmp-mr1-dev-plus-aosp
Change-Id: I0be2ecb8085f2cd9560138460bcc27d71c011608
2015-01-27 11:49:26 -08:00
Dan Stoza 1665c8e101 Revert "SurfaceFlinger: Attempt to attribute fds to layers"
This reverts commit 03eccb6616.

Change-Id: I4f0da7bb62bf77bb3d399aee601beae5e03928fe
2015-01-27 11:03:50 -08:00
Yabin Cui 8fb2d25ff3 Kill HAVE_PTHREADS.
Bug: 19083585
Change-Id: I355491de945590f43c82bdcb7968b01b4bff6e06
2015-01-26 22:36:36 -08:00
Dan Stoza b62767e855 am a5cbb1f1: am ef1c17ae: SurfaceFlinger: Make log message 64-bit compatible
* commit 'a5cbb1f18b6eb4e0db27d98bea0731393b7438d1':
  SurfaceFlinger: Make log message 64-bit compatible
2015-01-17 00:53:36 +00:00
Dan Stoza 3c7eb4fe23 am 3372cc25: resolved conflicts for merge of 03eccb66 to lmp-mr1-dev-plus-aosp
* commit '3372cc25df255b94e4eb75920afaf43ee5edc39f':
  SurfaceFlinger: Attempt to attribute fds to layers
2015-01-17 00:53:35 +00:00
Dan Stoza a5cbb1f18b am ef1c17ae: SurfaceFlinger: Make log message 64-bit compatible
* commit 'ef1c17ae9417abc1e21e49dbc629e448efc947dc':
  SurfaceFlinger: Make log message 64-bit compatible
2015-01-17 00:50:53 +00:00
Dan Stoza 3372cc25df resolved conflicts for merge of 03eccb66 to lmp-mr1-dev-plus-aosp
Change-Id: I1f38cbe7019b2b48b1094dee154ad97c23fd22c2
2015-01-16 16:18:51 -08:00
Dan Stoza ef1c17ae94 SurfaceFlinger: Make log message 64-bit compatible
Fixes the build on 64-bit targets that complain about using a size_t
with a %d in a format string

Change-Id: I7dfcd3a49eb0dbc5dffeb82bb7208de7f7925f08
2015-01-16 15:58:13 -08:00
Dan Stoza 03eccb6616 SurfaceFlinger: Attempt to attribute fds to layers
This tracks fds when layers are created and destroyed in an effort to
determine which specific app (if any) is active when fds are leaked

Bug: 19017008
Change-Id: I1f1d5a9cbc1399e3df3a2d350324f80b3a4e3477
2015-01-16 15:02:22 -08:00
Jesse Hall 8eb8069a2d am 9c22ac77: am 5b730570: Merge "surfaceflinger: use Mutex timedLock instead of tryLock loop"
* commit '9c22ac77e41b8bbddbb64959acabce3f3a07345d':
  surfaceflinger: use Mutex timedLock instead of tryLock loop
2015-01-13 20:32:28 +00:00
Jesse Hall 9c22ac77e4 am 5b730570: Merge "surfaceflinger: use Mutex timedLock instead of tryLock loop"
* commit '5b730570be2bd1f90346a5921d0b70dc11351396':
  surfaceflinger: use Mutex timedLock instead of tryLock loop
2015-01-12 23:41:46 +00:00
Jesse Hall 5b730570be Merge "surfaceflinger: use Mutex timedLock instead of tryLock loop" 2015-01-12 23:33:07 +00:00
Jesse Hall fcd15b478c surfaceflinger: use Mutex timedLock instead of tryLock loop
Rather than trying to acquire the state lock without waiting three
times at 1 second intervals in SurfaceFlinger::dump(), just try to
acquire the lock once with a 1 second timeout. Avoids spurious mutex
acquire failures that lead to flaky
com.android.cts.jank.opengl.CtsHostJankOpenGl results.

Bug: 18842510
Change-Id: I00ce6109647de2aef8831dd2f8fa98652ba7f4e0
2015-01-10 15:41:01 -08:00
Elliott Hughes e0e29de5c1 am 23958e14: am a7dcab69: Merge "We have POSIX clocks, and we don\'t need to ask for the openssl headers."
* commit '23958e1436565b333ce7f3022bc52a10d4732ef6':
  We have POSIX clocks, and we don't need to ask for the openssl headers.
2015-01-10 00:18:15 +00:00
Elliott Hughes 23958e1436 am a7dcab69: Merge "We have POSIX clocks, and we don\'t need to ask for the openssl headers."
* commit 'a7dcab6954467fa3726824a099b83d0e7490d6d5':
  We have POSIX clocks, and we don't need to ask for the openssl headers.
2015-01-10 00:14:12 +00:00
Elliott Hughes 5ea47f7a32 We have POSIX clocks, and we don't need to ask for the openssl headers.
This code doesn't need to run on the Mac, and the BoringSSL transition
will be easier without references to external/openssl.

Change-Id: I14ea11fa2911af0f4e95e69636e6a2c26126cbe0
2015-01-09 15:56:15 -08:00
Narayan Kamath a3ef067c00 am 106547c1: am 033f7e8e: Merge "InputDispatcher: Optimize count()"
* commit '106547c1e33453b7e20b7b387087092d36aa6a72':
  InputDispatcher: Optimize count()
2014-12-24 10:37:38 +00:00
Narayan Kamath 106547c1e3 am 033f7e8e: Merge "InputDispatcher: Optimize count()"
* commit '033f7e8e35ac76404fe823a67e07ba7c42bc357c':
  InputDispatcher: Optimize count()
2014-12-24 10:32:20 +00:00
Narayan Kamath 033f7e8e35 Merge "InputDispatcher: Optimize count()" 2014-12-24 10:25:43 +00:00
Dmitriy Ivanov e9b6f1f7bb Switch to libsigchain.a
Use LOCAL_WHOLE_STATIC_LIBRARIES to instruct static linker
  to export symbols from the static library.

(cherry picked from commit 4340a14fbf)

Bug: 18701723
Change-Id: I70f6fdb64b0d1adbadf96c8de85870a903ec186a
2014-12-10 10:28:50 -08:00
Dan Stoza dd883c0b08 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.

This is a squashed commit based on an initial change with a couple of
fixes to avoid breaking certain targets. The source commits are:
  d723bd7669
  00d504c06e
  429ba89cd2

Change-Id: I034abec27bf4020d84af60d7acc1939c59986dd6
2014-12-05 14:59:29 -08:00
Dan Stoza d723bd7669 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.

Change-Id: I034abec27bf4020d84af60d7acc1939c59986dd6
2014-12-05 11:06:44 -08:00
Dan Albert 7530114619 am 5588d900: Merge "Enable clang for libui/libgui/surfaceflinger"
* commit '5588d9000cd1ef217185c9001d6b5ecd84db9741':
  Enable clang for libui/libgui/surfaceflinger
2014-12-05 18:01:48 +00:00
Dan Stoza 01049c8321 Enable clang for libui/libgui/surfaceflinger
Enables clang and C++11 for libui/libgui/surfaceflinger, and
eliminates all compile-time warnings.

Change-Id: Ie237fdb5ae44f2bfcddaa884f9c65ec3f08ae50f
(cherry picked from commit f10c46ef85)
2014-12-04 17:56:17 -08:00
Dan Stoza d6739d5e44 am db5827d3: am 5878444f: SurfaceFlinger: Listen to HWC invalidate
* commit 'db5827d314ddca3d473947b4ef49e811fad70069':
  SurfaceFlinger: Listen to HWC invalidate
2014-12-04 16:15:54 +00:00
Dan Stoza db5827d314 am 5878444f: SurfaceFlinger: Listen to HWC invalidate
* commit '5878444fb8da043021f30d3de739531f15390df5':
  SurfaceFlinger: Listen to HWC invalidate
2014-12-03 20:43:29 +00:00
Dan Stoza 5878444fb8 SurfaceFlinger: Listen to HWC invalidate
"Do less work when using PTS" broke the invalidate path up from HWC
to SurfaceFlinger. When HWC would signal an invalidate, SurfaceFinger
would wake up, see no new buffers, and go back to sleep. This is fine,
except when the invalidate is a result of an HDMI hotplug, in which
case the screen remains blank. This change makes that functionality
work again.

Bug: 18564815
Bug: 18558468
Change-Id: I2e2171d86839945f4e4e6555d66f7e2895bd096a
2014-12-02 16:58:17 -08:00