4322 Commits

Author SHA1 Message Date
Chet Haase
a23eed808a Fix layer blending bug
Cached layers were sometimes retaining an obsolete blending
value, causing artifacts where translucent objects were disappearing
completely. Also, added extra tracing info for DisplayLists.

Issue #6303668 Flickering views during SwipeHelper drag

Change-Id: I66ce158652c4a3ed316040585b40b1744e1fad0c
2012-04-12 15:20:16 -07:00
Jeff Brown
cc11698319 HID usage should take precedence over scan code.
Change-Id: Ibd8988e3dcc0d64f4019ffe491d9789733f9d243
2012-04-12 10:05:41 -07:00
Jeff Brown
49ccac530b Refactor key code mapping.
Added handling for EV_MSC / MSC_SCAN which typically reports
the HID usage associated with a key.  This will enable key maps
to map keys with HID usages that Linux does not natively recognize.

Removed keyCode and flags fields from EventHub RawEvent since
they don't necessarily make sense in isolation now that we
pay attention to HID usage codes too.

Removed the fallback code for mapping keys and axes.  In practice,
an input device should be self-sufficient.  We should not ever
need to look at the built-in keyboard's key map.  In fact, there
usually isn't a built-in keyboard anyhow.  This code was originally
working around a problem where we weren't loading the key map
for touch screens with virtual keys, which has long since been fixed.

Change-Id: I0a319bdec44be9514f795526347397e94d53a127
2012-04-11 20:28:09 -07:00
Chet Haase
7b6a75872b Pass width/height parameters to webview
When webview draws into an fbo layer, it needs to know the
size of that surface to create the rendering transform appropriately.
This change copies in the current viewport size to the structure that
is passed to the webview.

Change-Id: I7160b0836d00834134c799c95a439cdc045e2035
2012-04-11 14:32:02 -07:00
Jeff Brown
9f25b7fdf2 Request key maps from input manager service.
Instead of each application loading the KeyCharacterMap from
the file system, get them from the input manager service as
part of the InputDevice object.

Refactored InputManager to be a proper singleton instead of
having a bunch of static methods.

InputManager now maintains a cache of all InputDevice objects
that it has loaded.  Currently we never invalidate the cache
which can cause InputDevice to return stale motion ranges if
the device is reconfigured.  This will be fixed in a future change.

Added a fake InputDevice with ID -1 to represent the virtual keyboard.

Change-Id: If7a695839ad0972317a5aab89e9d1e42ace28eb7
2012-04-10 18:23:58 -07:00
Ying Wang
5bcbfcec4b You don't need LOCAL_STATIC_LIBRARIES when building static library.
and there is no target static library with name libutils.

Change-Id: Ifec34e1b484d749d3fcd11abe610f192a3213767
2012-04-06 16:33:11 -07:00
Jeff Brown
69bba1dfb7 Merge "Add a unique input device descriptor." 2012-04-06 15:04:53 -07:00
Jeff Brown
e38fdfae91 Add a unique input device descriptor.
The purpose of the input device descriptor is to make it possible
to associate persistent settings for each input device, such as the
keyboard layout.

The descriptor is a hash of the information we have about the
device, such as its vendor id, product id, unique id, name,
or location.

Bug: 6110399
Change-Id: Idb80f946819b3f0dbf4e661bb0a753dbc2b60981
2012-04-06 14:57:19 -07:00
Chris Craik
65924a3e56 fix functor flag parsing, tweak process delay
Change-Id: I0a679cc33f92ff6fd2e33db9ad58b52622def012
2012-04-05 17:52:11 -07:00
Romain Guy
fda531c9e4 Merge "Disable AA lines vertex attrib arrays after rendering" 2012-04-04 11:53:28 -07:00
Romain Guy
7b63142d2f Disable AA lines vertex attrib arrays after rendering
Change-Id: I2f035e9d87f4f97bc1e37355c84570fd58df0374
2012-04-04 11:38:54 -07:00
Romain Guy
8c8c240092 Merge "Optimize FBOs composition" 2012-04-03 19:33:06 -07:00
Romain Guy
e0aa84b7dc Optimize FBOs composition
Change-Id: Ifc8eada8922509373c0e4c3b2ed75b6f08d098de
2012-04-03 19:30:26 -07:00
Chet Haase
db8c9a6a4d Optimization of alpha with DisplayList properties
Some views (such as ImageView and TextView) handle non-opaque alpha
values directly. This was originally an optimization, but we can handle it faster
in many cases without this optimization when DisplayList properties are enabled.
Basically, if a view has non-overlapping rendering, we set the alpha value directly
on the renderer (the equivalent of setting it on the Paint object) and draw each
primitive with that alpha value. Doing it this way avoids re-creating DisplayLists
while getting the same speedup that onSetAlpha() used to get pre-DisplayList properties.

Change-Id: I0f7827f075d3b35093a882d4adbb300a1063c288
2012-04-03 14:02:17 -07:00
Romain Guy
e2eaf6997d Merge "Prevent crash when flushing the layers cache Bug #6258973" 2012-04-02 17:49:20 -07:00
Romain Guy
5c88fc744d Prevent crash when flushing the layers cache
Bug #6258973

When flushing the layer caches we would attempt to delete the FBOs
associate with layers in the cache. The FBO property was however not
always properly cleared when recycling layers.

Change-Id: I7dedfe391d659a0849f1e1d84df17313b2c6e2b2
2012-04-02 17:45:25 -07:00
Chris Craik
b6a80077dc Merge "Allow fine-grained control over functors execution" 2012-04-02 17:07:21 -07:00
Chet Haase
8d56b0e1d2 Enabling DisplayList properties
An earlier commit fixed problems with enabling DisplayList properties.
This CL actually enables the properties.

Change-Id: I5c41d0c64e9241822af53eb367de0fed7d9608e0
2012-04-02 16:34:48 -07:00
Chet Haase
9420abd56a Re-enable DisplayList properties.
Re-enabling DisplayList properties last week caused some app
errors due to the way that some transforms were being handled (specifically,
those coming from the old Animations and ViewGroup's childStaticTransformation
field). This change pushes *all* transform/alpha data from View.draw() into
the view's DisplayList, making DisplayLists more encapsulated (and correct).

Change-Id: Ia702c6aae050784bb3ed505aa87553113f8a1938
2012-04-02 15:31:24 -07:00
Romain Guy
8f3b8e3299 Allow fine-grained control over functors execution
Adds non-drawing execution mode

Change-Id: I82f92cf1b9a3b9ff2ca6d7427c4e02b73e04e6bf
2012-04-02 15:15:07 -07:00
Chet Haase
f1260aac0e Merge "Disable DisplayList properties pending fixes for AlphaAnimation" 2012-03-29 09:45:38 -07:00
Chet Haase
76240dafe8 Disable DisplayList properties pending fixes for AlphaAnimation
The new DisplayList properties design has ordering conflicts with the
way that alpha works with old animations (AlphaAnimation). This CL
disables DiksplayList properties while I'm working on a fix and some
more thorough tests for old animations-vs-DL properties in general.

Change-Id: I8f6893138f939171491c2ec3c889214ee55d17b7
2012-03-29 09:42:34 -07:00
Alex Sakhartchouk
972ed5809c Merge "Moving libRS" 2012-03-28 15:08:56 -07:00
Alex Sakhartchouk
b43a1e5ddf Moving libRS
Change-Id: I1e42204e862585b9c2f7818b615890c60f08faf6
2012-03-28 14:18:15 -07:00
James Dong
d927a1d996 Deleted the media, camera, drm related files since they are relocated
Change-Id: I9bc5573ee07e30b305b5b879023aa9ec69e10b91
2012-03-28 10:42:44 -07:00
Alex Sakhartchouk
c72cb1c2e0 Merge "State based shader recompile to support camera input." 2012-03-27 08:49:52 -07:00
Chet Haase
b85967b9af Re-enabling DisplayList properties
Several issues came up after DisplayList properties were enabled,
so they were disabled pending fixes. Those issues have been fixed, so
DisplayList properties are once again being enabled by default. This
CL both re-enables these properties (in View.java and DisplayListRenderer.h)
and fixes the various issues that enabling them caused the first time around.

Related issues (all currently marked as Fixed, though that was simply because
DL properties were disabled - this CL provides the real fixes now that
DL properties are enabled by default):
Issue #6198276 Text input broken
Issue #6198472 Native crash at pc 00076428 in many different apps in JRM80
Issue #6204173 Date/time picker isn't rendering all parts of UI
Issue #6203941 All Apps overscroll effect is rendered weirdly/has flickering
Issue #6200058 CAB rendering issue - not drawing items?
Issue #6198578 Front camera shows black screen after taking picture.
Issue #6232010 Layers not recreated when children change (DisplayList properties)

Change-Id: I8b5f9ec342208ecb20d3e6a60d26cf7c6112ec8b
2012-03-27 08:17:54 -07:00
Jamie Gennis
f82b111a6d Merge "rsdGL uses DummyConsumer" 2012-03-26 17:20:06 -07:00
Romain Guy
56485fe628 Merge "Use a status_t return type for GL functors" 2012-03-26 16:51:22 -07:00
Romain Guy
6554943a1d Use a status_t return type for GL functors
WebView needs more fine-grained control over the behavior of the
framework upon execution of the display lists. The new status_t
allows WebView to requests its functor to be re-executed directly
without causing a redraw of the entire hierarchy.

Change-Id: I97a8141dc5c6eeb6805b6024cc1e76fce07d24cc
2012-03-26 16:45:05 -07:00
Daniel Lam
ae540b9943 rsdGL uses DummyConsumer
Using a DummyConsumer instead of a SurfaceTexture avoids
errors such as BufferQueue has been abandoned due to the SurfaceTexture
going out of scope and disconnecting from the BufferQueue.

Bug: 6172739
Change-Id: I775ead2d0392a68fd0f7e724d6eb25298d2fb00d
2012-03-26 15:11:47 -07:00
Romain Guy
9dcd8c2ab1 Merge "Prevent random crashes on SGX architecture Bug #6219894" 2012-03-26 14:53:36 -07:00
Romain Guy
a9dd820184 Prevent random crashes on SGX architecture
Bug #6219894

Change-Id: If77f29da03e557a50e53bae505e1c638a1dbe2cc
2012-03-26 14:52:00 -07:00
Alex Sakhartchouk
5ff1959f95 State based shader recompile to support camera input.
Change-Id: Ia6c362571e1b44254461522a8c49a8551b46f28d
2012-03-26 13:52:24 -07:00
Glenn Kasten
30b8a65c5c mv libcpustats from frameworks/base to /native
OK to lose history

Change-Id: I05ce0452f16a396cff6e18db5424492f3a6f6861
2012-03-26 12:22:57 -07:00
Jason Sams
cbe55a1c93 Merge "Implement USAGE_IO_INPUT" 2012-03-23 13:29:17 -07:00
Jason Sams
fe1d5ffd1b Implement USAGE_IO_INPUT
Change-Id: Idbf7bb21f5ab673ad77082c5c19921d2b276c04b
2012-03-23 11:47:26 -07:00
Alex Sakhartchouk
00da68de8e Merge "Wrapping new api's with proper RS_VERSION" 2012-03-23 09:08:10 -07:00
Alex Sakhartchouk
f8338c40b7 Merge "More rearrangement and renaming." 2012-03-23 09:07:46 -07:00
Colin Cross
a982dc05d7 frameworks/base: move Zip* from libandroidfw to libutils
ZipUtils is needed by build/tools, move it from libandroidfw
(frameworks/base) to libutils (frameworks/native).

Change-Id: I2b4b7adcdf68eb25ee7cba5dd3b69eadf0523af3
2012-03-22 18:43:07 -07:00
Alex Sakhartchouk
dc60cc4253 Wrapping new api's with proper RS_VERSION
Change-Id: Ib8656cb2b6d0b8adeab15edfd704620451ce56ad
2012-03-22 16:59:38 -07:00
Alex Sakhartchouk
043f5ced1b More rearrangement and renaming.
Change-Id: Ia922c5bff1734a29b786ba95065f81c8dedf90cd
2012-03-22 10:50:55 -07:00
Chet Haase
ad13c81371 Disable DisplayList properties
DisplayList properties are (again) disabled by default, via flags in
View.java and DisplayListRenderer.h. There are various artifacts to
chase down before enabling by default.

Issue #6198472 Native crash at pc 00076428 in many different apps in JRM80
Issue #6204173 Date/time picker isn't rendering all parts of UI
Issue #6203941 All Apps overscroll effect is rendered weirdly/has flickering
Issue #6200058 CAB rendering issue - not drawing items?
Issue #6198578 Front camera shows black screen after taking picture.

Change-Id: I045dc82ce1d85fedbae3bb88eb2a2dfb6891d41f
2012-03-22 08:33:09 -07:00
Alex Sakhartchouk
b09aaeca08 Merge "Changing rsg to rs where functions don't rely on graphics." 2012-03-21 15:31:25 -07:00
Alex Sakhartchouk
8564be6d84 Merge "Breaking up rs headers by logical components." 2012-03-21 14:05:35 -07:00
Romain Guy
b0317984d3 Plug memory leak.
Bug #6196903

Whenever a memory flush happens, the GL renderer discards some or all of its
font caches. Each font cache holds an array of vertex indices that was
initially designed to have the same life cycle as the process. This changed
when memory flushes were introduced but this array was never taken care of
in the destructor.

Change-Id: Ief124f609ea55b671c0a9b43637d9e013629ebaa
2012-03-21 11:52:52 -07:00
Alex Sakhartchouk
73797e97a8 Changing rsg to rs where functions don't rely on graphics.
Change-Id: I92a93d7a520b4a5416be88c7c05c2f8d3cc89243
2012-03-21 10:21:08 -07:00
Alex Sakhartchouk
79c23f0f88 Breaking up rs headers by logical components.
Change-Id: I2d23eec0277b1136852b8a7acb61aecf6f699a7d
2012-03-21 09:58:15 -07:00
Chet Haase
bdd896c264 Enable DisplayList properties
This CL simply enables DisplayList property functionality. The code for
this feature is already there, but it's been disabled by default pending further
testing and analysis. This change sets these build-type flags to true
so that all hw-accelerated apps will now use DisplayList properties by default.

In particular, this feature enables a fast-path for changes that affect the
handful of View properties involved in animations (alpha, translationX, etc.).
Setting these properties now gets propagated to the native DisplayList associated
with the View, avoiding costly recreation of the SDK-level DisplayList and
also enabling faster invalidation of the view hierarchy.

Change-Id: Ic99c8f28fa9183f2e54e9e4860b333eb9c540f7c
2012-03-19 13:40:49 -07:00
Jason Sams
55ba267c09 Merge "Add prop to force cap compute threading." 2012-03-16 10:13:06 -07:00