2193 Commits

Author SHA1 Message Date
Sunita Nadampalli
f1e868f682 SurfaceTexture: Fix to return the oldest of free buffers to Client on Dequeue call
Surface Texture dequeue logic is modified to return the oldest of the
free buffers to Client on dequeue call.

Currently dequeue method is returning the first buffer index which is free.
The parsing is done in ascending order of the buffer slot indices.
This leads to returning the buffer which has been just queued to composer,
and hence display, and this defeats the purpose of having minimum dequeue count
as 2 in asynchrnouse mode.

This is fixed by checking all the free slots and returning the oldest buffer.

Change-Id: Ibbac10593c3994c278c601af0480b171635ecdd4
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
2011-11-15 11:43:35 -08:00
Mathias Agopian
b89d88f531 Define, document, and test the behavior of very large SurfaceTextures
updateTexImage() now throws a runtime exception when its native
counterpart fails

Bug: 5506633

Change-Id: I151a6f685d465966e7df4df624412ab2da62e95f
2011-11-11 18:44:35 -08:00
James Dong
77c500c9a1 Add support for retrieving location information in mp4/3gpp files
Change-Id: Ib8427704ef9ee5a4fa8fe1818c8a62d77b4ea687
related-to-bug: 5560253
2011-11-10 11:40:11 -08:00
Andreas Huber
26f70db99f Merge "Remove surface legacy APIs and code." into ics-mr1 2011-11-08 08:48:31 -08:00
Jeff Brown
88061d6b38 am 5462bc63: Fix a leak in Parcel::writeBlob.
* commit '5462bc6318b4b70e7a58c66994e2bd79f59d9739':
  Fix a leak in Parcel::writeBlob.
2011-11-05 02:35:57 +00:00
Jeff Brown
5462bc6318 Fix a leak in Parcel::writeBlob.
Was mistakenly assuming that Parcel::writeFileDescriptor took
ownership of the fd that was passed in.  It does not!
Added some comments and a default parameter to allow the caller
to specify whether it wishes the Parcel to take ownership.

Bug: 5563374
Change-Id: I5a12f51d582bf246ce90133cce7690bb9bca93f6
2011-11-04 19:26:03 -07:00
Jamie Gennis
236aea3579 Merge changes Ibc99cb1c,Ie1f4f6f8 into ics-mr1
* changes:
  BlobCache: implement cache serialization
  BlobCache: remove the mutex locking
2011-11-03 11:51:23 -07:00
Chih-Chung Chang
11ba6da460 am 4b6353ea: Merge "Update camera continuous autofocus javadoc." into ics-mr0
* commit '4b6353ea0265bfed52d0637abd1b17596ce25ff0':
  Update camera continuous autofocus javadoc.
2011-11-01 04:05:45 +00:00
Chih-Chung Chang
4b6353ea02 Merge "Update camera continuous autofocus javadoc." into ics-mr0 2011-10-31 21:04:01 -07:00
Jamie Gennis
9d9768dbd7 BlobCache: implement cache serialization
This change adds serialization and deserialization functionality to
BlobCache, conforming to the Flattenable interface.

Change-Id: Ibc99cb1c3d015f363d57d0713eabccec07ff975e
2011-10-31 18:49:32 -07:00
Jamie Gennis
94c1f148bb BlobCache: remove the mutex locking
This change removes the mutex from the BlobCache class.  The caller must
be responsible for thread synchronization in order to properly implement
the Flattenable interface, which is coming soon.  Otherwise would be the
potential for the cache contents to change between the call to the
getFlattenedSize and flatten methods.  Because the caller must do this
synchronization anyway there's no reason to also some synchronization
inside BlobCache.

Change-Id: Ie1f4f6f82b78744f46a41ce863cac0cad276a20e
2011-10-31 18:48:31 -07:00
Andreas Huber
95be24585f Remove surface legacy APIs and code.
All surfaces are now supported through surface textures.

Change-Id: I95dd823e7099c0c32a48a1121624149dcc29d9c6
2011-10-28 09:39:23 -07:00
Jamie Gennis
fc9592f8a5 am 08479cee: Merge "Stagefright: ANW::connect in MediaPlayerService" into ics-mr0
* commit '08479ceeba56c460fb52f60a24df27776f1936c3':
  Stagefright: ANW::connect in MediaPlayerService
2011-10-28 02:14:01 +00:00
Wu-cheng Li
0f4f97b70f Update camera continuous autofocus javadoc.
Suppose applications call autoFocus in CAF picture mode. If
CAF is in the middle of scanning, the picture is very likely to
be blurry. Change focus callback to return when the scanning
finishes.

bug:5514415
Change-Id: Ibcb8f92a5263d7dbd7cce54df3617fb21c6255d4
2011-10-28 00:38:02 +08:00
Jamie Gennis
2fa0ac2e44 Stagefright: ANW::connect in MediaPlayerService
This change moves the ANativeWindow connect and disconnect logic from
MediaPlayer to MediaPlayerService::Client.

Bug: 5502654
Change-Id: Ifc43b98b01ad8f35d62d7ece43110724ec7fda3d
2011-10-26 18:40:00 -07:00
Jamie Gennis
5ded5fc55f am b7b4eaaa: Merge "Stagefright: push blank buffers when tearing down" into ics-mr0
* commit 'b7b4eaaa05284634d50d581d924a250f1194f66d':
  Stagefright: push blank buffers when tearing down
2011-10-26 20:34:38 +00:00
Jamie Gennis
c0e4293794 Stagefright: push blank buffers when tearing down
This change makes OMXCodec push RGB 565 buffers filled with black to an
ANativeWindow when tearing down after decoding to protected gralloc
buffers.  This allows the OMX tear down to zero out any protected
buffers that were used without the possibility that the buffer is still
being used by SurfaceFlinger or HWComposer.

Bug: 5483222
Change-Id: I8acedd81a7bb67dfdc2fd15733e3375b6ce8d560
2011-10-25 18:35:02 -07:00
Dave Burke
149a14931e am 23d64420: Merge "Stagefright: idle OMX after ANW errors" into ics-mr0
* commit '23d644202a44383bf008ff86f6faa3ea7e447290':
  Stagefright: idle OMX after ANW errors
2011-10-19 22:38:45 -07:00
Dave Burke
23d644202a Merge "Stagefright: idle OMX after ANW errors" into ics-mr0 2011-10-19 22:37:18 -07:00
Jamie Gennis
6607b39baa Stagefright: idle OMX after ANW errors
This change fixes an issue in Stagefright where the state of an OMXCodec
object can get out of sync with the state of the OMX component.  In
particular, if one of the ANativeWindow functions failed and put the
OMXCodec into the ERROR state, this would cause Stagefright to skip
doing the Executing -> Idle transition.  Without this transition the
freeBuffersOnPort call would never be made, and the MediaBuffers would
end up being leaked (which would also leak the Gralloc buffers they
reference).

Bug: 5333695
Change-Id: I85ea0cf92d18e7ef6d35c7d1e2a7b4e2c9745d34
2011-10-19 21:22:19 -07:00
Dave Burke
2696d0520f am 70ac412b: Merge "Add a LayerScreenshot" into ics-mr0
* commit '70ac412b2fe7be2507189a9fdfb30c43b36d56ac':
  Add a LayerScreenshot
2011-10-18 23:00:08 -07:00
Mathias Agopian
0ab84ef507 Add a LayerScreenshot
A LayerScreenshot is a special type of layer that contains a screenshot of
the screen acquired when its created. It works just like LayerDim.

Make sure to call compositionComplete() after rendering into a FBO.

Bug: 5446982, 5467587, 5466259
Change-Id: I5d8a1b4c327f9973d950cd4f4c0bca7f62825cd4
2011-10-18 20:21:47 -07:00
Mathias Agopian
72cdc6d488 am 9a0732af: Merge "SensorManager reconnects to sensor service when the later dies" into ics-mr0
* commit '9a0732af1bd96a7d8247dee124a7da389137a52f':
  SensorManager reconnects to sensor service when the later dies
2011-10-17 15:52:31 -07:00
Mathias Agopian
9a0732af1b Merge "SensorManager reconnects to sensor service when the later dies" into ics-mr0 2011-10-17 15:50:36 -07:00
Mathias Agopian
a3dca6fdaa am 840b8a67: Revert "Add a LayerScreenshot"
* commit '840b8a678537519c27ddf2f818494eaa20a135d4':
  Revert "Add a LayerScreenshot"
2011-10-17 11:32:19 -07:00
Elliott Hughes
f21dd1eabe Merge branch 'master' of ssh://android-git:29418/platform/frameworks/base 2011-10-17 11:32:08 -07:00
Jamie Gennis
7f7362c02b Merge changes I4e5ff00c,Id5e3ca1d,I97cbba61
* changes:
  SurfaceFlinger: Remove display freezing code
  SurfaceFlinger: add some layer update tests
  SurfaceFlinger: make sync transactions explicit
2011-10-17 11:31:39 -07:00
Mathias Agopian
4b1415ebd9 am 57337eb7: Merge "Add a LayerScreenshot" into ics-mr0
* commit '57337eb78e65c160fb9c46a01e04c476d1bfdca1':
  Add a LayerScreenshot
2011-10-17 11:30:33 -07:00
Mathias Agopian
840b8a6785 Revert "Add a LayerScreenshot"
This reverts commit d6809f40cf61203573ec5dbc437f695cd132cc18.
2011-10-16 23:54:25 -07:00
Mathias Agopian
de6c44e906 SensorManager reconnects to sensor service when the later dies
if system process ever restarted, processes using a SensorManager
would loose the ability to use it, resulting to a crash.
we now listen for sensor service death and reconnected if necessary.

Bug: 5445240
Change-Id: Ia47f8b26cdcecb729fa22bf11d55e10fcaef8cfc
2011-10-16 22:15:23 -07:00
Jeff Brown
a39a055304 Merge "Deprecate local-only CursorWindows." 2011-10-14 21:05:58 -07:00
Jamie Gennis
de14ecaebc SurfaceFlinger: Remove display freezing code
This change removes the dead code from SurfaceFlinger that resulted from
disabling support for freezing the display.

Change-Id: I4e5ff00c94b4c7a79af2f65c9850c135210068ed
2011-10-14 16:44:08 -07:00
Jamie Gennis
122aa6bae9 SurfaceFlinger: make sync transactions explicit
This change enables a layer or orientation update transaction sent to
SurfaceFlinger to explicitly request a synchronous transaction.

Change-Id: I97cbba610c13679849f66114b216fa6dbf12f2a9
2011-10-14 16:11:51 -07:00
Mathias Agopian
d6809f40cf Add a LayerScreenshot
A LayerScreenshot is a special type of layer that contains a screenshot of
the screen acquired when its created. It works just like LayerDim.

Bug: 5446982
Change-Id: I7814aff2380e7e146937f2b641907be2a30c76cc
2011-10-14 14:32:48 -07:00
Andreas Huber
0eb6ef1798 Merge "Support for an MPEG2 Program Stream extractor." 2011-10-13 10:03:26 -07:00
Wu-cheng Li
7a3ba4d732 am 514a6cfb: Merge "Improve camera javadoc and fix some errors." into ics-mr0
* commit '514a6cfb7f7085b266f457155ff63373d2dff8ee':
  Improve camera javadoc and fix some errors.
2011-10-12 23:36:14 -07:00
Jeff Brown
5e5d6d8ba0 Deprecate local-only CursorWindows.
There is no difference and has never really been a difference
between local-only and remotable CursorWindows.  By removing the
distinction officially in the API, we will make it easier to
implement CrossProcessCursor correctly.  CrossProcessCursor
is problematic currently because it's not clear whether a call
to getWindow() will return a local-only window or a remotable window.
As a result, the bulk cursor adaptor has special case handling
for AbstractWindowedCursors vs. ordinary CrossProcessCursors
so that it can set a remotable window before the cursor fills it.
All these problems go away if we just forget about local-only
windows being special in any way.

Change-Id: Ie59f517968e33d0ecb239c3c4f60206495e8f376
2011-10-12 22:19:41 -07:00
Wu-cheng Li
53b30912d3 Improve camera javadoc and fix some errors.
bug:5169599
Change-Id: Ic2205770753ff462135f884fee0a888ca8ec832d
2011-10-13 12:04:05 +08:00
Romain Guy
19de9efcc4 Merge "Reduce the size of libhwui by 50%" 2011-10-12 13:50:11 -07:00
Romain Guy
7953745dd5 Reduce the size of libhwui by 50%
This change removes unnessary symbols. All symbols are hidden by
default, public APIs with exported symbols are explicitly marked
with ANDROID_API.

Change-Id: I692fde432a86c12108de1cfd1f6504919a7d5f3f
2011-10-12 13:48:51 -07:00
Jamie Gennis
075e4c3d2e Merge "SurfaceFlinger: update orientation via transactions" into ics-mr0 2011-10-12 13:03:11 -07:00
Eino-Ville Talvala
0a27359280 Merge "Add video stabilization control to Camera parameters." into ics-mr0 2011-10-12 10:37:57 -07:00
Eino-Ville Talvala
037abb8bb0 Add video stabilization control to Camera parameters.
Hardware video stabilization reduces camera shake in preview
and in recorded videos. It has no effect on still image capture.

Convenience accessor methods hidden for now.

Change-Id: Ie18450bff662b2ef98b85d19719beefc180975fc
2011-10-12 10:34:10 -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
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
Lakshman Gowda
db62a245f9 Set crop params to ANative Window during Initialization.
The native_window_set_crop() is called when port reconfig event callback comes from decoder's and
crop parameters are changed from default getconfig() OMX_IndexConfigCommonOutputCrop values.
Since the default crop params are same as port reconfig crop params, the native_window_set_crop()
is not called, hence resulting in displaying the whole frame(paddedWidth x paddedHeight).
By calling native_window_set_crop() during initilaization of output port of decoder ensures
in setting up ANative window to crop region.

Change-Id: I68926464a1f5c7e6053804615c8b9bd32ea85688
Signed-off-by: Lakshman Gowda <lakshman79@ti.com>
2011-10-05 10:29:27 -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