Commit Graph

48304 Commits

Author SHA1 Message Date
Mathias Agopian
041a075262 don't allow screenshots without the READ_FRAMEBUFFER permission
the recent screenshot rework allowed the older screenshot
interface to work without that permission

Change-Id: I6c4743f4591c81106e3b823d55a055f7b4907de1
2013-03-15 18:39:16 -07:00
Mathias Agopian
7670d3cb2b Merge "get rid of purgatory and fix QueuesToWindowComposer query" into jb-mr2-dev 2013-03-16 01:14:35 +00:00
Mathias Agopian
a493be5825 don't capture hidden layers in screenshots
Bug: 8389956
Change-Id: I9ed836395258732c743c6fd44092bd01020dde13
2013-03-15 16:08:10 -07:00
Jesse Hall
e81421e1cb Add Vector::resize()
Bug: 8384764
Change-Id: Icee83d389f3e555eba7d419b64c8d52a9aa21b8b
2013-03-15 12:40:39 -07:00
Mathias Agopian
6710604286 get rid of purgatory and fix QueuesToWindowComposer query
the purgatory list wasn't needed anymore; in fact it had no effect as
buffer life-time management is now handled by the BufferQueue.

For QueuesToWindowComposer we keep a list of wp<> on the IBinder
for IGraphicBufferProducers we hand over to clients so we can
easily check if an IGraphicBufferProducer is ours. We clean-up the
list when our IGraphicBufferProducer are destroyed.

Bug: 8349142
Change-Id: I1aa06652ade8c72d0004a3f5e6c3d6e8a82fc2ae
2013-03-14 19:18:13 -07:00
Dianne Hackborn
1791eefd69 fix a couple race-conditions in RefBase::promote()
Bug: 8390295
Change-Id: I7a48e3bf5b213cc1da2b8e844c6bb37ee24cb047
2013-03-14 16:47:41 -07:00
Elliott Hughes
5b00af2435 am 7212ff29: am 20e154f1: Merge "Second try at adding a compatibility symbol for the MemoryBase constructor."
* commit '7212ff29c6f4e4cd192fee6f072e80b36d8a728b':
  Second try at adding a compatibility symbol for the MemoryBase constructor.
2013-03-14 10:31:38 -07:00
Jeff Sharkey
a11713ce3e Merge "Increase screenshot timeout." into jb-mr2-dev 2013-03-14 17:21:08 +00:00
Jeff Sharkey
7560443061 Increase screenshot timeout.
Devices with large displays take longer than 5 seconds to write.

Change-Id: If74bc4a3cec366ae28eca549bce28ef212e47d8f
2013-03-14 10:20:31 -07:00
Elliott Hughes
801e632a19 am 6250f6cb: am d8151306: Merge "Revert "Add a compatibility symbol for the MemoryBase constructor.""
* commit '6250f6cb2be039be150de6c836f8595384838342':
  Revert "Add a compatibility symbol for the MemoryBase constructor."
2013-03-14 08:55:49 -07:00
Jeff Sharkey
d77d4e0edc Merge "Support broadcast when dumpstate finishes." into jb-mr2-dev 2013-03-14 15:44:15 +00:00
Elliott Hughes
c47f0988a3 Revert "Add a compatibility symbol for the MemoryBase constructor."
Cherry pick from AOSP to fix the build.
See https://android-review.googlesource.com/#/c/53690/

This reverts commit 7f974ff2f3

Change-Id: I1b123f446d0ff41e11ff81d4ef5f1472b59cac93
2013-03-14 10:51:17 +00:00
Elliott Hughes
5ca39ea57a am 9b57ad73: am 8facd1b2: Merge "Add a compatibility symbol for the MemoryBase constructor."
* commit '9b57ad737bceba9f8d4f5be303c70fa72be00eaf':
  Add a compatibility symbol for the MemoryBase constructor.
2013-03-13 23:11:00 -07:00
Elliott Hughes
7212ff29c6 am 20e154f1: Merge "Second try at adding a compatibility symbol for the MemoryBase constructor."
* commit '20e154f16f315d7ae0b3204db0004d19a8b0bc48':
  Second try at adding a compatibility symbol for the MemoryBase constructor.
2013-03-13 22:40:26 -07:00
Elliott Hughes
20e154f16f Merge "Second try at adding a compatibility symbol for the MemoryBase constructor." 2013-03-14 04:35:13 +00:00
Elliott Hughes
ddd286301b Second try at adding a compatibility symbol for the MemoryBase constructor.
Third-party libraries are currently trying to use the
MemoryBase constructor but failing because we fixed the
definition of ssize_t. This is a stop-gap for users of
this private API until we can get them fixed.

Bug: 8253769
Change-Id: Ie7c86f45fa39cb53539cab0ffe8585a585656714
2013-03-13 20:54:01 -07:00
Elliott Hughes
6250f6cb2b am d8151306: Merge "Revert "Add a compatibility symbol for the MemoryBase constructor.""
* commit 'd8151306f539f8c2f3b66c1fe06be9566ba8aca3':
  Revert "Add a compatibility symbol for the MemoryBase constructor."
2013-03-13 20:32:33 -07:00
Elliott Hughes
d8151306f5 Merge "Revert "Add a compatibility symbol for the MemoryBase constructor."" 2013-03-14 02:56:48 +00:00
Elliott Hughes
6dbf07d7d5 Revert "Add a compatibility symbol for the MemoryBase constructor."
This reverts commit 7f974ff2f3

Change-Id: I28ebfc5ac88bd025471b613aa7958d23749e6991
2013-03-14 02:56:34 +00:00
Elliott Hughes
9b57ad737b am 8facd1b2: Merge "Add a compatibility symbol for the MemoryBase constructor."
* commit '8facd1b2ea02796b575f123b420590d2b8354910':
  Add a compatibility symbol for the MemoryBase constructor.
2013-03-13 19:28:17 -07:00
Elliott Hughes
8facd1b2ea Merge "Add a compatibility symbol for the MemoryBase constructor." 2013-03-14 01:19:44 +00:00
Elliott Hughes
7f974ff2f3 Add a compatibility symbol for the MemoryBase constructor.
Third-party libraries are currently trying to use the
MemoryBase constructor but failing because we fixed the
definition of ssize_t. This is a stop-gap for users of
this private API until we can get them fixed.

Bug: 8253769
Change-Id: I8a19770f3252d88ee87023fde625cc6289924b0d
2013-03-13 18:19:20 -07:00
Jeff Sharkey
27f9e6d849 Support broadcast when dumpstate finishes.
Add flag that sends BUGREPORT_FINISHED broadcast when dumpstate
is finished, including the resulting filesystem paths.  Also reduces
directory creation to 0770.

Bug: 7005318
Change-Id: Id4c6b699a56f8acd859b7ab73368500e1a8f3c67
2013-03-13 16:59:27 -07:00
Mathias Agopian
6a531717cd size IMemoryHeap properly for screenshots
since we're using glReadPixels(), we only need to use
the width (as opposed to the stride) of the source
screenshot.

Bug: 8374664
Change-Id: I145c80f4fff5444df7c77c4f52e70a7203caddbd
2013-03-13 15:22:11 -07:00
Jeff Tinker
56c78c47d8 Updated MediaDrm API based on review input.
Change-Id: I06716d2616bbe7efaea6cbf9ba7bf303dfae1650
2013-03-13 13:35:36 -07:00
Mathias Agopian
35ffa6a868 Surface can now be created only from an IGraphicBufferProducer
it can't write itself to a parcel, nor can it be created from a
parcel.

Change-Id: I69165d5c54d6024b3e546e80d8b57e3dedda7893
2013-03-12 18:45:09 -07:00
Mathias Agopian
4d9b822e2c get rid of ISurface
ISurface was only used to get the IGraphicBufferProducer from
a Layer. It's now replaced by a BBinder subclass / IBinder and
is only used as a handle to the surface, to both refer to it
and manage its life-time.

Also cleaned-up a bit the ISurfaceComposer interface and
"create layer" code path.

Change-Id: I68d0e02d57b862cffb31d5168c3bc10cea0906eb
2013-03-12 17:11:48 -07:00
Jamie Gennis
f44e9f91f3 Merge "atrace: add the webview category" into jb-mr2-dev 2013-03-12 19:21:30 +00:00
Mathias Agopian
f795852b54 temporary: enable ASSERTs in RefBase
this is in an attempt to get more data on
bug 8328715.

Change-Id: I9333a67c2d7f67f4d9b2fc5eb1ad8a7b2d1c6dcb
2013-03-11 21:27:16 -07:00
Mathias Agopian
b7a5b05b53 Fix missing recents screenshots
We were using the "visible layer list" when taking screenshots,
which doesn't work when a layer is behind other opaque layers
and therefore hidden.

We fix this by using the full layer list, filtered by the
layerstack of the display we're looking at.

Bug: 7552304
Change-Id: I4b6f77e5511aea94f8d218975b6e22738e7e5d5b
2013-03-11 20:47:24 -07:00
Jamie Gennis
b2a89e3155 atrace: add the webview category
Change-Id: Iefb552cd275bb5784903e8bf328890ecd233e45b
2013-03-11 19:41:28 -07:00
Michael Wright
2aee1b01b7 Merge "Add TOUCH_NAVIGATION input source" into jb-mr2-dev 2013-03-12 01:15:48 +00:00
Mathias Agopian
d2d5a64aa2 workaround a deadlock when taking screenshots into a surface
When disconnecting from BufferQueue, we now drain the queue
except the head (which means in the screenshot case we won't
have to block, but we might not have a buffer to show, this
will appear as an error in the log).

Bug: 8362363
Change-Id: If80989aac3c917beea2ebddf3cbb502849d394da
2013-03-11 17:59:59 -07:00
Romain Guy
dbca4a0ee5 Merge "Add Thread::isRunning and Condition::signal(WakeUpType)" into jb-mr2-dev 2013-03-11 21:38:26 +00:00
Romain Guy
9447be65c3 Add Thread::isRunning and Condition::signal(WakeUpType)
The signal() method is useful to choose whether to wake up one or
all threads.

Change-Id: I062ab6d3ddd306a9fb735549ea140e2a76eed75a
2013-03-11 14:34:56 -07:00
Michael Wright
aadaca7169 Add TOUCH_NAVIGATION input source
Change-Id: Id76e2e85246269ba7b16bb9635e41593b45cac1c
2013-03-11 14:20:14 -07:00
Jean-Baptiste Queru
5c19de4d07 am 1d6e52d1: am 50d36d58: am 75bcd737: am 4ddcb758: (-s ours) am 9ef024ec: (-s ours) Reconcile with jb-mr1-release - do not merge
* commit '1d6e52d17e2df913e10925c5e3e652d3421ff320':
2013-03-11 13:44:33 -07:00
Jean-Baptiste Queru
1d6e52d17e am 50d36d58: am 75bcd737: am 4ddcb758: (-s ours) am 9ef024ec: (-s ours) Reconcile with jb-mr1-release - do not merge
* commit '50d36d58369cdf48bc6fcdba96b36c846be8587a':
2013-03-11 13:13:37 -07:00
Jean-Baptiste Queru
50d36d5836 am 75bcd737: am 4ddcb758: (-s ours) am 9ef024ec: (-s ours) Reconcile with jb-mr1-release - do not merge
* commit '75bcd737770f85114673c4411b8e2ecc0dd32bdf':
2013-03-11 13:00:44 -07:00
Jean-Baptiste Queru
75bcd73777 am 4ddcb758: (-s ours) am 9ef024ec: (-s ours) Reconcile with jb-mr1-release - do not merge
* commit '4ddcb75861cfb2835fcc20f2071222d2f55450ba':
2013-03-11 12:41:50 -07:00
jp abgrall
574d6902b7 am ba8abb51: Merge "Ensure dumpstate children die"
* commit 'ba8abb517d1eddebeda62bf907fa446e3c3b81f6':
  Ensure dumpstate children die
2013-03-11 12:28:06 -07:00
Jean-Baptiste Queru
4ddcb75861 am 9ef024ec: (-s ours) Reconcile with jb-mr1-release - do not merge
* commit '9ef024ec8ae0318c89cc65dc0591aa40695393fc':
2013-03-11 12:23:09 -07:00
Jean-Baptiste Queru
9ef024ec8a Reconcile with jb-mr1-release - do not merge 2013-03-11 12:19:30 -07:00
jp abgrall
ba8abb517d Merge "Ensure dumpstate children die" 2013-03-11 18:09:35 +00:00
John Michelau
e7b6cf13f9 Ensure dumpstate children die
Use prctl(PR_SET_PDEATHSIG, SIGKILL) in each forked child to ensure
it dies when dumpstate dies.

This is important for two cases:
- dumpstate runs a timer for each child process.  On expiration, it
  sends SIGTERM to kill the process.  Sometimes SIGTERM isn't enough
  to kill a hung process, so the child lives on.
- When dumpstate is killed by the user before completing, outstanding
  children continue to run and generate output.

Change-Id: I96e0dc918c26d56c9fee53611980ba2edd238712
2013-03-11 11:44:15 -05:00
Mathias Agopian
d577641411 make sure to call compositionComplete after taking a screenshot
older drivers which are doing implicit synchronization need this
or they could deadlock.

Bug: 8341885
Change-Id: Icd980a6be16071678d6151e34725b3c1c547d7ee
2013-03-08 13:54:46 -08:00
Mathias Agopian
7589b2a797 add two libgui tests
we check that the order in which we destroy GLConsumer wrt.
releasing the corresponding EGLSurface via eglMake(Un)Current
doesn't leak a buffer.

On at least 2 devices this test doesn't pass.

Change-Id: I63ab83951b4b0a977f38571158f948cbd9dc7cec
2013-03-08 13:22:03 -08:00
Mathias Agopian
6b2b700956 Merge changes Ibb3b6ff0,I2341e20c into jb-mr2-dev
* changes:
  rename binder services main thread to Binder_*
  limit number of extra binder threads in SF to 4
2013-03-08 20:28:43 +00:00
Jesse Hall
49385ec7c3 Merge "When disconnecting a surface, cancel don't queue the buffer" into jb-mr2-dev 2013-03-07 23:43:56 +00:00
Jesse Hall
86306b5876 Merge "Defer destroying surfaces until not current" into jb-mr2-dev 2013-03-07 23:41:45 +00:00