3446 Commits

Author SHA1 Message Date
Romain Guy
44476779ae Merge "Correctly position layers." 2011-07-08 11:58:18 -07:00
Romain Guy
b2479153b7 Correctly position layers.
Change-Id: I1678b1c5bdab140b44e56556c50ab8329255f18a
2011-07-08 11:57:29 -07:00
Romain Guy
e92096fa6a Merge "Use NEAREST filtering mode for TextureView.getBitmap()." 2011-07-07 21:28:41 -07:00
Romain Guy
ec19b4a764 Use NEAREST filtering mode for TextureView.getBitmap().
Change-Id: I4649062bbdf18ebba7924bdf578f39ad8f6576ac
2011-07-07 21:27:14 -07:00
Romain Guy
69abbd8791 Merge "Use NEAREST filtering for layers whenever possible." 2011-07-07 20:55:08 -07:00
Romain Guy
9ace8f5e79 Use NEAREST filtering for layers whenever possible.
Change-Id: Id5bee1bd4a322cf93e8000b08e18f1e1b058648e
2011-07-07 20:50:11 -07:00
Jamie Gennis
19a695c477 Merge "SurfaceTexture: enable newly passing tests." 2011-07-07 14:42:12 -07:00
Jamie Gennis
413b3f7382 SurfaceTexture: enable newly passing tests.
This change enables the following four SurfaceTextures tests:
  UpdateTexImageBeforeFrameFinishedWorks
  UpdateTexImageAfterFrameFinishedWorks
  RepeatedUpdateTexImageBeforeFrameFinishedWorks
  RepeatedUpdateTexImageAfterFrameFinishedWorks

Change-Id: I7632630bc97873e50d4a765ffc44a86f16ae62f1
2011-07-06 14:47:47 -07:00
Glenn Kasten
5161eb7b23 Merge "Add Thread::join" 2011-07-06 11:37:53 -07:00
Mathias Agopian
7893c5e83c Merge "fix ScreenshotsOfProtectedBuffersFail" 2011-07-06 11:10:06 -07:00
Mathias Agopian
7eef784ea9 Merge "return an error code with gralloc buffer allocation failures" 2011-07-06 11:09:55 -07:00
Glenn Kasten
4431c05f13 Merge "Thread ID zero for androidSetThreadSchedulingGroup" 2011-07-05 15:08:31 -07:00
Mathias Agopian
994e7619a6 fix ScreenshotsOfProtectedBuffersFail
- put the test window at the front most screen position
- use RGBA_8888 which is a mandatory format
- handle devices that don't support the protected usage flags

Bug: 4950464

Change-Id: I0005fb667cfe094e5978816e2924b294c5ef817e
2011-07-01 15:41:32 -07:00
Mathias Agopian
eec0f7ebac return an error code with gralloc buffer allocation failures
Change-Id: I471e5d37ea7a42fc8a0f93446ee3b4229da37807
2011-07-01 14:53:49 -07:00
Pannag Sanketi
ea458f190b Merge "Minor fix in SurfaceTexture" 2011-06-30 18:38:18 -07:00
Pannag Sanketi
c9ec69eb6f Minor fix in SurfaceTexture
Change-Id: Ic859715becf3e6d5107bd8beb8c577034d00ec52
2011-06-30 15:41:19 -07:00
Mathias Agopian
272aaa382f Merge "SF transactions are now O(1) wrt IPC instead of O(N)." 2011-06-29 16:15:56 -07:00
Mathias Agopian
439863f3b3 SF transactions are now O(1) wrt IPC instead of O(N).
Change-Id: I57669852cbf6aabae244ea86940a08a5a27ffc43
2011-06-29 15:05:41 -07:00
Jason Simmons
9e1fb41b4f Merge "Add a linear transform library to libutils" 2011-06-29 13:48:39 -07:00
Jeff Brown
e9e860762b Merge "Improve input event consistency invariants." 2011-06-28 20:17:59 -07:00
Jeff Brown
8134681b25 Improve input event consistency invariants.
Fixed some issues where inconsistent streams of events could
be generated by the dispatcher, particularly when switching from
hovering with one device to hovering with another.

Fixed a bug where the touch pad would fail to generate a new
HOVER_MOVE following a tap event.  As a result, the hover event
stream would not resume until the user touched the touch pad
again.

Change-Id: I444dce84641fb12e56a0af84c931520771d6c493
2011-06-28 20:10:40 -07:00
Jason Simmons
aa11965bd5 Add a linear transform library to libutils
Change-Id: Icdec5a6bebd9d8f24b3f335f8ec8b09a5810a774
2011-06-28 17:43:30 -07:00
Jamie Gennis
2a319a03b5 Merge "SurfaceTexture: add a CPU -> GL sync test." 2011-06-28 14:27:17 -07:00
Romain Guy
8229b467fc Merge "Fix parameter order evaluation issue." 2011-06-28 14:03:20 -07:00
Romain Guy
9ff3cb57ee Fix parameter order evaluation issue.
This problem was affecting Android builds with gcc/x86.

Change-Id: Ibb7978413c89bd1ac09f0d1ea78f5cb4fe61f6ed
2011-06-28 14:02:11 -07:00
Jamie Gennis
1b62309831 SurfaceTexture: add a CPU -> GL sync test.
This change adds a test to verify that proper synchronization is done
when using SurfaceTexture to use CPU generated images as OpenGL ES
textures in 'synchronous mode'.  Synchronous mode is particularly tricky
because SurfaceTexture will allow the buffer that's currently bound to
the GL texture to be dequeued.  We rely on Gralloc's lock function to
block until this buffer is no longer being used by the OpenGL ES.

Change-Id: I1c4e37f3e9d60ab9a0905a90a1f5060fda8e485c
2011-06-28 13:18:07 -07:00
Jamie Gennis
3cf7cf5751 Merge changes I9fb59763,I8b2c6e00
* changes:
  SurfaceTexture: consume buffers after err checks
  SurfaceTexture: change onFrameAvailable behavior
2011-06-28 12:55:03 -07:00
Andy McFadden
84e297238f Remove native EventRecurrence parser
Switch over to the new parser.

Bug 4575374

Change-Id: If78d8042fb266182900398f7fc464a048c779966
2011-06-28 07:43:27 -07:00
Mathias Agopian
0dd593f223 PermissionCache caches permission checks
This is intended to absorb the cost of the IPC
to the permission controller.
Cached permission checks cost about 3us, while
full blown ones are two orders of magnitude slower.

CAVEAT: PermissionCache can only handle system
permissions safely for now, because the cache is
not purged upon global permission changes.

Change-Id: I8b8a5e71e191e3c01e8f792f253c379190eee62e
2011-06-27 17:42:15 -07:00
Jamie Gennis
9fb5976367 SurfaceTexture: consume buffers after err checks
This change moves the point at which queued buffers get consumed to
after any error checks that could cause updateTexImage to fail.  This
way, if updateTexImage returns an error the buffer remains queued.
2011-06-27 15:45:40 -07:00
Jamie Gennis
bd5404d031 SurfaceTexture: change onFrameAvailable behavior
This change alters the conditions under which the onFrameAvailable
callback gets called by the C++ SurfaceTexture class.  The new behavior
is to call the callback whenever a frame gets queued that will be
visible to the buffer consumer.  This means that buffers queued in
synchronous mode always trigger the callback, as those buffers will
remain pending until they are consumed.  Buffers queued in asynchronous
mode will only trigger the callback if there was not previously an
unconsumed buffer pending.

The new behavior means that a consumer should perform a draw operation
exactly once for every onFrameAvailable call that it recieves.  This
change also modifies SurfaceFlinger and the SurfaceTexture JNI to
support of the new behavior.

Change-Id: I8b2c6e00961d3d58b11c6af50b555b6e4c5f5b40
2011-06-27 15:45:39 -07:00
Anu Sundararajan
f24c4cd0f2 MemoryHeapBase: Save and binderize the offset
The offset that is used in the creation of the MemoryHeapBase must be saved, so
that it can be used to recreate the Heap when an IMemory object is passed
across process boundary through the binder.

Change-Id: Ie618fb5c0718e6711f55ed9235616fd801e648dc
Signed-off-by: Anu Sundararajan <sanuradha@ti.com>
Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-06-27 13:48:51 -07:00
Wu-cheng Li
42419ce28a Add framework support for camcorder zoom.
The purpose of ICameraRecordingProxy and ICameraRecordingProxyListener is to
allow applications using the camera during recording.

Camera service allows only one client at a time. Since camcorder application
needs to own the camera to do things like zoom, the media recorder cannot
access the camera directly during recording. So ICameraRecordingProxy is a proxy
of ICamera, which allows the media recorder to start/stop the recording and
release recording frames. ICameraRecordingProxyListener is an interface that
allows the recorder to receive video frames during recording.

ICameraRecordingProxy
  startRecording()
  stopRecording()
  releaseRecordingFrame()

ICameraRecordingProxyListener
  dataCallbackTimestamp()

The camcorder app opens the camera and starts the preview. The app passes
ICamera and ICameraRecordingProxy to the media recorder by
MediaRecorder::setCamera(). The recorder uses ICamera to setup the camera in
MediaRecorder::start(). After setup, the recorder disconnects from camera
service. The recorder calls ICameraRecordingProxy::startRecording() and
passes a ICameraRecordingProxyListener to the app. The app connects back to
camera service and starts the recording. The app owns the camera and can do
things like zoom. The media recorder receives the video frames from the
listener and releases them by ICameraRecordingProxy::releaseRecordingFrame.
The recorder calls ICameraRecordingProxy::stopRecording() to stop the
recording.

The call sequences are as follows:
1. The app: Camera.unlock().
2. The app: MediaRecorder.setCamera().
3. Start recording
   (1) The app: MediaRecorder.start().
   (2) The recorder: ICamera.unlock() and ICamera.disconnect().
   (3) The recorder: ICameraRecordingProxy.startRecording().
   (4) The app: ICamera.reconnect().
   (5) The app: ICamera.startRecording().
4. During recording
   (1) The recorder: receive frames from ICameraRecordingProxyListener.dataCallbackTimestamp()
   (2) The recorder: release frames by ICameraRecordingProxy.releaseRecordingFrame().
5. Stop recording
   (1) The app: MediaRecorder.stop()
   (2) The recorder: ICameraRecordingProxy.stopRecording().
   (3) The app: ICamera.stopRecording().

bug:2644213

Change-Id: I15269397defc25cbbcae16abc071c8349c123122
2011-06-27 15:44:57 +08:00
Romain Guy
44f8d6bd15 Merge "Don't set texture parameters on every frame." 2011-06-24 17:54:25 -07:00
Romain Guy
4a5a71518a Don't set texture parameters on every frame.
Change-Id: Iec368405ad6a4ccfd569a0b3b4d681871a770396
2011-06-24 17:53:53 -07:00
Romain Guy
4c60c541de Merge "Properly tear down TextureView" 2011-06-24 17:21:26 -07:00
Romain Guy
80429c4585 Properly tear down TextureView
Change-Id: Ic23cd9257889d0abe8cc3fc1d04a66d0505e383e
2011-06-24 17:20:32 -07:00
Christopher Tate
78a7f12043 Merge "Fix settings restore" 2011-06-24 15:15:51 -07:00
Christopher Tate
28cdb9e104 Fix settings restore
Also correct the debug-mode logging of error locations in backup data.
Bug 4914182

Change-Id: Ie7dda0192afa819e42490b7ffd2d3db6f11968f6
2011-06-24 15:06:48 -07:00
Romain Guy
02ccac69fd Code cleanup
Change-Id: I64c346004e0adf9a776d0315534d4fe445f0c0ca
2011-06-24 13:20:23 -07:00
Grace Kloba
0904d0af81 Add allowSynchronousMode to SurfaceTexture constructor.
Change-Id: I54f30a3c16bbe6b813f3bcd1d389da5627531304
2011-06-23 21:21:47 -07:00
Stephen Hines
cf86dc2997 Merge "Move divsi3, modsi3, udivsi3, umodsi3 to libbcc." 2011-06-23 17:08:02 -07:00
Stephen Hines
7c1747c13c Merge "Remove verbose logging, update test app and docs." 2011-06-23 17:07:10 -07:00
Stephen Hines
e352f05d3a Move divsi3, modsi3, udivsi3, umodsi3 to libbcc.
BUG=3435530

Change-Id: I4e90a6cdf5af534f93d83093ea31b1defd1e896c
2011-06-23 16:49:00 -07:00
Stephen Hines
3d782666d7 Remove verbose logging, update test app and docs.
Change-Id: I6659c5e51a747011239128dc2682a5d78aecfa26
2011-06-23 16:18:28 -07:00
tedbo
0694cfe49a Merge "Add method to create a ParcelSurfaceTexture from android.view.Surface." 2011-06-23 14:45:30 -07:00
Glenn Kasten
697283e917 Add Thread::join
This new API will be used by applications that previously used the
lower-level pthread APIs (including pthread_join).  Centralizing on the
Thread class instead of pthread will permit additional functionality to
be added later in only one location.

Change-Id: I8460169ac9c61ac9f85752405ed54c94651058d7
2011-06-23 12:55:29 -07:00
Romain Guy
a9489274d6 Add the ability to specify the opacity of a TextureView
TextureView assumes its content is opaque by default.

Change-Id: Iba873423566a5b67c388081838bd910dceba32ba
2011-06-22 20:58:11 -07:00
Glenn Kasten
60d47796cc Thread ID zero for androidSetThreadSchedulingGroup
Already implemented by androidSetThreadPriority but not documented

Change-Id: I85302b17092952065f3f3a4214d8d8abdd465dbd
2011-06-22 17:45:30 -07:00
Romain Guy
d586ad9c9f Fix another memory leak in OpenGLRenderer
Change-Id: I23ed56891452a05cf3ca13f6919c4fef90d5ff4e
2011-06-22 17:10:00 -07:00