Commit Graph

49179 Commits

Author SHA1 Message Date
Jesse Hall
72f69d9f23 Wake up disp sync thread when setting display period
Bug: 10624956
Change-Id: I272c15f319521bfbd1bb70451366c7dd84d60bf9
2013-10-10 14:48:22 -07:00
Ed Heyl
98c197d826 merge in KQS81M 2013-10-08 15:40:38 -07:00
Jamie Gennis
faf77cce9d SurfaceFlinger: SW-based vsync events
This change adds the DispSync class, which models the hardware vsync event
times to allow vsync event callbacks to be done at an arbitrary phase offset
from the hardware vsync.  This can be used to reduce the minimum latency from
Choreographer wake-up to on-screen image presentation.

Bug: 10624956
Change-Id: I8c7a54ceacaa4d709726ed97b0dcae4093a7bdcf
2013-10-07 17:59:53 -07:00
Alex Ray
d457ec52d7 Add feature android.hardware.consumerir xml file
Bug: 10676690
Change-Id: I2cc62b9c97a71588c43ff96ca38d470976bde9b0
2013-10-03 13:09:37 -07:00
Marco Nelissen
48d3741ba5 Merge "Allow blaming a single uid for work done" into klp-dev 2013-10-03 16:34:51 +00:00
Lajos Molnar
b1f94ef3f9 Merge "media/hardware/HardwareAPI.h: Added PrepareForAdaptivePlaybackParams" into klp-dev 2013-10-03 16:10:25 +00:00
Marco Nelissen
9a7706bb17 Allow blaming a single uid for work done
This lets audioflinger assign blame for wakelocks to a single uid.
Currently this is only used for recording wakelocks.
b/10985160

Change-Id: Idc9adb22c29030010ac690d4cb95e7e7ea6b91e6
2013-10-03 08:49:07 -07:00
Jamie Gennis
f0cf5f103c BufferQueue: fix a test crash
Bug: 10935880
Change-Id: If76e9fb055103bad0db7e6c16487532671573149
2013-10-02 18:02:28 +00:00
Jamie Gennis
a9c47f3273 Merge "GLConsumer: start using EGL_ANDROID_image_crop" into klp-dev 2013-10-02 17:36:48 +00:00
Dave Burke
0699350336 Merge "only clear FB when asked for the opaque layer" into klp-dev 2013-10-02 17:36:40 +00:00
Jamie Gennis
dbe9245e2e GLConsumer: start using EGL_ANDROID_image_crop
This change makes GLConsumer use the EGL_ANDROID_image_crop extension when
available on a device.  The crop rectangle is passed to the EGL driver when
creating EGLImages, allowing the crop to be performed by the driver rather than
using the texture transform matrix.

Bug: 10897141
Change-Id: I63e9a5d5c85067376abc420e3639154468346311
2013-10-02 17:34:35 +00:00
Jesse Hall
93573e91c2 Merge "Treat composition frames with no layers as using GLES composition" into klp-dev 2013-10-02 14:54:03 +00:00
Jesse Hall
b716e57048 Set the outbuf acquire fence after we actually have it.
In GLES-only mode, we don't have the outbuf acquire fence until after
GLES composition is done for the frame. We were setting the fence in
HWC's state immediately after dequeueing the buffer from the consumer,
before GLES had started. This fence got passed through HWC and on to
the consumer, so the consumer was reading the buffer before GLES was
done writing to it.

Now we update HWC's state just before set(), when we know we have the
right fence.

Bug: 11000763
Change-Id: Iea9db4c69634c352dc2d600f0bdb6bef2a432636
2013-10-01 17:25:20 -07:00
Mathias Agopian
ac68302e1c only clear FB when asked for the opaque layer
a layer need to be considered NOT opaque if it has a
plane-alpha.

Bug: 10846930
Change-Id: Ibd8981b63ede4560c7096bacc4cff46a7eb2a8bb
2013-10-01 15:36:52 -07:00
Jesse Hall
d05a17fbb3 Treat composition frames with no layers as using GLES composition
When there are no window layers for a display, SurfaceFlinger clears
the undefined region using GLES. Some of the places that check for
GLES composition weren't considering this special case, in particular:

- We were skipping the eglSwapBuffers() on these frames.
- We were putting VirtualDisplaySurface in HWC-only composition mode.

This change centralizes the logic for this special case.

Bug: 10957068
Change-Id: I2deaf2ed101e8ea76708862a6bb67751b6078794
2013-09-30 17:08:28 -07:00
Jesse Hall
b65f32ebe2 Fix two EGLConfig selection bugs
This fixes two bugs introduced by
  Change-Id: Ia8cc084c02a0e3de910def024da8a08d02bbd89d

(a) There is no invalid EGLConfig value, in particular zero is valid.
    Checking return values of eglGetConfigs and eglChooseConfig is the
    only way to determine success.
(b) The "simple" EGLConfig query used as the emulator fallback should
    not include EGL_RECORDABLE; the emulator doesn't have it.

Bug: 10935622
Change-Id: Ib798a24e7cf06a679811c46eaa45d39174a715ec
2013-09-30 10:49:16 -07:00
Mathias Agopian
86206b41b2 Merge "fix initialization of framebuffer target crop rect on hwc 1.3" into klp-dev 2013-09-26 19:41:22 +00:00
Mathias Agopian
8f63c2049b fix initialization of framebuffer target crop rect on hwc 1.3
Bug: 10936771
Change-Id: If283e5e231ca34b93e0b1784bb4e8e4c7bfd75de
2013-09-25 20:44:34 -07:00
Mathias Agopian
6da15f46f5 fix crashers with wifi/virtual displays
Bug: 10647742
Change-Id: I4b8ed9da52ef95af3a3b3a04b98514a3776a674d
2013-09-25 20:40:07 -07:00
Eino-Ville Talvala
a7395b4078 GLConsumer: Add query for current frame number.
Surface the underlying frame number of the current texture.

Bug: 10830400
Change-Id: Ide3a7da12ea0aac54588beb6bf00dbfe2cd37653
2013-09-20 03:37:01 -07:00
Mathias Agopian
d555684cb3 reinstate black-screenshot debugging code
turned off by default.

Bug: 10809349
Change-Id: I3e6b8c7860e6b0e122b8f07de4020967cd1f005c
2013-09-19 17:09:26 -07:00
Mathias Agopian
e2a3e87274 Merge "Fix GLES context version selection" into klp-dev 2013-09-19 22:29:30 +00:00
Eino-Ville Talvala
d171da973d GLConsumer: Add query for current frame number.
Surface the underlying frame number of the current texture.

Bug: 10830400
Change-Id: Ide3a7da12ea0aac54588beb6bf00dbfe2cd37653
2013-09-19 13:36:07 -07:00
The Android Automerger
7fa91dc3a7 merge in klp-release history after reset to klp-dev 2013-09-19 06:01:50 -07:00
Mathias Agopian
2185f8b420 Fix GLES context version selection
Explicitly selects an ES 2.0 config first, then an ES 1.x config,
before attempting the fallback path for the emulator.

Bug: 10820214
Change-Id: Ia8cc084c02a0e3de910def024da8a08d02bbd89d
2013-09-18 16:20:26 -07:00
Mathias Agopian
c1c05de415 fix camera API 2.0 orientation
we add a flag to ANativeWindow::setBufferTransform that means
"apply the inverse rotation of the display this buffer is displayed
onto to".

Bug: 10804238
Change-Id: Id2447676271950463e8dbcef1b95935c5c3f32b2
2013-09-17 23:45:22 -07:00
The Android Automerger
3134a0bb18 merge in klp-release history after reset to klp-dev 2013-09-17 21:11:23 -07:00
The Android Automerger
2f1bd0a9e2 merge in klp-release history after reset to klp-dev 2013-09-17 17:39:56 -07:00
Mathias Agopian
799f512680 Fix build (tests)
Change-Id: I5b233ef448e5e7eec3818c6586dfea138b28f7b6
2013-09-17 15:55:18 -07:00
Mathias Agopian
02b62df711 Merge "Make sure do disconnect from a BQ when its client dies." into klp-dev 2013-09-17 21:31:14 +00:00
Aravind Akella
fca43392b7 Merge "Fix for AOSP fusion sensors not handling multiple clients correctly." into klp-dev 2013-09-17 18:17:50 +00:00
Aravind Akella
f0c728465a Merge "Sensor Batching Bug fixes." into klp-dev 2013-09-17 17:49:27 +00:00
Amith Yamasani
fc7083a828 Merge "Enable FEATURE_DEVICE_ADMIN for handheld devices" into klp-dev 2013-09-17 15:56:24 +00:00
The Android Automerger
92d16bd3ee merge in klp-release history after reset to klp-dev 2013-09-17 06:01:01 -07:00
Jesse Hall
2a36497e45 Merge "Stop using default value for Surface producerControlledByApp parameter" into klp-dev 2013-09-17 03:27:15 +00:00
Mathias Agopian
365857df8b Make sure do disconnect from a BQ when its client dies.
Bug: 5679534

Change-Id: If447e8673df83fe0b1d6210641e0a48522501a53
2013-09-16 16:15:21 -07:00
Aravind Akella
bf72deea2f Fix for AOSP fusion sensors not handling multiple clients correctly.
Bug: 10786801
Change-Id: I7b938bc583a303a30237c3d93b5accbf64cc90b5
2013-09-16 15:49:49 -07:00
Jesse Hall
83cafffeac Stop using default value for Surface producerControlledByApp parameter
Bug: 10785749
Change-Id: Ifbf9340e5eabe621a69e990ec3e05ac51f8db66a
2013-09-16 15:39:55 -07:00
Aravind Akella
4c8b951f8d Sensor Batching Bug fixes.
i) SensorService dropping events. Increase SOCKET_BUFFER_SIZE in BitTube ctor.
ii) Call flush before every activate.
iii) Emulate flush for older devices. Add a trivial flush complete event when flush is called.

Bug: 10641596
Change-Id: I30d0f3948e830457143f16e157b6ad81908687ce
2013-09-16 14:43:02 -07:00
Jesse Hall
a2ba428a22 Disable the egl_khr_gl_colorspace extension
Bug: 10777398
Change-Id: Ib50ea8b9d5d960537701b85929d6312304993a0f
2013-09-16 11:21:48 -07:00
Amith Yamasani
7562c0e28f Enable FEATURE_DEVICE_ADMIN for handheld devices
Bug: 9520957
Change-Id: I9c09dc726509db9e6d9ba4700255c74528b9f9fa
2013-09-16 10:48:35 -07:00
The Android Automerger
3002db1c30 merge in klp-release history after reset to klp-dev 2013-09-12 06:01:32 -07:00
Mathias Agopian
90ed3e8d78 fix a few problems with BitTube
BitTube used to send objects one at a time and didn't
handle errors properly.

We now send all the objects in one call, which means they
have to be read as a single batch as well. This changes the
BitTube API.

Update SensorService to the new API.

Also added an API to set the size of the send buffer.

Bug: 10641596
Change-Id: I77c70d35e351fdba0416fae4b7ca3b1d56272251
2013-09-10 21:10:53 -07:00
The Android Automerger
9509dec1ba merge in klp-release history after reset to klp-dev 2013-09-09 06:01:45 -07:00
Mathias Agopian
63108c34ec fix a possible null dereference when eglMakeCurrent() fails
Bug: 10648797
Change-Id: Iee0be47f2646feb25de4ea199bbb9b707452916e
2013-09-06 13:36:49 -07:00
Mathias Agopian
77414216cd Merge "color blindness enhancement" into klp-dev 2013-09-06 02:09:43 +00:00
The Android Automerger
b7524ec3e2 merge in klp-release history after reset to klp-dev 2013-09-05 06:01:25 -07:00
Mathias Agopian
ff2ed70fa3 color blindness enhancement
This is an attempt at improving the experience of
users with color vision impairement.

At this time this feature can only be enabled for
debugging:

  adb shell service call SurfaceFlinger 1014 i32 PARAM

  with PARAM:
   0 : disabled
   1 : protanomaly/protanopia simulation
   2 : deuteranomaly/deuteranopia simulation
   3 : tritanopia/tritanomaly simulation
  11, 12, 13: same as above w/ attempted correction/enhancement

The enhancement algorithm tries to spread the "error"
such that tones that would otherwise appear similar can be
distinguished.

Bug: 9465644

Change-Id: I860f7eed0cb81f54ef9cf24ad78155b6395ade48
2013-09-04 22:11:15 -07:00
Dianne Hackborn
59b1516f4c Fix issue #10422349: Limit/change the battery history data in batterystats
Use new compact option to include history when dumping battery stats.

Change-Id: I3833a88db76d8791bd5c2e8f6ff414af65472a42
2013-09-04 18:04:14 -07:00
Chong Zhang
e67729144a Merge "HDCP: add enums for HDCP module capabilities" into klp-dev 2013-09-04 22:07:46 +00:00