Commit Graph

2230 Commits

Author SHA1 Message Date
Mathias Agopian
ba93b3f8e4 log an error when dequeueBuffer gets a NULL Fence
Bug: 9858745
Change-Id: If35d6a7d770bf0a42d55bc55880a9ddb721fcfd0
2013-08-01 15:48:40 -07:00
Mathias Agopian
87f9b87796 remove unused code form GraphicBuffer
Change-Id: I0dd67f1f93f654331e8f17b55730931dbc695ca7
2013-07-31 20:10:10 -07:00
Alex Ray
b304edb0b1 remove libutils
libutils is being moved from frameworks/native/ to system/core/ in order
to facilitate native C++ platform (non-frameworks) code.

Change-Id: I44089fb960591a40b8a9c30faabb10459d107d71
2013-07-31 13:48:57 -07:00
Brian Carlstrom
8776c34ca2 Fix BlobCache_test
Change-Id: I5b20aeb4dcff80f1e18e1165b8461d20034dc1ac
2013-07-31 01:08:36 -07:00
Mathias Agopian
e142428a9c Make Flattenable not virtual
Fallout from the Flattenable change, update all its uses.

Additionnaly, fix/tighten size checks when (un)flatten()ing
things.

Removed the assumption by some flattenables (e.g.: Fence)
that the size passed to them would be exact (it can
and will be larger in some cases)

The code in Parcel is a bit complicated so that we don't
have to expose the full implementation (and also to
keep the code smallish).

Change-Id: I0bf1c8aca2a3128491b4f45510bc46667e566dde
2013-07-30 21:19:13 -07:00
Mathias Agopian
1d76781b7a Make Flattenable not virtual (libutils)
Making an object Flattenable doesn't force it to
become virtual anymore. For instance, Fence and GraphicBuffer
are now non-virtual classes.

Also change Flatennable protocol a bit so that it updates
its parameters (pointers, sizes) to make it easier
to implement a flattenable in terms of other flattenables.

Change-Id: Ie81dc7637180b3c2cfcbaf644f8987ca804eb891
2013-07-30 21:19:02 -07:00
Mathias Agopian
ad678e18b6 single buffer mode for BufferQueue
Bug: 9891035
Change-Id: Id1ab5f911a6dc4c1d8235e65775b3d3635231ad4
2013-07-26 18:45:02 -07:00
Mathias Agopian
bf5b849ec7 fix build
Change-Id: I04df8ec96510b16e84054089f7c02609d8fe2b0c
2013-07-26 17:26:16 -07:00
Mathias Agopian
c2414bb098 get rid of HAL pixelformats 5551 and 4444
Change-Id: I39409103144c1ba09078c4ddc323a58987fb09ea
2013-07-26 15:43:33 -07:00
Mathias Agopian
5773d3f5b2 get rid of PixelFormatInfo and simplify things
Change-Id: I025a362cc12d5b9b794fac14be500e25aab65396
2013-07-25 19:24:31 -07:00
Mathias Agopian
9642dba110 Merge "Fix a race in BufferQueue" 2013-07-25 02:17:52 +00:00
Todd Poynor
a7b0f04aaf defaultServiceManager wait for service manager ready
If the service manager is not ready when we attempt to create a local
proxy, fail and retry.

Change-Id: I7d7300bc07cd70608793479aa3da282d066da7f6
2013-07-24 16:18:12 -07:00
Alex Ray
a49a4a2e55 Merge "libutils: give BasicHashtableImpl a virtual destructor" 2013-07-24 20:00:36 +00:00
Alex Ray
194bc4ff7b libutils: give BasicHashtableImpl a virtual destructor
Change-Id: I4ec590b060d732af5fe525670becbe778684247b
2013-07-24 00:21:57 -07:00
Mathias Agopian
6bac363cbd Fix a race in BufferQueue
BufferQueue::dequeueBuffer() could incorrectly return
WOULD_BLOCK while in "cannot block" mode if it happened
while a consumer acquired the last allowed buffer
before releasing the old one (which is a valid thing
to do).

Change-Id: I318e5408871ba85e068ea9ef4dc9b578f1bb1043
2013-07-23 21:55:32 -07:00
Colin Cross
4afb57b5db add static dependency on liblog
Change-Id: Ibf8733142d52e4ffac2e3b26932d7196fb79c5a7
2013-07-23 18:07:47 -07:00
Alex Ray
0e0f10b561 Merge "libbinder: add libutils dependency" 2013-07-23 21:49:38 +00:00
Michael Wright
f52ca32724 Merge "Add controller numbers for gamepads / joysticks" 2013-07-23 20:52:42 +00:00
Alex Ray
894e178476 libbinder: add libutils dependency
Change-Id: I30c7291b04788c98faa43843a51b026b8a01932c
2013-07-23 13:43:00 -07:00
Mathias Agopian
325123238a Merge "fix log messages and bogus error message" 2013-07-23 01:06:00 +00:00
Mathias Agopian
207c1e287c fix log messages and bogus error message
also assert when releasing a buffer and it has
been queued

Change-Id: I6f78d9ceb406ec85ff46c7b6d0c047b14063e3d0
2013-07-22 18:00:53 -07:00
Zhijun He
6bbe39de66 Merge "Fix AppOsManager missing mutex unlock." 2013-07-23 00:15:28 +00:00
Zhijun He
20d0380594 Fix AppOsManager missing mutex unlock.
Need unlock the mutex after finish the getToken operation.

Change-Id: Icd83b383913d06e4d60976857aa314c3008ebea1
2013-07-22 17:13:12 -07:00
Michael Wright
0415d63b1a Add controller numbers for gamepads / joysticks
Change-Id: I5294aabbadb836a6a4c7ce76a670abcf50c1f885
2013-07-22 16:37:28 -07:00
Mathias Agopian
bdce817047 Merge changes Ic45929f3,Ic63f4f96,I1e703d36,I691f9507
* changes:
  make sure to reset the framenumber when a buffer is marked FREE
  Make ANW.setSwapInterval(0) work again
  BuffferQueue disconnect is now always asynchrnous
  BufferQueue improvements and APIs changes
2013-07-20 01:02:47 +00:00
Mathias Agopian
26a6f37cc0 make sure to reset the framenumber when a buffer is marked FREE
Change-Id: Ic45929f35553de209801f74e8006fb1bf0b25b45
2013-07-19 17:38:01 -07:00
Mathias Agopian
7cdd786fa8 Make ANW.setSwapInterval(0) work again
we can now queue/dequeue a buffer in asynchrnous mode by using the
async parameter to these calls. async mode is only specified
with those calls (it is not modal anymore).

as a consequence it can only be specified when the buffer count
is not overidden, as error is returned otherwise.

Change-Id: Ic63f4f96f671cb9d65c4cecbcc192615e09a8b6b
2013-07-19 17:38:01 -07:00
Michael Wright
e5bb2a45e0 Merge "Add input device property for buttons under touchpads" 2013-07-19 22:45:38 +00:00
Mathias Agopian
a3fbda3cef BuffferQueue disconnect is now always asynchrnous
we tag queued buffers with the "bufferqueue cannot block" flag
and use that bit to discard a buffer in the queue by new ones
comming in. this allows us to remove the buffer queue drain in
disconnect while maintaining the right behaviour if it gets
connected again (since each buffer remembers how it was enqueued).

Change-Id: I1e703d363a687b70b19ba49cef32213116e8bd3f
2013-07-18 22:28:18 -07:00
Mathias Agopian
595264f1af BufferQueue improvements and APIs changes
this is the first step of a series of improvements to
BufferQueue. A few things happen in this change:

- setSynchronousMode() goes away as well as the SynchronousModeAllowed flag
- BufferQueue now defaults to (what used to be) synchronous mode
- a new "controlled by app" flag is passed when creating consumers and producers
  those flags are used to put the BufferQueue in a mode where it
  will never block if both flags are set. This is achieved by:
  - returning an error from dequeueBuffer() if it would block
  - making sure a buffer is always available by replacing
    the previous buffer with the new one in queueBuffer()
    (note: this is similar to what asynchrnous mode used to be)

Note: in this change EGL's swap-interval 0 is broken; this will be
fixed in another change.

Change-Id: I691f9507d6e2e158287e3039f2a79a4d4434211d
2013-07-18 22:28:18 -07:00
Dianne Hackborn
913b63d235 Follow framework change to track started ops by proc.
Change-Id: Ibbce3bf6556f45751c74bab045b46377e56bff9b
2013-07-17 17:26:15 -07:00
Ying Wang
6fda52bc7d always pass the BufferQueue explicitely to consumers
to fix tests build.

Change-Id: I70b9cf5b0d76df709e474181eeb7c42a54ecf43a
2013-07-15 22:20:35 -07:00
Mathias Agopian
7f069d79e7 Merge "always pass the BufferQueue explicitely to consumers" 2013-07-16 02:17:58 +00:00
Jeff Brown
7556c37b1c Merge "Completely remove skia dependency from libinput." 2013-07-16 01:49:55 +00:00
Jeff Brown
313eff7bb7 Completely remove skia dependency from libinput.
Including the tests...

Change-Id: I6ec8f1a5ae7e7514831d7e3b430b3b37b0841b92
2013-07-15 18:49:00 -07:00
michaelwr
174c26045c Merge "Add a keycode to switch audio tracks (2/2)" 2013-07-16 01:38:36 +00:00
Jeff Brown
5a2f68e5a5 Fix PDK build.
Quick hack to remove Skia dependency from libinput.

Change-Id: Ibaf2e312236f5e3f7251fa903ce381456a77467c
2013-07-15 17:31:13 -07:00
Jeff Brown
40c9e0a398 Add skeleton of input flinger.
Change-Id: I7f25080e446d4d3d9de9b18fe432a09bc751e0d9
2013-07-15 16:03:14 -07:00
Jeff Brown
ada11c5e67 Make getCallingUid/Pid const.
Change-Id: I1853b21eaa45d85274189dfd72f73fec48d0d6b7
2013-07-15 15:08:39 -07:00
Mathias Agopian
8f938a5338 always pass the BufferQueue explicitely to consumers
Change-Id: I883b0a7b19d8e722f9ab714ba6f49e658b02ca86
2013-07-12 22:06:26 -07:00
Jaekyun Seok
8d06dcf9c6 Add a keycode to switch audio tracks (2/2)
A key to switch audio tracks is general on media devices like blu-ray.

Bug: 9728155
Change-Id: I13ebbc64321f3cf10370f9a605f3d94ea0d16d6d
2013-07-12 17:23:45 +09:00
Michael Wright
931fd6dee7 Add input device property for buttons under touchpads
Bug: 8990644
Change-Id: I6df5fb9e11199173d62523928082db428af55394
2013-07-11 15:24:09 -07:00
Elliott Hughes
7b4d5355fb am 54d97c88: am 9da67a94: am 67481607: Merge "Revert "Second try at adding a compatibility symbol for the MemoryBase constructor.""
* commit '54d97c88b57d2c341f0629c9648d4400a34e4f41':
  Revert "Second try at adding a compatibility symbol for the MemoryBase constructor."
2013-07-11 10:16:47 -07:00
Andy McFadden
1585c4d9fb Pay attention to buffer timestamps
When acquiring a buffer, SurfaceFlinger now computes the expected
presentation time and passes it to the BufferQueue acquireBuffer()
method.  If it's not yet time to display the buffer, acquireBuffer()
returns PRESENT_LATER instead of a buffer.

The current implementation of the expected-present-time computation
uses approximations and guesswork.

Bug 7900302

Change-Id: If9345611c5983a11a811935aaf27d6388a5036f1
2013-07-10 15:38:40 -07:00
Elliott Hughes
54d97c88b5 am 9da67a94: am 67481607: Merge "Revert "Second try at adding a compatibility symbol for the MemoryBase constructor.""
* commit '9da67a9427f695128b5da61c8f987fd9198a5e05':
  Revert "Second try at adding a compatibility symbol for the MemoryBase constructor."
2013-07-09 15:35:33 -07:00
Elliott Hughes
9da67a9427 am 67481607: Merge "Revert "Second try at adding a compatibility symbol for the MemoryBase constructor.""
* commit '674816078588d0951c3c9bdaf26ecc9e9b3f2e0a':
  Revert "Second try at adding a compatibility symbol for the MemoryBase constructor."
2013-07-09 15:30:48 -07:00
Elliott Hughes
6748160785 Merge "Revert "Second try at adding a compatibility symbol for the MemoryBase constructor."" 2013-07-09 22:27:17 +00:00
Elliott Hughes
2dccfdcd26 Revert "Second try at adding a compatibility symbol for the MemoryBase constructor."
This reverts commit ddd286301b, because the third-party library in question has now been fixed.

Change-Id: Ic195a913f90b36268ed9d6e60be520decb4e198d
2013-07-09 22:15:42 +00:00
Glenn Kasten
06b6aed2f1 Merge "mv libcpustats from frameworks/native to frameworks/av" 2013-07-08 15:40:51 +00:00
Todd Poynor
8d96cab8bf binder: add polling / single-threaded operation
This is currently safe to do only for processes that disallow any binder
threads to be created: setThreadPoolMaxThreadCount(0).

Change-Id: I8a27f3cf26f4d51edb7f222af487ac256cbcab65
2013-07-04 00:19:09 +00:00