Commit Graph

1712 Commits

Author SHA1 Message Date
Michael Wright
8e81282601 DO NOT MERGE Cancel touches as well as pointer gestures.
Bug: 24302031
Change-Id: Idbe964a1a35c190a32f845e2a19542d54652d011
2015-09-22 22:05:53 +01:00
Michael Wright
a16b98c64f DO NOT MERGE Revert "am f37143d8: Merge "Cancel touches as well as pointer gestures." into mnc-dev"
This reverts commit 9b70ab7a3cb260205e81e40ba181a86710d2eb95, reversing
changes made to 153008efb5a00ed3c18d588ce15f90d2442a9786.

Bug: 24302031

Change-Id: Ia746381b30be3b54cb646ed412b7271962c4b02a
2015-09-22 22:05:48 +01:00
Dan Stoza
f2699fc3a8 SF: Add colorTransform to DisplayInfo
Adds the colorTransform field, which defines a vendor-specific color
transform (e.g., wide gamut, sRGB, etc.) to the DisplayInfo class, and
populates it from the HWC interface.

Bug: 20853317
Change-Id: I153edc36a361407656f3eb5082b96c2da2ecbec7
2015-08-31 13:41:24 -07:00
Dan Stoza
50be1df76e Merge "SF: Track missed frames and optionally drop them" into mnc-dr-dev 2015-08-05 18:48:10 +00:00
Dan Stoza
03d7e301c8 am d87defaf: SF: Allow present if sideband stream changed
* commit 'd87defaf486ff4e9c0066754564851cfb7be49ed':
  SF: Allow present if sideband stream changed
2015-07-31 15:44:52 +00:00
Dan Stoza
d87defaf48 SF: Allow present if sideband stream changed
Allows the sideband layer to be passed all the way to HWC instead of
getting blocked by the updated PTS tracking code.

Bug: 22291067
Change-Id: Ic2f20a7528e276fff054e86ca35789c26873b348
2015-07-29 16:15:50 -07:00
Dan Stoza
14cd37cf3d SF: Track missed frames and optionally drop them
Adds code to track whether SurfaceFlinger has sent two frames to HWC in
the same vsync window. This can occur if one frame is delayed so far
it slips into the next window or just if one frame takes an abnormal
amount of time. If this occurs, it shows up as FrameMissed in systrace.

Also adds a property debug.sf.drop_missed_frames which, if set, tells
SurfaceFlinger to skip sending a frame to HWC (i.e., calling
prepare/set) when we detect this condition, which can help prevent
backpressure from the HWC implementation.

Bug: 22513558
Change-Id: I2df0d44cec5fd6edba419388d8c90b5710d1a5b6
2015-07-23 11:15:32 -07:00
Chenjie Luo
177a416625 am 99426810: Merge "Check for the presence of accel and magnetometer sensors before adding AOSP fusion sensors." into mnc-dev
* commit '99426810e4828719be84a0f8c186161578512e93':
  Check for the presence of accel and magnetometer sensors before adding AOSP fusion sensors.
2015-07-22 20:23:43 +00:00
Aravind Akella
f504789dd3 Check for the presence of accel and magnetometer sensors before adding AOSP fusion sensors.
Bug: 22502485
Change-Id: I3d9018649302b98004e4e216b2173e8411a08501
2015-07-20 17:32:09 -07:00
Adrian Roos
31e138db15 Merge "Show charging speed on Keyguard" into mnc-dr-dev 2015-07-14 19:17:11 +00:00
Michael Wright
fd54957888 Merge "Cancel touches as well as pointer gestures." into mnc-dev 2015-07-14 14:22:38 +00:00
Aravind Akella
a4864d61dc am 4904821b: Merge "Rename wakelock held internally by SensorService." into mnc-dev
* commit '4904821b212a3ee91f22a51295f86f6339cbcc8d':
  Rename wakelock held internally by SensorService.
2015-07-13 23:02:20 +00:00
Michael Wright
a44766cf0e Cancel touches as well as pointer gestures.
Bug: 19264992
Change-Id: If48e0953b972c9d69f516906adf7c6faf67e3eb8
2015-07-13 09:44:02 +01:00
Adrian Roos
687aa22c92 Show charging speed on Keyguard
Bug: 8099739
Change-Id: I2e5c21dd7ec028ce47fb03ab71e74f7fccaa9e36
2015-07-10 13:10:13 -07:00
Aravind Akella
8ef3c89eb2 Rename wakelock held internally by SensorService.
Bug: 22076400
Change-Id: I62129549b0681f200f40da01f53140245309ed88
2015-07-10 11:45:32 -07:00
Michael Wright
f37143d8a5 Merge "Cancel touches as well as pointer gestures." into mnc-dev 2015-07-09 21:56:21 +00:00
Michael Wright
fbbaf2efbb Cancel touches as well as pointer gestures.
Bug: 19264992
Change-Id: Idbe964a1a35c190a32f845e2a19542d54652d011
2015-07-09 12:43:21 -07:00
Dan Stoza
0eb2d39866 SF: Ignore PTS more than one second in the future
Some of this logic already existed, but when we optimized
SurfaceFlinger to avoid unnecessary wake-ups, we didn't carry the logic
over into the new readiness test. shouldPresentNow now returns true if
the timestamp is more than a second in the future (since it's likely a
bogus timestamp and should be ignored).

Bug: 21932760
Change-Id: Ib50970a4eb621588c0b60766c8d8d1a8bddf853b
2015-07-06 13:15:25 -07:00
Aravind Akella
841a5926fc Enable sensor data injection mode through adb.
Change-Id: I415cf8ff0871fa74babaf9b879c68f210298b472
2015-06-30 14:59:58 -07:00
Dan Stoza
49b2e13629 am 6a25a287: am 806334aa: am 1998615f: Merge "sf: Initialize EventThread before creating HWC"
* commit '6a25a2872852f23058268adcec61600460fcdfb6':
  sf: Initialize EventThread before creating HWC
2015-06-30 17:49:47 +00:00
Dan Stoza
6a25a28728 am 806334aa: am 1998615f: Merge "sf: Initialize EventThread before creating HWC"
* commit '806334aacd089d1c419ed77021a2b1bb4f7644ef':
  sf: Initialize EventThread before creating HWC
2015-06-30 17:38:41 +00:00
Michael Wright
2e099b2425 am fd0fdaf7: am 3643c88f: Merge "Send cancelation events to monitors when injection fails." into mnc-dev
* commit 'fd0fdaf73b1e8fbf643152f532f500be70f11a26':
  Send cancelation events to monitors when injection fails.
2015-06-29 17:47:15 +00:00
Michael Wright
fd0fdaf73b am 3643c88f: Merge "Send cancelation events to monitors when injection fails." into mnc-dev
* commit '3643c88f7b557e241d65c4857eaf49e28e7c03a2':
  Send cancelation events to monitors when injection fails.
2015-06-29 17:40:25 +00:00
Michael Wright
3643c88f7b Merge "Send cancelation events to monitors when injection fails." into mnc-dev 2015-06-29 17:10:46 +00:00
Dan Stoza
c08e7cb7b1 am 488986f4: am f413de05: Merge "libgui: Fix handling of rotated surface damage" into mnc-dev
* commit '488986f4ad7a92b04fdfd761ae07785019d2a9d3':
  libgui: Fix handling of rotated surface damage
2015-06-26 20:15:24 +00:00
Dan Stoza
488986f4ad am f413de05: Merge "libgui: Fix handling of rotated surface damage" into mnc-dev
* commit 'f413de05cfb9a1b84b73c8e6c306d4142130c5f7':
  libgui: Fix handling of rotated surface damage
2015-06-26 20:01:09 +00:00
Dan Stoza
db4850c01f libgui: Fix handling of rotated surface damage
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
2015-06-25 16:10:18 -07:00
Aravind Akella
12b26278df am e6045537: am 7a1b5d5d: Merge "Fix crash in SensorService. Ignore devices with no sensors." into mnc-dev
* commit 'e6045537bbce4c4f98e6a1149187bbcdaff57bcd':
  Fix crash in SensorService. Ignore devices with no sensors.
2015-06-24 16:08:13 +00:00
Aravind Akella
e6045537bb am 7a1b5d5d: Merge "Fix crash in SensorService. Ignore devices with no sensors." into mnc-dev
* commit '7a1b5d5dec10f05ec29e7251ada440b47a34c6aa':
  Fix crash in SensorService. Ignore devices with no sensors.
2015-06-24 15:56:29 +00:00
Aravind Akella
7a1b5d5dec Merge "Fix crash in SensorService. Ignore devices with no sensors." into mnc-dev 2015-06-24 15:34:59 +00:00
Aravind Akella
ee155cadb2 Fix crash in SensorService. Ignore devices with no sensors.
Change-Id: I1491740baa6348f97c336b6883b11ad2ab93cf73
2015-06-24 08:32:56 -07:00
Dan Stoza
e2bfdfafae am c8c0992a: am 0638a4fa: Merge "libgui/SF: Propagate SECURE Layer flag changes" into mnc-dev
* commit 'c8c0992ace7733c983e87e8e7154d844a54e5741':
  libgui/SF: Propagate SECURE Layer flag changes
2015-06-23 18:13:16 +00:00
Michael Wright
39c32ecf37 am 7d3ad695: Merge commit \'71997c1a\' into manualmerge
* commit '7d3ad695304a1f24026227e630add6edd76fd0d6':
  Add new AINPUT_SOURCE_BLUETOOTH_STYLUS
2015-06-23 18:13:15 +00:00
Dan Stoza
c8c0992ace am 0638a4fa: Merge "libgui/SF: Propagate SECURE Layer flag changes" into mnc-dev
* commit '0638a4fac7250e260c0102c770090cb7eefca936':
  libgui/SF: Propagate SECURE Layer flag changes
2015-06-23 18:07:31 +00:00
Michael Wright
7d3ad69530 Merge commit '71997c1a' into manualmerge
Change-Id: Ia68fbd20ce66571dfd33764e52c3a00e2285e648
2015-06-23 19:04:31 +01:00
Dan Stoza
0638a4fac7 Merge "libgui/SF: Propagate SECURE Layer flag changes" into mnc-dev 2015-06-23 15:44:10 +00:00
Michael Wright
71997c1a92 Merge "Add new AINPUT_SOURCE_BLUETOOTH_STYLUS" into mnc-dev 2015-06-23 12:49:30 +00:00
Aravind Akella
645832b969 am 357e7d7d: am 94188464: Merge "More information in sensor bugreports." into mnc-dev
* commit '357e7d7dcdd579d979054daf0a28b0a348d7ee7a':
  More information in sensor bugreports.
2015-06-22 18:53:32 +00:00
Aravind Akella
357e7d7dcd am 94188464: Merge "More information in sensor bugreports." into mnc-dev
* commit '9418846431f494b53a5e9c617aed27693079c163':
  More information in sensor bugreports.
2015-06-22 18:40:18 +00:00
Dan Stoza
2311608667 libgui/SF: Propagate SECURE Layer flag changes
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
2015-06-18 15:11:20 -07:00
Aravind Akella
18d6d51a00 More information in sensor bugreports.
i) Log last 20 activations/deactivations of sensors.
ii) Increase logging upto 50 events for accelerometer, step_counter and significant motion.

Change-Id: I3966ed0abda8b705f3d16e94a9370fa1b97baa57
2015-06-18 14:24:05 -07:00
Saurabh Shah
f948105810 sf: Initialize EventThread before creating HWC
Once HWC is created, it could use any of the provided hooks, which
could lead to a crash if the EventThread (handler) isn't initialized
prior to creating HWC.

Change-Id: I5ea35fe9bcb150fb74aae1295b798bd787ad6cee
2015-06-17 11:08:29 -07:00
Manoj Kumar AVM
f1bc814276 am 407f48c8: am e04e4edc: sf: Fix incorrect state reporting in dumpsys
* commit '407f48c825351e7b5cbf455a85aff2154c696fdd':
  sf: Fix incorrect state reporting in dumpsys
2015-06-12 17:44:06 +00:00
Manoj Kumar AVM
407f48c825 am e04e4edc: sf: Fix incorrect state reporting in dumpsys
* commit 'e04e4edcd1a852058775caa34cf73e2c20dc1066':
  sf: Fix incorrect state reporting in dumpsys
2015-06-12 17:31:23 +00:00
Manoj Kumar AVM
e04e4edcd1 sf: Fix incorrect state reporting in dumpsys
Dumpsys utility accesses layer compositionType variable
with out proper protection. These variables are modified
during hwc_prepare call. Existing HAL lock protection is not
sufficient to address this issue. Failure to do this will
result in incorrect state reporting in dumpsys.

A new displayLock mutex in HWComposer will be used in both
dumpsys and draw calls to ensure correct state is accessed.

Change-Id: I8a57de59525adc0e089b3bed95c067c01e42b666
(cherry picked from commit e54506b81a)
2015-06-12 09:48:07 -07:00
Michael Wright
2f78b68cf1 Add new AINPUT_SOURCE_BLUETOOTH_STYLUS
Bug: 21531826
Change-Id: I3792860ad3f6579ceb50ccaa212f8fbd471a9b6b
2015-06-12 15:25:08 +01:00
Michael Wright
fa13dcf39f Send cancelation events to monitors when injection fails.
Bug: 20649729
Change-Id: I46cd14ac1f040d404c0b1581b38fa07a944e5fb9
2015-06-12 13:25:11 +01:00
Manoj Kumar AVM
e54506b81a sf: Fix incorrect state reporting in dumpsys
Dumpsys utility accesses layer compositionType variable
with out proper protection. These variables are modified
during hwc_prepare call. Existing HAL lock protection is not
sufficient to address this issue. Failure to do this will
result in incorrect state reporting in dumpsys.

A new displayLock mutex in HWComposer will be used in both
dumpsys and draw calls to ensure correct state is accessed.

Change-Id: I8a57de59525adc0e089b3bed95c067c01e42b666
2015-06-11 18:21:18 -04:00
Tatenda Chipeperekwa
40da48bfdf sf: Add a NULL check in getDisplayConfigs
Validate the display binder by adding a NULL check in getDisplayConfigs.
This will prevent a false match if the caller queries the display
configs for an inactive display (whose binder is NULL by default).

Without this change we might end up attempting to index the display
config array, which is unpopulated for inactive displays, and this will
result in a crash. (See getDisplayInfo in SurfaceComposerClient.cpp for
an example of this scenario)

Change-Id: Ib32a7dc8378d3438df0dba1ecd608bbcfc837717
2015-06-11 12:28:41 -07:00
Tatenda Chipeperekwa
0abd853a68 am c1d4662f: am 23e16bb5: sf: Add a NULL check in getDisplayConfigs
* commit 'c1d4662f0e596021e0d8360cd1c5d213c3c8c4ba':
  sf: Add a NULL check in getDisplayConfigs
2015-06-11 19:09:30 +00:00