OSDN Git Service

android-x86/frameworks-native.git
11 years agoget rid of purgatory and fix QueuesToWindowComposer query
Mathias Agopian [Fri, 15 Mar 2013 02:18:13 +0000 (19:18 -0700)]
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

11 years agoam 7212ff29: am 20e154f1: Merge "Second try at adding a compatibility symbol for...
Elliott Hughes [Thu, 14 Mar 2013 17:31:38 +0000 (10:31 -0700)]
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.

11 years agoMerge "Increase screenshot timeout." into jb-mr2-dev
Jeff Sharkey [Thu, 14 Mar 2013 17:21:08 +0000 (17:21 +0000)]
Merge "Increase screenshot timeout." into jb-mr2-dev

11 years agoIncrease screenshot timeout.
Jeff Sharkey [Thu, 14 Mar 2013 17:20:31 +0000 (10:20 -0700)]
Increase screenshot timeout.

Devices with large displays take longer than 5 seconds to write.

Change-Id: If74bc4a3cec366ae28eca549bce28ef212e47d8f

11 years agoam 6250f6cb: am d8151306: Merge "Revert "Add a compatibility symbol for the MemoryBas...
Elliott Hughes [Thu, 14 Mar 2013 15:55:49 +0000 (08:55 -0700)]
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."

11 years agoMerge "Support broadcast when dumpstate finishes." into jb-mr2-dev
Jeff Sharkey [Thu, 14 Mar 2013 15:44:15 +0000 (15:44 +0000)]
Merge "Support broadcast when dumpstate finishes." into jb-mr2-dev

11 years agoRevert "Add a compatibility symbol for the MemoryBase constructor."
Elliott Hughes [Thu, 14 Mar 2013 02:56:34 +0000 (02:56 +0000)]
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 7f974ff2f317ffbf9256579109f000ec876c3037

Change-Id: I1b123f446d0ff41e11ff81d4ef5f1472b59cac93

11 years agoam 9b57ad73: am 8facd1b2: Merge "Add a compatibility symbol for the MemoryBase constr...
Elliott Hughes [Thu, 14 Mar 2013 06:11:00 +0000 (23:11 -0700)]
am 9b57ad73: am 8facd1b2: Merge "Add a compatibility symbol for the MemoryBase constructor."

* commit '9b57ad737bceba9f8d4f5be303c70fa72be00eaf':
  Add a compatibility symbol for the MemoryBase constructor.

11 years agoam 20e154f1: Merge "Second try at adding a compatibility symbol for the MemoryBase...
Elliott Hughes [Thu, 14 Mar 2013 05:40:26 +0000 (22:40 -0700)]
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.

11 years agoMerge "Second try at adding a compatibility symbol for the MemoryBase constructor."
Elliott Hughes [Thu, 14 Mar 2013 04:35:13 +0000 (04:35 +0000)]
Merge "Second try at adding a compatibility symbol for the MemoryBase constructor."

11 years agoSecond try at adding a compatibility symbol for the MemoryBase constructor.
Elliott Hughes [Thu, 14 Mar 2013 03:54:01 +0000 (20:54 -0700)]
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

11 years agoam d8151306: Merge "Revert "Add a compatibility symbol for the MemoryBase constructor.""
Elliott Hughes [Thu, 14 Mar 2013 03:32:33 +0000 (20:32 -0700)]
am d8151306: Merge "Revert "Add a compatibility symbol for the MemoryBase constructor.""

* commit 'd8151306f539f8c2f3b66c1fe06be9566ba8aca3':
  Revert "Add a compatibility symbol for the MemoryBase constructor."

11 years agoMerge "Revert "Add a compatibility symbol for the MemoryBase constructor.""
Elliott Hughes [Thu, 14 Mar 2013 02:56:48 +0000 (02:56 +0000)]
Merge "Revert "Add a compatibility symbol for the MemoryBase constructor.""

11 years agoRevert "Add a compatibility symbol for the MemoryBase constructor."
Elliott Hughes [Thu, 14 Mar 2013 02:56:34 +0000 (02:56 +0000)]
Revert "Add a compatibility symbol for the MemoryBase constructor."

This reverts commit 7f974ff2f317ffbf9256579109f000ec876c3037

Change-Id: I28ebfc5ac88bd025471b613aa7958d23749e6991

11 years agoam 8facd1b2: Merge "Add a compatibility symbol for the MemoryBase constructor."
Elliott Hughes [Thu, 14 Mar 2013 02:28:17 +0000 (19:28 -0700)]
am 8facd1b2: Merge "Add a compatibility symbol for the MemoryBase constructor."

* commit '8facd1b2ea02796b575f123b420590d2b8354910':
  Add a compatibility symbol for the MemoryBase constructor.

11 years agoMerge "Add a compatibility symbol for the MemoryBase constructor."
Elliott Hughes [Thu, 14 Mar 2013 01:19:44 +0000 (01:19 +0000)]
Merge "Add a compatibility symbol for the MemoryBase constructor."

11 years agoAdd a compatibility symbol for the MemoryBase constructor.
Elliott Hughes [Wed, 13 Mar 2013 21:35:55 +0000 (14:35 -0700)]
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

11 years agoSupport broadcast when dumpstate finishes.
Jeff Sharkey [Wed, 13 Mar 2013 22:45:50 +0000 (15:45 -0700)]
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

11 years agosize IMemoryHeap properly for screenshots
Mathias Agopian [Wed, 13 Mar 2013 22:22:11 +0000 (15:22 -0700)]
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

11 years agoSurface can now be created only from an IGraphicBufferProducer
Mathias Agopian [Wed, 13 Mar 2013 01:45:09 +0000 (18:45 -0700)]
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

11 years agoget rid of ISurface
Mathias Agopian [Wed, 13 Mar 2013 00:11:48 +0000 (17:11 -0700)]
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

11 years agoMerge "atrace: add the webview category" into jb-mr2-dev
Jamie Gennis [Tue, 12 Mar 2013 19:21:29 +0000 (19:21 +0000)]
Merge "atrace: add the webview category" into jb-mr2-dev

11 years agotemporary: enable ASSERTs in RefBase
Mathias Agopian [Tue, 12 Mar 2013 04:27:16 +0000 (21:27 -0700)]
temporary: enable ASSERTs in RefBase

this is in an attempt to get more data on
bug 8328715.

Change-Id: I9333a67c2d7f67f4d9b2fc5eb1ad8a7b2d1c6dcb

11 years agoFix missing recents screenshots
Mathias Agopian [Tue, 12 Mar 2013 03:47:24 +0000 (20:47 -0700)]
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

11 years agoatrace: add the webview category
Jamie Gennis [Tue, 12 Mar 2013 02:37:53 +0000 (19:37 -0700)]
atrace: add the webview category

Change-Id: Iefb552cd275bb5784903e8bf328890ecd233e45b

11 years agoMerge "Add TOUCH_NAVIGATION input source" into jb-mr2-dev
Michael Wright [Tue, 12 Mar 2013 01:15:48 +0000 (01:15 +0000)]
Merge "Add TOUCH_NAVIGATION input source" into jb-mr2-dev

11 years agoworkaround a deadlock when taking screenshots into a surface
Mathias Agopian [Tue, 12 Mar 2013 00:59:59 +0000 (17:59 -0700)]
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

11 years agoMerge "Add Thread::isRunning and Condition::signal(WakeUpType)" into jb-mr2-dev
Romain Guy [Mon, 11 Mar 2013 21:38:26 +0000 (21:38 +0000)]
Merge "Add Thread::isRunning and Condition::signal(WakeUpType)" into jb-mr2-dev

11 years agoAdd Thread::isRunning and Condition::signal(WakeUpType)
Romain Guy [Mon, 11 Mar 2013 21:34:56 +0000 (14:34 -0700)]
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

11 years agoAdd TOUCH_NAVIGATION input source
Michael Wright [Mon, 11 Mar 2013 21:20:14 +0000 (14:20 -0700)]
Add TOUCH_NAVIGATION input source

Change-Id: Id76e2e85246269ba7b16bb9635e41593b45cac1c

11 years agoam 1d6e52d1: am 50d36d58: am 75bcd737: am 4ddcb758: (-s ours) am 9ef024ec: (-s ours...
Jean-Baptiste Queru [Mon, 11 Mar 2013 20:44:33 +0000 (13:44 -0700)]
am 1d6e52d1: am 50d36d58: am 75bcd737: am 4ddcb758: (-s ours) am 9ef024ec: (-s ours) Reconcile with jb-mr1-release - do not merge

* commit '1d6e52d17e2df913e10925c5e3e652d3421ff320':

11 years agoam 50d36d58: am 75bcd737: am 4ddcb758: (-s ours) am 9ef024ec: (-s ours) Reconcile...
Jean-Baptiste Queru [Mon, 11 Mar 2013 20:13:37 +0000 (13:13 -0700)]
am 50d36d58: am 75bcd737: am 4ddcb758: (-s ours) am 9ef024ec: (-s ours) Reconcile with jb-mr1-release - do not merge

* commit '50d36d58369cdf48bc6fcdba96b36c846be8587a':

11 years agoam 75bcd737: am 4ddcb758: (-s ours) am 9ef024ec: (-s ours) Reconcile with jb-mr1...
Jean-Baptiste Queru [Mon, 11 Mar 2013 20:00:44 +0000 (13:00 -0700)]
am 75bcd737: am 4ddcb758: (-s ours) am 9ef024ec: (-s ours) Reconcile with jb-mr1-release - do not merge

* commit '75bcd737770f85114673c4411b8e2ecc0dd32bdf':

11 years agoam 4ddcb758: (-s ours) am 9ef024ec: (-s ours) Reconcile with jb-mr1-release - do...
Jean-Baptiste Queru [Mon, 11 Mar 2013 19:41:50 +0000 (12:41 -0700)]
am 4ddcb758: (-s ours) am 9ef024ec: (-s ours) Reconcile with jb-mr1-release - do not merge

* commit '4ddcb75861cfb2835fcc20f2071222d2f55450ba':

11 years agoam ba8abb51: Merge "Ensure dumpstate children die"
jp abgrall [Mon, 11 Mar 2013 19:28:06 +0000 (12:28 -0700)]
am ba8abb51: Merge "Ensure dumpstate children die"

* commit 'ba8abb517d1eddebeda62bf907fa446e3c3b81f6':
  Ensure dumpstate children die

11 years agoam 9ef024ec: (-s ours) Reconcile with jb-mr1-release - do not merge
Jean-Baptiste Queru [Mon, 11 Mar 2013 19:23:09 +0000 (12:23 -0700)]
am 9ef024ec: (-s ours) Reconcile with jb-mr1-release - do not merge

* commit '9ef024ec8ae0318c89cc65dc0591aa40695393fc':

11 years agoReconcile with jb-mr1-release - do not merge
Jean-Baptiste Queru [Mon, 11 Mar 2013 19:19:30 +0000 (12:19 -0700)]
Reconcile with jb-mr1-release - do not merge

11 years agoMerge "Ensure dumpstate children die"
jp abgrall [Mon, 11 Mar 2013 18:09:35 +0000 (18:09 +0000)]
Merge "Ensure dumpstate children die"

11 years agoEnsure dumpstate children die
John Michelau [Thu, 7 Mar 2013 21:35:35 +0000 (15:35 -0600)]
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

11 years agomake sure to call compositionComplete after taking a screenshot
Mathias Agopian [Fri, 8 Mar 2013 21:54:46 +0000 (13:54 -0800)]
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

11 years agoadd two libgui tests
Mathias Agopian [Fri, 8 Mar 2013 21:18:52 +0000 (13:18 -0800)]
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

11 years agoMerge changes Ibb3b6ff0,I2341e20c into jb-mr2-dev
Mathias Agopian [Fri, 8 Mar 2013 20:28:42 +0000 (20:28 +0000)]
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

11 years agoMerge "When disconnecting a surface, cancel don't queue the buffer" into jb-mr2-dev
Jesse Hall [Thu, 7 Mar 2013 23:43:56 +0000 (23:43 +0000)]
Merge "When disconnecting a surface, cancel don't queue the buffer" into jb-mr2-dev

11 years agoMerge "Defer destroying surfaces until not current" into jb-mr2-dev
Jesse Hall [Thu, 7 Mar 2013 23:41:45 +0000 (23:41 +0000)]
Merge "Defer destroying surfaces until not current" into jb-mr2-dev

11 years agorename binder services main thread to Binder_*
Mathias Agopian [Thu, 7 Mar 2013 23:34:28 +0000 (15:34 -0800)]
rename binder services main thread to Binder_*

When a binder service's main thread joins the thread pool
it retains its name (whatever the exec name was), which is
very confusing in systrace.

we now rename that thread just like its friends in the
thread pool.

Change-Id: Ibb3b6ff07304b247cfc6fb1694e72350c579513e

11 years agolimit number of extra binder threads in SF to 4
Mathias Agopian [Thu, 7 Mar 2013 23:32:47 +0000 (15:32 -0800)]
limit number of extra binder threads in SF to 4

it should be enough and it makes debugging easier.

Bug: 6609290
Change-Id: I2341e20cfcfde184fe1ed9b925215f8fa3481ced

11 years agoWhen disconnecting a surface, cancel don't queue the buffer
Jesse Hall [Thu, 7 Mar 2013 23:14:18 +0000 (15:14 -0800)]
When disconnecting a surface, cancel don't queue the buffer

This isn't really right either, but avoids having an extra buffer that
the consumer has to drain which it might not be expecting.

To be correct, disconnecting a surface from a context should retain
the current buffer and continue using it when reconnected. The buffer
should only be canceled when the surface is destroyed. That will wait
for a later change.

Bug: 8320762
Change-Id: I5efa39c741193ca4f5612ea9de001ccbb683b345

11 years agoDefer destroying surfaces until not current
Jesse Hall [Thu, 7 Mar 2013 17:56:26 +0000 (09:56 -0800)]
Defer destroying surfaces until not current

Bug: 8320762
Change-Id: I1320cf87923bcc5b795a86a13193363a49e29653

11 years agoresolved conflicts for merge of bfb2aa46 to jb-mr2-dev
Jean-Baptiste Queru [Thu, 7 Mar 2013 19:35:19 +0000 (11:35 -0800)]
resolved conflicts for merge of bfb2aa46 to jb-mr2-dev

11 years agoMerge "Tweaks for forward compatibility"
Jean-Baptiste Queru [Thu, 7 Mar 2013 19:08:08 +0000 (19:08 +0000)]
Merge "Tweaks for forward compatibility"

11 years agoanother attempt to fix the build
Mathias Agopian [Thu, 7 Mar 2013 06:37:33 +0000 (22:37 -0800)]
another attempt to fix the build

Change-Id: Ie0245db97170cca9a2cd8783b0fd512daf0d30a6

11 years agoattempt to fix build
Mathias Agopian [Thu, 7 Mar 2013 05:34:39 +0000 (21:34 -0800)]
attempt to fix build

Change-Id: Ifb186d2f157ad02f593bf9b681aab53575f183ce

11 years agoMerge changes I7f696e42,I51c6df3c into jb-mr2-dev
Mathias Agopian [Thu, 7 Mar 2013 04:52:24 +0000 (04:52 +0000)]
Merge changes I7f696e42,I51c6df3c into jb-mr2-dev

* changes:
  Make GraphicBuffer a RefBase
  Fix RefBase debugging. O_CREAT must specify the mode.

11 years agoworkaround to fix screenshot leak on N4
Mathias Agopian [Thu, 7 Mar 2013 04:42:56 +0000 (20:42 -0800)]
workaround to fix screenshot leak on N4

Bug: 8322020

Change-Id: Ie60af0eb431866b8d64b2674ae7bd8b5ee05f5d6

11 years agoMake GraphicBuffer a RefBase
Mathias Agopian [Thu, 7 Mar 2013 02:50:52 +0000 (18:50 -0800)]
Make GraphicBuffer a RefBase

- this gives us access to RefBase's refcounting debugging
- it doesn't cost much because GraphicBuffer already has a vtable

Change-Id: I7f696e421fea14b14bfaeb83880689b83e96af4d

11 years agoFix RefBase debugging. O_CREAT must specify the mode.
Mathias Agopian [Thu, 7 Mar 2013 01:51:15 +0000 (17:51 -0800)]
Fix RefBase debugging. O_CREAT must specify the mode.

Change-Id: I51c6df3cfd59b20ca73c3edee86bc2f74dbde1b1

11 years agoMerge changes I66511c08,Ia051949f,Ic7451365,I5b571a4c into jb-mr2-dev
Mathias Agopian [Thu, 7 Mar 2013 01:47:34 +0000 (01:47 +0000)]
Merge changes I66511c08,Ia051949f,Ic7451365,I5b571a4c into jb-mr2-dev

* changes:
  Get rid of LayerBase.
  Make LayerDim a regular Layer instead of a LayerBase
  fold LayerBaseClient into LayerBase
  Remove support for ScreenshotLayer

11 years agoTweaks for forward compatibility
Jean-Baptiste Queru [Wed, 6 Mar 2013 23:04:42 +0000 (15:04 -0800)]
Tweaks for forward compatibility

Change-Id: I136fcbbc14072ee5f5281d09445f28d083ed3ce1

11 years agoGet rid of LayerBase.
Mathias Agopian [Wed, 6 Mar 2013 01:47:11 +0000 (17:47 -0800)]
Get rid of LayerBase.

The functionality of LayerBase and Layer is folded
into Layer. There wasn't a need for this abstraction
anymore.

Change-Id: I66511c08cc3d89009ba4deabf47e26cd4cfeaefb

11 years agoMake LayerDim a regular Layer instead of a LayerBase
Mathias Agopian [Tue, 5 Mar 2013 23:50:58 +0000 (15:50 -0800)]
Make LayerDim a regular Layer instead of a LayerBase

this is in preparation to get rid of LayerBase entirely

Change-Id: Ia051949fc5205fd87371331145356ee11598a597

11 years agofold LayerBaseClient into LayerBase
Mathias Agopian [Tue, 5 Mar 2013 23:14:58 +0000 (15:14 -0800)]
fold LayerBaseClient into LayerBase

Change-Id: Ic745136522df59c42f0885fd969e75ea55d09f01

11 years agoRemove support for ScreenshotLayer
Mathias Agopian [Tue, 5 Mar 2013 22:51:39 +0000 (14:51 -0800)]
Remove support for ScreenshotLayer

Change-Id: I5b571a4cf3faa77d2c4aca916fa4bd00a1065bb9

11 years agoReturn NO_MEMORY when glReadPixels() fails.
Jeff Sharkey [Wed, 6 Mar 2013 01:57:26 +0000 (17:57 -0800)]
Return NO_MEMORY when glReadPixels() fails.

Change-Id: Ic66134ef457e8442ae9135e9ec50e3d02932a253

11 years agoMerge "CpuConsumer_test: Extend test with new formats RGBA8888 and optional Y8/Y16...
Igor Murashkin [Tue, 5 Mar 2013 21:58:00 +0000 (21:58 +0000)]
Merge "CpuConsumer_test: Extend test with new formats RGBA8888 and optional Y8/Y16" into jb-mr2-dev

11 years agoCpuConsumer_test: Extend test with new formats RGBA8888 and optional Y8/Y16
Igor Murashkin [Wed, 6 Feb 2013 01:54:32 +0000 (17:54 -0800)]
CpuConsumer_test: Extend test with new formats RGBA8888 and optional Y8/Y16

Change-Id: I0a0f6ce73516883bf50c749a1759abbdb3748e08

11 years agoAdd eglPresentationTimeANDROID
Andy McFadden [Sat, 2 Mar 2013 00:25:32 +0000 (16:25 -0800)]
Add eglPresentationTimeANDROID

Added EGL extension to set a timestamp on a surface.

Also, fix JNI encoding of "long" in glgen.

Bug 8191230

Change-Id: I38b7334bade3f8ff02bffe600bb74469ef22c164

11 years agoMerge "rework screenshot API and implementation" into jb-mr2-dev
Mathias Agopian [Tue, 5 Mar 2013 02:30:13 +0000 (02:30 +0000)]
Merge "rework screenshot API and implementation" into jb-mr2-dev

11 years agoMerge "Init displays to null layer stack" into jb-mr2-dev
Jesse Hall [Tue, 5 Mar 2013 01:04:53 +0000 (01:04 +0000)]
Merge "Init displays to null layer stack" into jb-mr2-dev

11 years agoMerge changes I0e90b3f3,Ib7769bde,I4c25f34f,I1ec6400a into jb-mr2-dev
Mathias Agopian [Mon, 4 Mar 2013 22:12:23 +0000 (22:12 +0000)]
Merge changes I0e90b3f3,Ib7769bde,I4c25f34f,I1ec6400a into jb-mr2-dev

* changes:
  implement display projection clipping in h/w composer
  refactor the crop region for hwc is calculated/set
  apply the projection's viewport to the visibleregion passed to hwc
  set correct crop rectangle in LayerBase::setCrop

11 years agoFix reading NULL Surfaces from Parcels
Jesse Hall [Sun, 3 Mar 2013 00:25:32 +0000 (16:25 -0800)]
Fix reading NULL Surfaces from Parcels

Writing a NULL Surface was being read as a non-NULL Surface with NULL
mGraphicBufferProducer. Before the SurfaceTextureClient -> Surface
refactoring, you'd get a NULL Surface, and some code relies on that.

Bug: 8291161
Change-Id: I477bfe8882693e53a5f604a3d2c9e3cfe24473b4

11 years agorework screenshot API and implementation
Mathias Agopian [Fri, 1 Mar 2013 21:42:57 +0000 (13:42 -0800)]
rework screenshot API and implementation

- SurfaceFlinger now supports to take a screenshot
  directly into an IGraphicBufferProducer

- reimplement the IMemoryHeap screenshot on top
  of the above

- reimplement LayerScreenshot such that its
  BufferQueue is directly used as the destination
  of the screenshot. LayerScreenshot is now a thin
  wrapper around Layer

Bug: 6940974

Change-Id: I69a2096b44b91acbb99eba16f83a9c78d94e0d10

11 years agoRevert "Change SurfaceControl setPosition to take floats"
Dave Burke [Fri, 1 Mar 2013 20:39:03 +0000 (20:39 +0000)]
Revert "Change SurfaceControl setPosition to take floats"

Temporary, to fix weekend build, until we get Nvidia code drop.

This reverts commit 9a867a8798fa6ea21f6341db31e38ea64fde6c83

DO NOT MERGE

Change-Id: I7b5dbc4db46ef3d97dc8598057d5487d6971178b

11 years agoam 22641851: Merge "dumpstate: use correct header file."
Nick Kralevich [Fri, 1 Mar 2013 18:05:56 +0000 (18:05 +0000)]
am 22641851: Merge "dumpstate: use correct header file."

* commit '22641851c48fee6e79d01adcfab01c0b625cfb3c':
  dumpstate: use correct header file.

11 years agoMerge "installd: use correct header file." into jb-mr2-dev
Nick Kralevich [Fri, 1 Mar 2013 17:42:32 +0000 (17:42 +0000)]
Merge "installd: use correct header file." into jb-mr2-dev

11 years agoMerge "dumpstate: use correct header file."
Nick Kralevich [Fri, 1 Mar 2013 16:39:57 +0000 (16:39 +0000)]
Merge "dumpstate: use correct header file."

11 years agoInit displays to null layer stack
Jesse Hall [Wed, 20 Feb 2013 00:13:35 +0000 (16:13 -0800)]
Init displays to null layer stack

When a display is added, initialize it to use an empty layer stack, so
if it is somehow visible it will show black. It will be assigned the
real layer stack -- along with a projection and other properties -- by
window manager soon. Normally a display remains blanked until window
manager has decided what to show on it, but for HDMI connected at boot
that isn't currently the case.

Bug: 7258935
Change-Id: Ic9bb25f7a9b8d9d3772b097ab1d6fa03bc8780a1

11 years agoimplement display projection clipping in h/w composer
Mathias Agopian [Fri, 1 Mar 2013 01:12:07 +0000 (17:12 -0800)]
implement display projection clipping in h/w composer

- cropping to the projection's "viewport" is "simply"
  accomplished by intersecting it with the window crop
  expressed in layerstack space.

Bug: 7149437
Change-Id: I0e90b3f37945292314b5d78a8f134935967e8053

11 years agorefactor the crop region for hwc is calculated/set
Mathias Agopian [Thu, 28 Feb 2013 06:03:19 +0000 (22:03 -0800)]
refactor the crop region for hwc is calculated/set

- the crop region is now always calculated and set
  in LayerBase::setGeometry which uses new virtuals to
  access the "content" crop and transform (which are
  provided by the Layer subclass)

Change-Id: Ib7769bdec0917dd248f926600c14ddf9ea84897a

11 years agoapply the projection's viewport to the visibleregion passed to hwc
Mathias Agopian [Wed, 27 Feb 2013 00:54:05 +0000 (16:54 -0800)]
apply the projection's viewport to the visibleregion passed to hwc

each desplay's projection's viewport essentially clips each layer,
so this should be reflected in the visibleregion passed to
h/w composer.

DisplayDevice getViewport and getFrame are now guaranteed to return
valid Rects.

Change-Id: I4c25f34fb26af10179eb26d429ca6c384c671e91

11 years agoset correct crop rectangle in LayerBase::setCrop
Mathias Agopian [Wed, 27 Feb 2013 00:37:53 +0000 (16:37 -0800)]
set correct crop rectangle in LayerBase::setCrop

The crop always had left=top=0, because the crop position
and the layer's transform were merged together in
computeBounds() (which really used to compute the
bounds in screen space, which we usually call the
"frame" elsewhere in the code)

Note: in practice this crop value is not used by
hwc, because it's overridden in Layer::setGeometry(), which
is why this bug was never apparent.

Change-Id: I1ec6400a8fc8314408e4252708f43ea98c2fe64e

11 years agoinstalld: use correct header file.
Nick Kralevich [Fri, 1 Mar 2013 00:59:13 +0000 (16:59 -0800)]
installd: use correct header file.

This is a port of https://android-review.googlesource.com/52540 ,
which doesn't apply cleanly to master.

Change-Id: I2824bb7afd4e343b5dc8bed9f24002ec1dcbf07f

11 years agodumpstate: use correct header file.
Nick Kralevich [Fri, 1 Mar 2013 00:46:22 +0000 (16:46 -0800)]
dumpstate: use correct header file.

Change-Id: I006d7a219ce6309259f271beff6011cc266f1a61

11 years agoCpuConsumer: Add optional asynchronous mode
Eino-Ville Talvala [Thu, 28 Feb 2013 19:01:32 +0000 (11:01 -0800)]
CpuConsumer: Add optional asynchronous mode

Bug: 8290146
Bug: 8291751

Change-Id: I9c8ac4bff38b0411e987a204e540d018dba6d0b4

11 years agoCpuConsumer: Don't unlock buffers on producer disconnect
Eino-Ville Talvala [Thu, 28 Feb 2013 22:08:34 +0000 (14:08 -0800)]
CpuConsumer: Don't unlock buffers on producer disconnect

Bug: 8291751

Change-Id: I062a3d34b41183d07fb6b9109cdb6bf0c0c75672

11 years agoInitialize DisplayData fences to NO_FENCE, not NULL
Jesse Hall [Thu, 28 Feb 2013 00:39:25 +0000 (16:39 -0800)]
Initialize DisplayData fences to NO_FENCE, not NULL

Also fix another place that was checking for NULL fence rather than
Fence::isValid().

Bug 8283950

Change-Id: Ie06db327eb416828d8dac139171d96d4470b2e35

11 years agoAdd createTJunctionFreeRegion
Chris Craik [Tue, 26 Feb 2013 03:12:47 +0000 (19:12 -0800)]
Add createTJunctionFreeRegion

T-junction free regions are useful for rendering regions with various
geometric transformations, and the Region's span-ordered, sorted rect
list supports T-junction free storage without modification.

This approach creates a T-junction free region by splitting each
rectangle that is part of a vertical T-junction. This approach is two
pass (up and down) so that divisions can trickle up/down to other
adjacent spans.

Change-Id: Ifcf5e6fe0034c96b00ef09a4433b2b0fce8f4300

11 years agoMerge "GraphicBuffer.h: Remove redundant friend class declaration causing warnings...
Igor Murashkin [Wed, 27 Feb 2013 00:43:20 +0000 (00:43 +0000)]
Merge "GraphicBuffer.h: Remove redundant friend class declaration causing warnings" into jb-mr2-dev

11 years agoGraphicBuffer.h: Remove redundant friend class declaration causing warnings
Igor Murashkin [Tue, 26 Feb 2013 22:23:11 +0000 (14:23 -0800)]
GraphicBuffer.h: Remove redundant friend class declaration causing warnings

Change-Id: I8a4b0e0b4d0a1cf472de820553c31f2d42044543

11 years agoMerge "Added a test that checks the error behavior of ConsumerBase::abandon" into...
Mathias Agopian [Tue, 26 Feb 2013 00:53:28 +0000 (00:53 +0000)]
Merge "Added a test that checks the error behavior of ConsumerBase::abandon" into jb-mr2-dev

11 years agoMerge "add some missing parameter validation in GLES java bindings" into jb-mr2-dev
Mathias Agopian [Tue, 26 Feb 2013 00:53:13 +0000 (00:53 +0000)]
Merge "add some missing parameter validation in GLES java bindings" into jb-mr2-dev

11 years agoAdded a test that checks the error behavior of ConsumerBase::abandon
Mathias Agopian [Sat, 23 Feb 2013 03:34:49 +0000 (19:34 -0800)]
Added a test that checks the error behavior of ConsumerBase::abandon

We check that calling eglSwapBuffers() on an abandonned BufferQueue
return EGL_BAD_SURFACE -- this is to ensure consistancy between
drivers.

Change-Id: Ibb548e0cf767ceee69f2fc4a85811d15a6522277

11 years agoadd some missing parameter validation in GLES java bindings
Mathias Agopian [Sat, 23 Feb 2013 03:34:06 +0000 (19:34 -0800)]
add some missing parameter validation in GLES java bindings

- added support for comments in checks.spec
- added most missing checks
- added and commented with // special-cased functions
- added and commented with # functions that are still missing validation checks
- moved glGet* to a special case and updated all the "pnames" from the khronos spec
- changed ifcheck to default to 1 value. this allows us to simplify the checks.spec file
  and handle unknown pnames automatically (they'll be validated against 1 value, if
  it happens to need more, the call will go through but the validation will not
  happen).
- refactored the cpp headers in to a common header + GLES version specific
  header

Bug: 7402895
Change-Id: Ib5c68ca0ca416407b4cfa36e3a21901b2d6263ab

11 years agoSurfaceFlinger: fix a couple NULL fence checks
Jamie Gennis [Mon, 25 Feb 2013 21:37:54 +0000 (13:37 -0800)]
SurfaceFlinger: fix a couple NULL fence checks

This change replaces checks for a NULL fence pointer with calls to
Fence::isValid.  There should no longer be NULL fences.

Change-Id: If17c9c132fcb1801531bf7588f8ba53476c57dad

11 years agoMerge changes Ic344ef63,If9bb02be,Ic8f94634
Jesse Hall [Sun, 24 Feb 2013 00:18:55 +0000 (00:18 +0000)]
Merge changes Ic344ef63,If9bb02be,Ic8f94634

* changes:
  Symlink /system/lib/libGLESv3.so -> libGLESv2.so
  Add ES3 support to libGLESv2 and tracing tools
  Import OpenGL ES 3.0 headers from Khronos SVN

11 years agoMerge changes I45836219,I70a4075e
Jesse Hall [Sat, 23 Feb 2013 04:56:31 +0000 (04:56 +0000)]
Merge changes I45836219,I70a4075e

* changes:
  Regenerate API/trace files for constness change
  Import constness fix from gl3.h into gl2.h.

11 years agoMerge "sort the check file in alphabetical order"
Mathias Agopian [Sat, 23 Feb 2013 04:14:19 +0000 (04:14 +0000)]
Merge "sort the check file in alphabetical order"

11 years agoMerge "update glgen to take into account recent changes"
Mathias Agopian [Sat, 23 Feb 2013 04:13:57 +0000 (04:13 +0000)]
Merge "update glgen to take into account recent changes"

11 years agosort the check file in alphabetical order
Mathias Agopian [Sat, 23 Feb 2013 01:48:39 +0000 (17:48 -0800)]
sort the check file in alphabetical order

this simplifies a lot comparing it to the spec files.

Change-Id: I4b9b5e7469338a626100472d360ea26a902017bc

11 years agoupdate glgen to take into account recent changes
Mathias Agopian [Sat, 23 Feb 2013 04:04:22 +0000 (20:04 -0800)]
update glgen to take into account recent changes

- it looks like UserId has been renamed to UserHandle in the
framework.
- also for some reason I don't understand glgen didn't seem
to be up to date with respect to the generated bindings in the tree.
It's like the bindings were generated with a more recent version of
glgen (maybe it was never checked in). So we fix that here.

Change-Id: Ie49522ebf67fcab9213246b4d93500e37a3cbc05

11 years agoRemove obsolte 'su' from 'ping' call (to work on user build)
Dmitry Shmidt [Fri, 22 Feb 2013 19:27:58 +0000 (11:27 -0800)]
Remove obsolte 'su' from 'ping' call (to work on user build)

Change-Id: I2d391bbd39fc591eef33b9c9e4b4cdbda29e41e7
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>