3921 Commits

Author SHA1 Message Date
Romain Guy
a9dc86b21d Correctly apply transforms when getting a TextureView's bitmap
Bug #5439406

Change-Id: I271a9a2e38f5b3600dc158f8f442a6b0893f472b
2011-10-11 14:06:21 -07:00
Jamie Gennis
e2909e121c SurfaceFlinger: update orientation via transactions
This change merges the ISurfaceComposer::setOrientation functionality
into ISurfaceComposer::setTransactionState.  It enables the window
manager to atomically update both the display orientation and the
position and size of the windows in a single transaction with
SurfaceFlinger.

Bug: 5439574
Change-Id: I18a8ccc564d7d760ef8afb2d015ccdb7a7963900
2011-10-11 13:34:01 -07:00
Jeff Brown
0cde89f5f0 Use ashmem for CursorWindows.
Bug: 5332296

The memory dealer introduces additional delays for reclaiming
the memory owned by CursorWindows because the Binder object must
be finalized.  Using ashmem instead gives CursorWindow more
direct control over the lifetime of the shared memory region.

The provider now allocates the CursorWindows and returns them
to clients with a read-only protection bit set on the ashmem
region.

Improved the encapsulation of CursorWindow.  Callers shouldn't
need to care about details like how string fields are allocated.

Removed the compile-time configuration of string and numeric
storage modes to remove some dead weight.

Change-Id: I07c2bc2a9c573d7e435dcaecd269d25ea9807acd
2011-10-11 11:03:19 -07:00
Jeff Brown
270928bd4a Merge changes Idbfeb3cc,I03e8e2e7,Iff9eed78
* changes:
  Fix regression in CursorWindow.getString() Bug: 5332296
  Clean up CursorWindow lifetime. Bug: 5332296
  Fix regression in CursorWindow.copyStingToBuffer. Bug: 5332296
2011-10-07 15:08:24 -07:00
Romain Guy
5a6d3a4c03 Stupid fixed point math.
Bug #5423215

Change-Id: I39379e1f8fb4d59de4ede6e4fe7cf7a2c7cc625a
2011-10-07 15:03:24 -07:00
Jeff Brown
d0ff68da6a Fix regression in CursorWindow.copyStingToBuffer.
Bug: 5332296

Change-Id: Iff9eed786f0a8293b6156f883a66a322ddad5e99
2011-10-07 13:28:18 -07:00
Jeff Brown
3bc6bbc92c Clean up CursorWindow code.
Bug: 5332296

The code is functionally equivalent, but a little more efficient
and much easier to maintain.

Change-Id: I90670a13799df05831843a5137ab234929281b7c
2011-10-06 14:40:13 -07:00
Jason Sams
66fb1f3f3d Merge "Wrapping new API with #defines to prevent old apps from using them." 2011-10-05 12:01:51 -07:00
Romain Guy
ac0757a47c Merge "Canvas.getClipBounds() was broken and unreliable with OpenGL ES 2.0" 2011-10-04 19:22:41 -07:00
Romain Guy
ed7a8fc768 Canvas.getClipBounds() was broken and unreliable with OpenGL ES 2.0
This bug was affecting several third party applications. The bug was
introduced by an optimization that prevented the local clip to be
recomputed when needed.

Change-Id: I7b5c464db21b5ff1a7274af75a3a64d0e9d84772
2011-10-04 19:21:27 -07:00
Jason Sams
3c1951c442 Merge "Fix crash running old HC apps." 2011-10-04 15:53:37 -07:00
Jason Sams
795072ec7b Fix crash running old HC apps.
Change-Id: If7206de334868cb40eb8e5dd04fbe8c70bc1d614
2011-10-04 15:46:57 -07:00
Dianne Hackborn
c04db7e067 Fix handling of "allow fds" state.
Didn't take into account nesting of bundles.  Boo.

Change-Id: Ic8cf21ad8d6f4938a3e105128624c9d162310d01
2011-10-03 21:09:35 -07:00
Jeff Brown
6579a9d6fe Transfer large bitmaps using ashmem.
Bug: 5224703

Change-Id: If385a66adf4c6179a0bb49c0e6d09a9567e23808
2011-10-03 17:28:13 -07:00
Dianne Hackborn
9ecebbfbf7 Add mechanism for Parcel to not allow FDs to be written to it.
This is to help implement issue #5224703.

Change-Id: I026a5890495537d15b57fe61227a640aac806d46
2011-10-03 16:58:41 -07:00
Jamie Gennis
8606fefa21 SurfaceTexture: parameterize the texture target
This change adds a hack to allow Android Browser to use a SurfaceTexture
to stream RGBA images to a GL_TEXTURE_2D texture object.

Change-Id: Idb90064d5d4b920959ef3be7451362ac5012460e
2011-09-30 14:19:41 -07:00
Romain Guy
59c7f80dd2 TextureView works best when it draws stuff.
Bug #5391188

Change-Id: I5e754881ccb08ff288ebd60de77282c9cbcf3f86
2011-09-29 17:21:45 -07:00
Mathias Agopian
acde31e124 may fix the build
Change-Id: I065b1e6652f0e800ba5674a6d9aa954c3ac6c790
2011-09-28 17:33:11 -07:00
Alex Sakhartchouk
f6576d9631 Wrapping new API with #defines to prevent old apps from using them.
Change-Id: Ib3a2d19544ad72987ebec09d465bec8eeb6423c8
2011-09-28 15:23:18 -07:00
Jamie Gennis
feb158b3cb Merge changes Ib302d79e,Ib4ee085f
* changes:
  SurfaceFlinger: set layer names on SurfaceTextures
  SurfaceTexture: add name support
2011-09-27 14:24:09 -07:00
Mathias Agopian
0ee06d116b Region cannot handle malformed Rects. Abort the Region op in that case.
Bug: 5331198, 5334829
Change-Id: Ib1fdbf6fb291e7f1191ccfe16b5ff29d73e7a474
2011-09-26 15:58:20 -07:00
Jason Sams
94aaed3846 Remove unused fields in ProgramRaster
Change-Id: I70c9d47674c956ec850c178c7aaa9a5e3dd9dffb
2011-09-23 14:18:53 -07:00
Jamie Gennis
44a052203e SurfaceTexture: add name support
This change adds support for setting a string that can be used to
identify a SurfaceTexture object in log messages.

Change-Id: Ib4ee085f36c8830dc964c05ef1654f5a55dfcd60
2011-09-22 17:49:10 -07:00
Jason Sams
dd0ffde6f5 Merge "Cleanup RS logs Reduce the startup/shutdown info and format the logs in a consistent manner." 2011-09-21 08:53:10 -07:00
Jason Sams
8410b14c85 Cleanup RS logs
Reduce the startup/shutdown info and format the logs
in a consistent manner.

Change-Id: I4592cd9fcf7e2920010d84c7137137262cdc73b9
2011-09-20 16:59:22 -07:00
Mathias Agopian
8bba5efcee Make sure Region handles invalid rectangles
the boolean operation code assumes rects are valid and
could go into an infinite loop if not. make sure we
abort before that happens.

Bug: 5331198, 5334829
Change-Id: Iee4e3b838ecf504ef21f7447fd2e34a56e7dc3f8
2011-09-19 16:50:17 -07:00
Mathias Agopian
83b186a246 fix the float Rect in OpenGLRenderer to handle NANs
- we want functions like isEmpty() to return true if NANs are
involved in the Rect

- also clean-up the intersect familly of calls

- minor cleanup in the int32_t Rect as well

These played a role in http://b/5331198.

Bug: 5331198

Change-Id: I5369725ab482e4b83da9f1bd4cee5256e5de75b2
2011-09-19 16:50:07 -07:00
Jeff Brown
92061b70be am 79aa4030: Merge "Can\'t stop the fling! Bug: 5335420" into ics-factoryrom
* commit '79aa40302b643ee6c6227ee354a1b1378e721568':
  Can't stop the fling! Bug: 5335420
2011-09-16 23:30:52 -07:00
Jeff Brown
b0c71eb9f5 Can't stop the fling!
Bug: 5335420

Fixed a bug in VelocityTracker where the output velocity was
not being set to zero when not available.

Added a condition to ensure that the velocity is at least
the minimum fling velocity before continuing.  If not, then
the user is trying to stop the fling and scroll more precisely.

Change-Id: I36634b0c3f7a9a09cf20c33f71d41163a8e33eed
2011-09-16 21:43:58 -07:00
Mathias Agopian
1afeea0f20 Merge "work around a problem where fp registers get corrupted (DO NOT MERGE)" into ics-factoryrom 2011-09-16 17:08:21 -07:00
Mathias Agopian
a5f7b3cbf7 work around a problem where fp registers get corrupted (DO NOT MERGE)
Bug: 5331198
Change-Id: I1f9b4a79d34d63f8adb0555909998664ea2ea9ca
2011-09-16 16:59:52 -07:00
Jeff Brown
3fccb86b31 Make LTE_FLOAT a strict weak order. (DO NOT MERGE)
Bug: 5327776

Currently LTE_FLOAT isn't even a valid partial order, let alone
a strict weak order as needed by binary search.  Consequently,
KeyedVectors with keys whose types have operator< using LTE_FLOAT
sometimes find the wrong values!

This problem affects several graphics caches including the
TextLayoutCache.

(This is still not a total order because NaNs are not comparable
but hopefully we don't ever search for NaNs this way!)

Change-Id: Ic447a34c7d87f681ee81538f22a0937a039072dd
2011-09-16 13:35:01 -07:00
Jeff Brown
bb0bccba23 Merge "Make LTE_FLOAT a strict weak order. Bug: 5327776" 2011-09-16 13:11:24 -07:00
Mathias Agopian
4920fde825 Merge "cleanup: fix typos in logs" 2011-09-16 12:58:30 -07:00
Jeff Brown
13ede62fd7 Make LTE_FLOAT a strict weak order.
Bug: 5327776

Currently LTE_FLOAT isn't even a valid partial order, let alone
a strict weak order as needed by binary search.  Consequently,
KeyedVectors with keys whose types have operator< using LTE_FLOAT
sometimes find the wrong values!

This problem affects several graphics caches including the
TextLayoutCache.

(This is still not a total order because NaNs are not comparable
but hopefully we don't ever search for NaNs this way!)

Change-Id: Ic447a34c7d87f681ee81538f22a0937a039072dd
2011-09-16 12:00:05 -07:00
Mathias Agopian
53f6cdd94d cleanup: fix typos in logs
Change-Id: Ib5744564a873ea2b84100174673dc4d3ae109fcf
2011-09-16 11:56:40 -07:00
Andreas Huber
86d7db52bf Fix androidGetThreadPriority for non-pthread configurations.
related-to-build

Change-Id: Ic865af0865906f96fd615a56a030c8e3adaf13c4
2011-09-16 11:47:13 -07:00
Andreas Huber
bcba155942 A new API "androidGetThreadPriority"
Change-Id: I6baeead8c70460863343fd557250635fb1e6a170
2011-09-16 09:33:22 -07:00
Jeff Brown
b59ab9f41f Velocity Tracker II: The Revenge of Velocity Tracker
Bug: 5265529

Rewrote the velocity tracker to fit a polynomial curve
to pointer movements using least squares linear regression.
The velocity is simply the first derivative of this polynomial.

Clients can also obtain an Estimator that describes the
complete terms of the estimating polynomial including
the coefficient of determination which provides a measure
of the quality of the fit (confidence).

Enhanced PointerLocation to display the movement curve predicted
by the estimator in addition to the velocity vector.

By default, the algorithm computes a 2nd degree (quadratic)
polynomial based on a 100ms recent history horizon.

Change-Id: Id377bef44117fce68fee2c41f90134ce3224d3a1
2011-09-14 19:16:37 -07:00
Jason Sams
5316b9eead Add RS watchdog.
Change-Id: I4c912beb84fa8a37ada0088049f7776132e994b6
2011-09-13 15:41:01 -07:00
Ben Komalo
6c048260f3 Merge "Revert encryption mapping for device wipes." 2011-09-11 16:48:32 -07:00
Jeff Brown
0e23c2efb0 Merge "Tweak VelocityTracker. Bug: 5265529" 2011-09-09 17:01:25 -07:00
Jeff Brown
581761d4aa Tweak VelocityTracker.
Bug: 5265529

Calculate the velocity using the most recent touch sample as the
point of reference instead of the oldest.  This change more heavily
weights recent touch samples and reduces the sample time window
used for calculation.  This significantly improves the accuracy
of fling gesture detection.

Change-Id: Ib1940933e786e5f6a731552a99bcd9400741d55f
2011-09-09 16:04:09 -07:00
Ben Komalo
13c7197da8 Revert encryption mapping for device wipes.
External storage volumes that were emulated+encrypted needed to have
their encryption mapping removed so that it doesn't try to encrypt the
volume after formatting them.

This just wires through an argument through vold, and assumes that vold
will do the right thing even if there is no encryption mapping set.

Bug: 5017638
Change-Id: I858fae3d12cb415bc34637f520f71220ad9daaad
2011-09-09 14:44:40 -07:00
Romain Guy
f5ad309a60 Merge "Add support for 3 new blend modes when blending with framebuffer: Add Multiply Screen" 2011-09-08 15:34:24 -07:00
Romain Guy
2ffefd48e2 Add support for 3 new blend modes when blending with framebuffer:
Add
  Multiply
  Screen

Change-Id: I92a3c2612c86613087568bf0c03cc6f92b5ded44
2011-09-08 15:33:03 -07:00
Andy McFadden
2d719afe81 Merge "Resurrect verbose binder logging" 2011-09-08 09:56:41 -07:00
Romain Guy
8a3957d43b Add reminder in the code to fix T-junctions
Change-Id: I52b112694f930e641f01fb78dc55412986023411
2011-09-07 17:55:15 -07:00
Andy McFadden
3f8cbfeb07 Resurrect verbose binder logging
Updated the command name lists, and masked off the additional bits in
the command word when doing the name lookup.

Made descriptor values easier to grep for and consistent with kernel
output (i.e. decimal rather than hex).  Attempt to show transaction
descriptors as such (they're in a union with a pointer).

Also, the writeLines() function in Static was using a no-op
logging call to write an iovec.  It looks like all callers are using
N=1, so I just added a log for the first string.

Bug 5155269

Change-Id: I417b8d77da3eb6ee1d2069ba94047210f75738bc
2011-09-07 16:45:03 -07:00
Jamie Gennis
08b997c742 Merge "SurfaceTexture: fix a test deadlock" 2011-09-05 14:51:20 -07:00