3022 Commits

Author SHA1 Message Date
Romain Guy
46fc25171a Merge "Fix performance issue in Launcher Bug #3515248" into honeycomb-mr1 2011-03-15 18:23:48 -07:00
Romain Guy
6217a71cd2 Fix performance issue in Launcher
Bug #3515248

The problem is caused by the fast path when compositing layers on screen.
The fast path draws a single quad using glDrawArrays() whereas the general
path draws an arbitrary mesh using glDrawElements(). It looks like there's
an issue in the driver since glDrawArrays() is significantly slower than
glDrawElements() for a quad (6 vertices!)

This change just gets rid of the fast path.

Change-Id: Ib2361253ec67f44a988270f76c183422f12ce537
2011-03-15 16:32:28 -07:00
Mike Lockwood
3b7871c242 Merge "USB Manager string clean up:" into honeycomb-mr1 2011-03-15 13:34:06 -07:00
Mike Lockwood
ad5f83e91b USB Manager string clean up:
- Use "Cancel" instead of "Ignore"
- Customize the text for the "always use" checkbox for devices and accessories
- Clean up strings for AccessoryChat test program

Bug: 4074719

Change-Id: Ideec838e4c1f1a82ef4ae411c9124417ffb63165
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-15 16:23:40 -04:00
Stephen Hines
c2db0d405b Merge "Make RS Matrix functions threadable." into honeycomb-mr1 2011-03-15 11:52:36 -07:00
Jamie Gennis
00f47af85a Merge "SurfaceTexture: disallow unsupported uses." into honeycomb-mr1 2011-03-15 11:39:24 -07:00
Romain Guy
a1bd5a5fd7 Merge "Fix disappearing edges in lists/scrollviews/etc. Bug #4093871" into honeycomb-mr1 2011-03-15 11:31:22 -07:00
Romain Guy
ad37cd3b5d Fix disappearing edges in lists/scrollviews/etc.
Bug #4093871

This bug was introduced by a change that modified the way fade areas
are cleared. The previous change relied on Rect::intersect() to empty
the intersected rect when the two rects don't intersect. Unfortunately
this is not what intersect() does. The fix is rather simple and
sets the layer's bounds to empty when they don't intersect with the
clip or the viewport. This has the side effect of ignoring the layer
which is the expected result.

Change-Id: Icf0038b9a476c53f8eff7084136aba3033d093e6
2011-03-15 11:12:25 -07:00
Jamie Gennis
bae716bc15 SurfaceTexture: disallow unsupported uses.
This change makes the ANativeWindow_lock NDK function error out if it is
passed an ANativeWindow with a concrete type that is not Surface.  It
also makes eglCreateWindowSurface fail if it is passed a
SurfaceTextureClient as its 'window' argument.

Bug: 4087277
Change-Id: Ie68c50c52d88f72d8a387f6c094908044c83a88c
2011-03-15 10:37:37 -07:00
Jamie Gennis
75597105e6 Merge "SurfaceTextureClient: Add ISurfaceTexture getter." into honeycomb-mr1 2011-03-15 10:34:35 -07:00
Jamie Gennis
02805a40d4 Merge "ANativeWindow: add query for the concrete type." into honeycomb-mr1 2011-03-15 10:33:35 -07:00
Stephen Hines
413bce45ba Make RS Matrix functions threadable.
BUG=4100079

Change-Id: I6cefa0eab42481fa974077d6aed98007f9fd87f7
2011-03-14 19:16:19 -07:00
Romain Guy
ee7ace065f Merge "Fix rendering artifact in edge fades. Bug #4092053" into honeycomb-mr1 2011-03-14 18:16:39 -07:00
Romain Guy
7b5b6abf85 Fix rendering artifact in edge fades.
Bug #4092053

The problem always existed but was made visible by partial invalidation.
When saving a layer, the renderer would try to postpone glClear()
operations until the next drawing command. This however does not work
since the clip might have changed. The fix is rather simple and
simply gets rid of this "optimization" (that turned out to be
usless anyway given how View issues saveLayer() calls.)

This change also fixes an issue with gradients (color stops where
not properly computed when using a null stops array) and optimizes
display lists rendering (quickly rejects larger portions of the
tree to avoid executing unnecessary code.)

Change-Id: I0f5b5f6e1220d41a09cc2fa84c212b0b4afd9c46
2011-03-14 18:05:08 -07:00
Jamie Gennis
f95a9f019d SurfaceTextureClient: Add ISurfaceTexture getter.
This change adds a getter method to SurfaceTextureClient to get the
ISurfaceTexture object with which the SurfaceTextureClient is
communicating.

Bug: 4086509
Change-Id: Ifec621e0fe5392a5be56b2348fdc54067cbebcdd
2011-03-14 17:47:11 -07:00
Jamie Gennis
c4ca7c5114 ANativeWindow: add query for the concrete type.
This change adds a query to the ANativeWindow interface for getting the
concrete type of the ANativeWindow.

Bug: 4086509
Change-Id: I64aa86d72fbca3b52a98e1fc35608737781a3178
2011-03-14 17:47:11 -07:00
Jamie Gennis
122dd0999f Merge "SurfaceTexture: fix transform matrix computation." into honeycomb-mr1 2011-03-14 17:42:48 -07:00
Mike Lockwood
015b1ecaec Add support for USB accessory serial numbers
Change-Id: I47b79f091b300ced60bfc61eff2f771139663aae
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-14 20:10:47 -04:00
Jamie Gennis
f3cedb6021 SurfaceTexture: fix transform matrix computation.
This change fixes the transform matrix computation in SurfaceTexture
when a crop rectangle is specified by the image producer.  It also adds
a test for this case as well as a basic test for the uncropped case.

Bug: 4070775
Change-Id: I1481c9ce9d08fe7f2bff86d3afdeab7d4002b157
2011-03-14 11:30:16 -07:00
Mike Lockwood
62cfeeb821 USB: minor cleanup work
Bug: 4067029

Change-Id: Icd8f912ab8732b5f770a217b9b3731092597ce02
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-11 18:51:29 -05:00
Jamie Gennis
b2e606f5f1 Merge "SurfaceFlinger: Respect the PROTECTED gralloc bit." into honeycomb-mr1 2011-03-10 18:06:32 -08:00
Jamie Gennis
f72606ce3e SurfaceFlinger: Respect the PROTECTED gralloc bit.
This change makes SurfaceFlinger treat layers for which the active
buffer has the GRALLOC_USAGE_PROTECTED bit set as if they have the
'secure' flag set.

Change-Id: Ic60b6513a63e4bb92ec6ce9fd12fd39b4ba5f674
Bug: 4081304
2011-03-10 16:25:48 -08:00
Mike Lockwood
cc08c439bc Merge "UsbAccessory: Add URI string, replace type string with description" into honeycomb-mr1 2011-03-10 07:50:30 -08:00
Mike Lockwood
ac36d7c715 UsbAccessory: Add URI string, replace type string with description
This is a first step toward adding USB accessory URI support

BUG: 4073248

Modified USB accessory matching logic to look only at manufacturer, model and version
(description and URI are not considered when matching apps to accessories)

Also added test for USB accessory protocol version to accessorytest

BUG: 4080288

Change-Id: I992a3433c74efa7a7db37bf030f02c1f0c92f9e2
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-09 22:12:49 -05:00
Jeff Brown
efd3266b71 Input improvements and bug fixes.
Associate each motion axis with the source from which it comes.
It is possible for multiple sources of the same device to define
the same axis.  This fixes new API that was introduced in MR1.
(Bug: 4066146)

Fixed a bug that might cause a segfault when using a trackball.

Only fade out the mouse pointer when touching the touch screen,
ignore other touch pads.

Changed the plural "sources" to "source" in several places in
the InputReader where we intend to refer to a particular source
rather than to a combination of sources.

Improved the batching code to support batching events from different
sources of the same device in parallel.  (Bug: 3391564)

Change-Id: I0189e18e464338f126f7bf94370b928e1b1695f2
2011-03-09 18:30:28 -08:00
Mike Lockwood
564f12ebe4 Merge changes Ifd78cca3,Ieadb86fe,If5b44ebd into honeycomb-mr1
* changes:
  MTP: Convert date created and modified values from seconds to milliseconds
  Update USB accessory compatibility library to support new requestPermission API
  UsbService: Don't require permissions for UsbManager.getCurrentAccessory()
2011-03-09 15:47:10 -08:00
Jamie Gennis
6167a390e3 Merge "ANativeWindow: add queues-to-window-composer check." into honeycomb-mr1 2011-03-09 14:47:56 -08:00
Mike Lockwood
580b641117 Update USB accessory compatibility library to support new requestPermission API
BUG: 4069037

Change-Id: Ieadb86fed577eeb7697d524e8a684ea6ea632f39
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-09 16:46:35 -05:00
Stephen Hines
cac8228e9c Fix a race condition during Context init/teardown.
This change makes Context initialization wait properly for all threads to be
available before leaving initContext(). This prevents a case where ~Context()
gets called before all created threads have started/finished their work. This
was triggered/discovered by running some very short-lived tests in CTS.

BUG=4064203

Change-Id: I1dd6f43fa7942c53881008e857df864e2395202e
2011-03-08 16:54:23 -08:00
Jamie Gennis
d2acedf18c ANativeWindow: add queues-to-window-composer check.
This change adds a new 'method' to the ANativeWindow interface to check
whether buffers queued to the window will be sent directly to the system
window compositor.

Change-Id: I4d4b199e328c110b68b250029aea650f03c8724d
Bug: 3495535
2011-03-08 16:49:51 -08:00
Romain Guy
bc8a8e8c92 Merge "Add support for partial invalidates in WebView Bug #3461349" into honeycomb-mr1 2011-03-07 22:40:27 -08:00
Romain Guy
cabfcc1364 Add support for partial invalidates in WebView
Bug #3461349

This change also fixes two bugs that prevented partial invalidates
from working with other views. Both bugs were in our EGL implementation:
they were preventing the caller from comparing the current context/surface
with another context/surface. This was causing HardwareRenderer to always
redraw the entire screen.

Change-Id: I33e096b304d4a0b7e6c8f92930f71d2ece9bebf5
2011-03-07 18:09:03 -08:00
Jeff Brown
8529745b27 Joystick tweaks. (DO NOT MERGE)
Ensure that the joystick can always reach -1.0, 0.0 and 1.0 positions
even when noise filtering is applied.  (Bug: 3514510)

Add support for a few more standard axes.

Add additional mapping modes for axes.
Some axes are inverted from standard interpretation
or are actually intended to be split into two distict axes
such as left/right trigger controls or accelerator/brake.

Add key layout file for a G25 racing wheel and XBox 360 controller
to tweak behavior.  They work fine without them but the axis mappings
are not ideal.

Change-Id: I0fddd90309af4dc14d35f34fe99ed6e521c0b7c7
2011-03-04 19:12:41 -08:00
Stephen Hines
1bf1f8df17 DO NOT MERGE: Almost all warnings are now errors in RS build.
Change-Id: Ie4952cdf5c75bf1b7a7899a32b3b1f8747686356
2011-03-03 16:12:43 -08:00
Jeff Brown
55acdf7dcd Merge "Wake screen from external HID peripherals." 2011-03-02 19:59:07 -08:00
Jeff Brown
56194ebec6 Wake screen from external HID peripherals.
Added some plumbing to enable the policy to intercept motion
events when the screen is off to handle wakeup if needed.

Added a basic concept of an external device to limit the scope
of the wakeup policy to external devices only.  The wakeup policy
for internal devices should be based on explicit rules such as
policy flags in key layout files.

Moved isTouchEvent to native.

Ensure the dispatcher sends the right event type to userActivity
for non-touch pointer events like HOVER_MOVE and SCROLL.

Bug: 3193114
Change-Id: I15dbd48a16810dfaf226ff7ad117d46908ca4f86
2011-03-02 19:57:07 -08:00
Jeff Brown
192f0b0608 Merge "Fade out the mouse pointer after inactivity or other events." 2011-03-02 15:54:42 -08:00
Romain Guy
058f47e845 Merge "We need to go deeper. Bug #3431907" 2011-03-02 15:48:33 -08:00
Romain Guy
84962f2fe6 We need to go deeper.
Bug #3431907

When drawing layers inside a layer, the wrong target FBO would be used.
This would happen for instance with app widgets using a ViewFlipper
in Launcher. The ViewFlipper uses a fade animation that triggers a
call to saveLayerAlpha(), which in turns creates an FBO. If this happened
during a scroll, the ViewFlipper's FBO would be composited back directly
inside FBO 0, i.e. the screen. This properly initializes the snapshots
of hardware layers to use the layer's FBO as the default compositing
target instead of using 0.

This problem did not happen when drawing hardware layers inside
hardware layers because LayerRenderer already takes care of figuring
out the FBO it needs to composite into. The bug would occur only
with layers generated with saveLayer() and its saveLayerAlpha()
variation.

Layers inside hardware layers insider layers inside hardware layers
now work properly.

Change-Id: Ibe852301087f3d414ad8a18436eebc81f8ac66f5
2011-03-02 15:43:44 -08:00
Jeff Brown
05dc66ada6 Fade out the mouse pointer after inactivity or other events.
Fades out the mouse pointer:
- after 15 seconds of inactivity normally
- after 3 seconds of inactivity in lights out mode
- after a non-modifier key down
- after a touch down

Extended the native Looper to support enqueuing time delayed
messages.  This is used by the PointerController to control
pointer fade timing.

Change-Id: I87792fea7dbe2d9376c78cf354fe3189a484d9da
2011-03-02 15:37:57 -08:00
Romain Guy
40a787f89a Properly initialize FBO textures for linear filtering.
Change-Id: I67fc4fd760483ef85809be8d6e608cf4f469650f
2011-03-02 15:15:42 -08:00
Romain Guy
a91320e364 Merge "Properly initialize FBO textures for linear filtering." 2011-03-02 15:14:52 -08:00
Mike Lockwood
403af5c688 Merge "Combine the USB accessory support library with the platform feature" 2011-03-02 14:19:38 -08:00
Romain Guy
4677c5118c Merge "Fix problem with glyph cache and textScaleX property" 2011-03-02 14:04:47 -08:00
Chet Haase
8668f8a633 Fix problem with glyph cache and textScaleX property
Glyphs drawn with paints that had different textScaleX values were not
being recognized as different, so the glyph cache was being used regardless
of different scaleX values. This change adds the scaleX attribute to the native
Font object to allow the cache to distinguish between this difference and cache
accordingly.

Change-Id: I5d8fc26d47460b27dc8e373a473d46b2f1b8dc30
2011-03-02 14:02:19 -08:00
Mike Lockwood
b547fc297f Combine the USB accessory support library with the platform feature
Also renamed the support library to com.android.future.usb.accessory.jar

Change-Id: Id6226991ce73f75dfedc497adf1c25bffb670243
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-02 13:59:56 -08:00
Romain Guy
e6c524022d Merge "Correctly mark layers dirty when drawing WebView." 2011-03-01 14:53:48 -08:00
Romain Guy
d643bb56fd Correctly mark layers dirty when drawing WebView.
Change-Id: I7ae0c3cfa0916d8fbeaf01e8da127c621a06a0f4
2011-03-01 14:55:21 -08:00
Jamie Gennis
5a6f9faf5d Merge "Add the MIN_UNDEQUEUED_BUFFERS query to ANW." 2011-03-01 14:38:20 -08:00
Romain Guy
6910f429cd Merge "Avoid UTF-8 conversions and string copies whenever possible." 2011-03-01 14:28:13 -08:00