3994 Commits

Author SHA1 Message Date
Stephen Hines
5b79842b4a Initialize all class members.
Change-Id: I2bb2701a9dde66f6c4484a62945c72ddf52248fa
2012-02-13 17:49:20 -08:00
Jeff Brown
072ec96a49 Implement batching of input events on the consumer side.
To support this feature, the input dispatcher now allows input
events to be acknowledged out-of-order.  As a result, the
consumer can choose to defer handling an input event from one
device (because it is building a big batch) while continuing
to handle input events from other devices.

The InputEventReceiver now sends a notification when a batch
is pending.  The ViewRoot handles this notification by scheduling
a draw on the next sync.  When the draw happens, the InputEventReceiver
is instructed to consume all pending batched input events, the
input event queue is fully processed (as much as possible),
and then the ViewRoot performs traversals as usual.

With these changes in place, the input dispatch latency is
consistently less than one frame as long as the application itself
isn't stalled.  Input events are delivered to the application
as soon as possible and are handled as soon as possible.  In practice,
it is no longer possible for an application to build up a huge
backlog of touch events.

This is part of a series of changes to improve input system pipelining.

Bug: 5963420

Change-Id: I42c01117eca78f12d66d49a736c1c122346ccd1d
2012-02-13 10:28:41 -08:00
Jeff Brown
d1c48a0525 Dispatch multiple touch events in parallel.
This change enables the input dispatcher to send multiple touch
events to an application without waiting for them to be acknowledged.
Essentially this is a variation on the old streaming optimization
but it is much more comprehensive.  Event dispatch will stall as
soon as 0.5sec of unacknowledged events are accumulated or a
focused event (such as a key event) needs to be delivered.

Streaming input events makes a tremendous difference in application
performance.  The next step will be to enable batching of input
events on the client side once again.

This is part of a series of changes to improve input system pipelining.

Bug: 5963420
Change-Id: I025df90c06165d719fcca7f63eed322a5cce4a78
2012-02-13 10:28:41 -08:00
Jeff Brown
cbee6d6ede Rewrite input transport using sockets.
Since we will not longer be modifying events in place, we don't need
to use an ashmem region for input.  Simplified the code to instead
use a socket of type SOCK_SEQPACKET.

This is part of a series of changes to improve input system pipelining.

Bug: 5963420

Change-Id: I05909075ed8b61b93900913e44c6db84857340d8
2012-02-13 10:28:40 -08:00
Alex Sakhartchouk
87a36a3b29 Merge "Making shader compilation errors throw a Java exception." 2012-02-10 15:00:21 -08:00
Jason Sams
cb66aec0bd Merge "Start implementing SurfaceTexture streaming into RS allocations." 2012-02-10 13:51:04 -08:00
Jason Sams
532efd3ce2 Start implementing SurfaceTexture streaming into RS allocations.
Change-Id: I561fbb63c63371ea59047c07fb2d68c21d16e76b

Conflicts:

	libs/rs/rsAllocation.h
2012-02-10 13:24:18 -08:00
Dianne Hackborn
d10035d52b Merge "Some hardening of isolated processes by restricting access to services." 2012-02-09 18:08:38 -08:00
Dianne Hackborn
a573f6a1d9 Some hardening of isolated processes by restricting access to services.
Services now must explicitly opt in to being accessed by isolated
processes.  Currently only the activity manager and surface flinger
allow this.  Activity manager is needed so that we can actually
bring up the process; SurfaceFlinger is needed to be able to get the
display information for creating the Configuration.  The SurfaceFlinger
should be safe because the app doesn't have access to the window
manager so can't actually get a surface to do anything with.

The activity manager now protects most of its entry points against
isolated processes.

Change-Id: I0dad8cb2c873575c4c7659c3c2a7eda8e98f46b0
2012-02-09 18:06:01 -08:00
Jason Sams
87e2721f89 Remove unused param.
Change-Id: Idf26c3bf4eec7ed17dbfb99b40c314bce7996101
2012-02-09 14:50:50 -08:00
Jamie Gennis
1c90e73f5d Merge "Refactored ISurfaceTexture calls from SurfaceTexture into BufferQueue." 2012-02-09 11:08:02 -08:00
Jason Sams
5b6abb38f0 Merge "Fix bug in generated code for functions with inband data from pointers. Passing zero length data would desync return command stream." 2012-02-07 18:56:39 -08:00
Jason Sams
d51280f10b Fix bug in generated code for functions with inband data
from pointers.  Passing zero length data would desync
return command stream.

Change-Id: I273a6a44636a203d8305ddff3d6607eae9f9ec8a
2012-02-07 18:54:03 -08:00
Romain Guy
28587f445a Merge "Fix the system" 2012-02-07 18:22:43 -08:00
Romain Guy
21c9c8551d Fix the system
Change-Id: Ie097ea5d6c0af9c5929b8c5deb76b4824d5de787
2012-02-07 18:22:07 -08:00
Alex Sakhartchouk
257e8a9a4f Making shader compilation errors throw a Java exception.
Change-Id: I612142b6fe1b75eab62e89950c3bea6f326cb730
2012-02-07 18:06:13 -08:00
Romain Guy
68c02e25e8 Merge "Preliminary support for clipRect(Rect, Op)" 2012-02-07 17:07:00 -08:00
Romain Guy
967e2bf3ac Preliminary support for clipRect(Rect, Op)
This adds basic support for clip regions. It is currently disabled at compile
time. Enabling clip regions will require setting up a stencil buffer.

Change-Id: I638616a972276e38737f8ac0633692c3845eaa74
2012-02-07 17:04:34 -08:00
Jason Sams
bdeec118a1 Merge "Implement RS VSync on new vsync infrastructure." 2012-02-07 15:39:44 -08:00
Jason Sams
4c2e4c80ce Implement RS VSync on new vsync infrastructure.
Change-Id: I662159a086a56e28732dd64a3a3cb30f8d4b72b1

Replace lockless fifo from server to client with sockets.

Change-Id: I99a4ab4f18496c0fbac96ee7b8099797af4712ea
2012-02-07 15:32:08 -08:00
Simon Wilson
c92e6f14f9 AccessoryChat: use platform APIs and support Galaxy Nexus
Change-Id: I171c2781f3d447bec46f0179351e1b18721b1b89
2012-02-07 14:36:06 -08:00
Daniel Lam
70e80aacf9 Refactored ISurfaceTexture calls from SurfaceTexture into BufferQueue.
Change-Id: I514f6b802f6b49c9ae27bed37bf0b9d23da03c9a
2012-02-07 13:57:01 -08:00
Mathias Agopian
efa08a6c21 make sure to ignore SIGPIPE in the write side of BitTube
Change-Id: If4f037f4403d3ecbcd5f91248354765fc0fa13cb
2012-02-06 19:17:56 -08:00
Amith Yamasani
1ef7d13172 Merge "Multi-user - 1st major checkin" 2012-02-03 12:04:40 -08:00
Amith Yamasani
742a671273 Multi-user - 1st major checkin
Switching activity stacks
Cache ContentProvider per user
Long-press power to switch users (on phone)

Added ServiceMap for separating services by user
Launch PendingIntents on the correct user's uid
Fix task switching from Recents list
AppWidgetService is mostly working.

Commands added to pm and am to allow creating and switching profiles.

Change-Id: I15810e8cfbe50a04bd3323a7ef5a8ff4230870ed
2012-02-03 12:01:47 -08:00
Stephen Hines
cc2daede56 Merge "Properly recover from failed compilation." 2012-02-02 21:25:19 -08:00
Romain Guy
8d13ef3c59 Merge "Separate interface definition and implementation of Snapshot" 2012-02-02 17:33:47 -08:00
Romain Guy
ada4d53d50 Separate interface definition and implementation of Snapshot
The Snapshot class is getting complicated enough that its implementation
should now live in a separate .cpp file. This will become particularly
useful when support for clip regions and paths will be added later on.

Change-Id: I050fac5683a9f7a0ff2f7a6beec3dd28aa5eb0d8
2012-02-02 17:31:16 -08:00
Mathias Agopian
b545eaa9cb Merge "separate transactions from updates" 2012-02-02 16:28:05 -08:00
Romain Guy
bc18f28907 Merge "Disable debugging code in the font renderer" 2012-02-02 15:16:30 -08:00
Romain Guy
b629490ffb Disable debugging code in the font renderer
Change-Id: I92463057ff4ae712bb25789db1667ff1ecfd389f
2012-02-02 15:13:18 -08:00
Alex Sakhartchouk
7042613c65 Merge "Fix an incorrect assert that doesn't account for element array size." 2012-02-02 14:54:32 -08:00
Glenn Kasten
ac1748ce33 Merge "Thread::getTid returns pid_t gettid() after run" 2012-02-02 13:24:52 -08:00
Stephen Hines
862dadb7a7 Properly recover from failed compilation.
BUG=5955072

We used to call delete, which did not update the Context's view of the world,
leading to potential segfaults on Context teardown. This change also enables
exceptions to be thrown when runtime errors are encountered.

Change-Id: If63578efff2d7dd03639da1049c1a5ebc69fde35
2012-02-02 13:23:20 -08:00
Alex Sakhartchouk
bf3c3f2ab1 Fix an incorrect assert that doesn't account for element array size.
Change-Id: Ibcb5c55d91967603391a1721137d010a85025990
2012-02-02 09:47:26 -08:00
Mathias Agopian
9a9dbd5921 separate transactions from updates
with this changes, SF transactions are handled as soon as possible
but do not trigger updates. the update is delayed until the next
vsync.

this allows us to work much better without requiring triple-buffering.

Change-Id: I1fa10794d0cf742129f0877698b7b1e1f2ec7401
2012-02-01 20:43:06 -08:00
Stephen Hines
bb3968fed8 Merge "Remove wrapper version check assert." 2012-02-01 17:09:12 -08:00
Stephen Hines
07c12933e3 Remove wrapper version check assert.
This really shouldn't have been here to begin with, since the wrapper version
should be meaningless to libRS.

Change-Id: I329446ed96d1a70197247735e267b8539a8c83a2
2012-02-01 16:56:03 -08:00
Romain Guy
bbf1bc8b6c Merge "Add optional metadata to initiliaze the render threat." 2012-02-01 16:15:17 -08:00
Romain Guy
211370fd94 Add optional metadata to initiliaze the render threat.
The render threat is likely to break your application if you initiate it.
As such it must be explicitely requested using the following meta-data
tag in your manifest's application tag:

<meta-data android:name="android.graphics.renderThread" android:value="true" />

Change-Id: Ibf0a48af2a0d091562bf6907eac970e3d1d601c4
2012-02-01 16:10:55 -08:00
Dianne Hackborn
6c997a9e88 aapt now sorts the strings in the resource string pool.
In our current environment with very many translations, this can
save a lot of RAM -- for example over 200K in Gmail just by sorting
the strings in the Gmail .apk (not the framework).

Also add a new aapt command to print the contents of the resource
table string pool.

Change-Id: I1da037b3e2c377b890833ff57ab158965314ac48
2012-01-31 15:41:30 -08:00
Romain Guy
13631f3da8 Add debug markers to OpenGLRenderer
These markers will be used to group the GL commands by View in the
OpenGL ES debugging tool. This will help correlate individual GL
calls to higher level components like Views.

Change-Id: I73607ba2e7224a80ac32527968261ee008f049c6
2012-01-30 17:41:55 -08:00
Stephen Hines
855eadf942 Merge "Fix potential bug with reordered size/offset arguments." 2012-01-30 12:22:10 -08:00
Romain Guy
530041d319 Add stencil buffer to the EGL config
Change-Id: If76c0cd6127534d90f9526b75c0f8e56259c6722
2012-01-30 12:04:17 -08:00
Mathias Agopian
dfbcee6cb8 fix build
Change-Id: Ibdc45f1794e7ef60dc1ca0ff85c5cc4dff84c3fa
2012-01-29 22:22:08 -08:00
Stephen Hines
cee905be48 Merge "Don't wait forever if there are no commands to execute." 2012-01-27 10:08:18 -08:00
Jamie Gennis
7bea650208 Merge "SurfaceTexture: use fence sync on omap4 & s5pc110" 2012-01-27 09:53:14 -08:00
Stephen Hines
e3f9cc6761 Don't wait forever if there are no commands to execute.
BUG=5614887

This fixes a timing issue where we could calculate a delay of 0 (indicating
wait forever) when we have no pending commands to actually execute. In such
cases, we should just break out of the playback loop.

This also fixes a small issue with returning whether or not to redraw.

Change-Id: Id1e481679341773256b7287062c68925e2bc8f9e
2012-01-26 17:32:09 -08:00
Stephen Hines
caaac348ed Merge "Fix bugs with unsigned rsAtomicCas/Max/Min." 2012-01-26 13:55:57 -08:00
Stephen Hines
109116bb2f Fix bugs with unsigned rsAtomicCas/Max/Min.
BUG=5888007

rsAtomicMax/Min did not have proper semantics for unsigned integers. They were
always using signed comparisons. rsAtomicCas had the wrong function signature
in our math library, leading to no way to properly link/execute it.

Change-Id: I336cdd8cd9f2d8093f12e101b55b2797515f039b
2012-01-25 18:17:34 -08:00