Commit Graph

1086 Commits

Author SHA1 Message Date
Mathias Agopian
a0db308c3d remove SurfaceTexture::connect()
use BufferQueue::connect() instead

Change-Id: I04aab7cf11304bf962cde38470747f3b19ddba42
2012-04-23 20:06:02 -07:00
Glenn Kasten
0f00cca168 Merge "Scheduling group cleanup" 2012-04-23 17:11:51 -07:00
Mathias Agopian
64a1e08b86 SF doesn't need more than a few binder threads
Change-Id: Ic4659fb81f9990cc7caf84a496a8ae659a1d16a9
2012-04-19 17:32:03 -07:00
Andreas Huber
383190e475 Allow the crypto plugin to specify error detail if it returns an error
in the range ERROR_DRM_VENDOR_MIN..ERROR_DRM_VENDOR_MAX.

Change-Id: Ic5d53e98cf6d98d92ad305d51f848e03d0bf3a84
related-to-bug: 6365261
2012-04-19 13:49:56 -07:00
Glenn Kasten
a26e1cfbbc Scheduling group cleanup
Remove C++ APIs androidSetThreadSchedulingGroup and
androidGetThreadSchedulingGroup, and the ANDROID_TGROUP_* constants.

Former callers of these should now use the C APIs set_sched_policy and
get_sched_policy, and the SP_* constants.

Note: debug.sys.noschedgroups is not supported by the C APIs,
this needs to be discussed.

Change-Id: I32bbfc539ef4090faf9ef0320380e8cca9eae07c
2012-04-19 11:32:59 -07:00
Mathias Agopian
9798ff28b8 Merge "add set thread count" 2012-04-18 18:36:16 -07:00
Mathias Agopian
1b80f793d2 add set thread count
Change-Id: I70f02908d8362a465eb8a2a24356f6989847f7ba
2012-04-18 17:50:03 -07:00
Eino-Ville Talvala
85b217668d Remove fixed USAGE_HW_TEXTURE flag from BufferQueue.
USAGE_HW_TEXTURE applies to SurfaceTexture, not to all uses of
BufferQueue. Refactor accordingly.

Change-Id: Ic7add5e1f2bbec3d3e796ba7f15eaa0633945d8f
2012-04-18 10:56:06 -07:00
Jeff Brown
992b4c556b Merge "Support tokenizing arbitrary content." 2012-04-17 18:20:55 -07:00
Jeff Brown
a8be8fa096 Support tokenizing arbitrary content.
Bug: 6110399
Change-Id: I37be63b68934fd451e6dffbf7d6079553619c0a3
2012-04-17 18:19:50 -07:00
Chris Craik
4851e21d2a Merge "Add webview tracing bit" 2012-04-17 10:04:42 -07:00
Mathias Agopian
3aecbb0715 fix Region const_iterator.
- it returned an empty rect when the region was empty, instead
of returning an empty list of rect.

- also fixed an infinite loop when boolean_operation was given
an empty list of rects

Change-Id: I62225c7dcd2832025bb8f12e6cb3762f2a7b36cb
2012-04-16 18:40:30 -07:00
Chris Craik
6acafadea0 Add webview tracing bit
Change-Id: I82e54f5eeb2666a255e372fd3bfcc54c1b3d76a0
2012-04-16 16:09:16 -07:00
Mathias Agopian
ac6035a12a s/w rendered apps can now use n-buffering (n>2)
Bug: 6311881
Change-Id: I6e52e281e8d432430aad011f6d9dcf35d7b4ac7d
2012-04-13 16:04:44 -07:00
Daniel Lam
016c8cbce4 Enabled cropping support in SurfaceTexture
SurfaceTexture will modify the crop rect so it matches
the desired output aspect ratio when the scaling
mode is NATIVE_WINDOW_SCALING_MODE_CROP.  Added a test
for this new scaling mode.

Change-Id: I60f24dcbc294b65cd10a393d9e27d40f07d27bb6
2012-04-12 17:49:03 -07:00
Michael I. Gold
55a701459d SurfaceTextureClient: support for application buffer dimensions
Add a new API native_window_set_buffers_user_dimensions to allow native
applications to override the native window size for the default buffer size.
This has lower precedence than the existing
native_window_set_buffers_dimensions and allows the two to co-exist.

Change-Id: Ie73590e1c94ef0dadbce500bd0941dfabbcace3c
2012-04-11 18:37:54 -07:00
Mathias Agopian
f0bc2f1d8d use in/out structures for queueBuffer() IPC
Change-Id: Ie125df2444b62a9a2200586a717dca268852afc9
2012-04-10 21:04:12 -07:00
Daniel Lam
fbcda930dd BufferQueue returns proper code on acquire
Also removed unnecessary debug messages from
SurfaceTextureClient.

Change-Id: I291897a44170142f9d42a007b008823fad4683e0
2012-04-09 23:21:33 -07:00
Daniel Lam
abe61bfda4 BufferQueue no longer hardcodes buffer counts
BufferQueue is now more flexible as it can be used
by SurfaceMediaSource in addition to SurfaceTexture.

Change-Id: I4222be8918d63372c44fcd412d9ad241c6a3eeb9
2012-04-06 21:02:13 -07:00
Jamie Gennis
8cce8a9a75 Merge "Fixed disconnect bug in SurfaceTexture" 2012-04-06 09:05:49 -07:00
Mathias Agopian
9b71221171 Merge "use a socketpair instead of a pipe in BitTube" 2012-04-03 15:38:10 -07:00
Andreas Huber
cf0db31c32 New Crypto "HAL" API.
Change-Id: I225cdfeffb7663a2d639a01cfe704aa12f9014b8
related-to-bug: 6275919
2012-04-03 14:15:05 -07:00
Mathias Agopian
7b5be95cb3 use a socketpair instead of a pipe in BitTube
Bug: 6252830
Change-Id: Ia7a7b08409517214136261c05569dc5959a597ab
2012-04-02 18:41:10 -07:00
Yang Chuang
a1ec30ef26 Add Japanese specific key codes
These keys are specific to Japanese hardware keyboard which can be
used by input method.

Patch ported from AOSP, with the addition of KANA.

Change-Id: I1474f0eb8971ed5d632822b1f9825c426f4817eb
2012-04-02 15:20:24 -07:00
Daniel Lam
9abe1ebc95 Fixed disconnect bug in SurfaceTexture
BufferQueue's disconnect could race with updateTexImage
where invalid buffers could be released.  Additionally
fixed similar bug with setBufferCount.  Tests were added
to stress the disconnect mechanism.

Change-Id: I9afa4c64f3e025984e8a9e8d924852a71d044716
2012-04-02 14:55:01 -07:00
Jamie Gennis
0e1080f887 Merge "SurfaceTexture: add context attach & detach" 2012-04-01 15:41:24 -07:00
Jamie Gennis
74bed55fff SurfaceTexture: add context attach & detach
This change adds the detachFromContext and attachToContext methods to
SurfaceTexture.  These methods allow the SurfaceTexture to switch from
one consumer GLES context to another.  This change also includes a few
cleanups to the error return codes in updateTexImage.

Change-Id: I0df1eb599aa7b6f58f07431f242f8f09269559ed
2012-03-30 16:47:28 -07:00
Mathias Agopian
851ef8f1bf reduce IPC with BufferQueue
collapse setCrop, setTransform and setScalingMode to queueBuffer()
this ends up simplifying things quite a bit and reducing the numnber
of IPC needed per frame.

Change-Id: I3a13c07603abe4e76b8251e6380b107fde22e6d9
2012-03-30 15:16:30 -07:00
Jamie Gennis
9285a16450 Merge "Refactored DummyConsumer" 2012-03-29 13:57:10 -07:00
Colin Cross
b731ae01b1 Move services/powermanager from frameworks/base to frameworks/native
Move services/powermanager into frameworks/native so audioflinger can
use it.  Note that this is not the same as a PowerManagerService,
which is part of systemserver and handles turning the screen on and
off, etc.  This is just a binder interface to allow taking wakelocks.

Change-Id: I6b6a8b41cdbad17e826fda45aab5f059f22fc64e
2012-03-28 13:58:23 -07:00
Daniel Lam
9d61a28d72 Refactored DummyConsumer
DummyConsumer no longer uses a ProxyConsumerListener

Change-Id: I0a99428b3f9dae82cb47d5da3589de77653f3d7c
2012-03-27 16:47:12 -07:00
Jamie Gennis
87579669e0 Merge "Added a DummyConsumer for use with BufferQueue." 2012-03-26 17:17:49 -07:00
Daniel Lam
f71c4ae136 Added a DummyConsumer for use with BufferQueue.
The DummyConsumer is a consumer that can connect to BufferQueue
that does nothing.  It is required as BufferQueue checks
if a consumer is connected.  Also fixes a bug where SurfaceTexture
was reusing old texture slots.

Bug: 6172739
Change-Id: I5e7a118dd4d07807ba4c763200242b5ee7d3412b
2012-03-26 15:29:35 -07:00
Glenn Kasten
0b94dcd03d mv libcpustats from frameworks/base to /native
OK to lose history

Change-Id: I563fec271e0bc240e4a09a8b9647c7439badd85b
2012-03-26 12:18:24 -07:00
Mathias Agopian
e1c61d3cc8 move ndk headers to frameworks/native
Change-Id: Ib740333753818ff8f8230ed009211b447e30cbee
2012-03-23 14:19:36 -07:00
Mathias Agopian
b0e76f456a remove dependency of EGL on ndk header
Change-Id: Ia6e489b5b4f028864bdf54923e81f604710dd8ad
2012-03-23 14:15:44 -07:00
Colin Cross
163d5a9fa7 frameworks/native: move Zip* from libandroidfw to libutils
ZipUtils is needed by build/tools, move it from libandroidfw
(frameworks/base) to libutils (frameworks/native).

Change-Id: Ib8c41134ccdec6d6aa8d49860f8dddef49a24783
2012-03-22 18:50:03 -07:00
Kenny Root
4639dcfb2a Add UniquePtr.h to frameworks/native
This is a copy of libcore's UniquePtr.h header which is used until we
get C++11 which has std::unique_ptr which is essentially the same.

Taken from libcore project at commit
3e6dd45baa0d7f9b4fa06f4ade76e088b59cc7bf

Change-Id: I7537b016f9eae33bfc4c57b24f86260909719ab8
2012-03-22 16:36:18 -07:00
Jamie Gennis
de3b072b12 Merge "libgui: have ST::updateTexImage check the GL ctx" 2012-03-20 12:03:29 -07:00
Jamie Gennis
782cb13c12 Merge "libgui: add BQ consumer buffer free notifications" 2012-03-20 12:03:06 -07:00
Jamie Gennis
ce56137218 libgui: have ST::updateTexImage check the GL ctx
This change adds a check to SurfaceTexture::updateTexImage to verify
that the current GL context is the same as the one that was used for
previous updateTexImage calls.

Change-Id: If02d2f787bcfdb528046dc9ddf6665f8a90e1bf4
2012-03-19 18:33:05 -07:00
Jamie Gennis
fa5b40ebb8 libgui: add BQ consumer buffer free notifications
This change adds a new callback for BufferQueue consumers to be notified
when the BufferQueue frees some or all of its buffers.  This is needed
to retain SurfaceTexture behavior where all buffers would be freed when
the producer disconnects.  This change also modifies the
SurfaceTextureGLToGLTest.EglDestroySurfaceUnrefsBuffers test to catch
when the buffers are not freed.

The implementation is a little complicated because it needs to avoid
circular sp<> references across what will be a binder interface (so wp<>
can't be used directly).  It also needs to avoid the possibility of
locking the BufferQueue and consumer (e.g. SurfaceTexture) mutexes in
the wrong order.

This change also includes a few additional fixes and test cleanups.

Change-Id: I27b77d0af15cb4b135f4b63573f634f5f0da2182
2012-03-19 15:09:09 -07:00
Jeff Brown
0818b0921e Add a simple work queue abstraction.
Makes it easy to schedule a bunch of work to happen in parallel.

Change-Id: Id9c0e52fc8b6d78d2b9ed4c2ee47abce0a01775c
2012-03-17 14:28:38 -07:00
Jeff Brown
e6d77c593d Add traits to common utils data structures.
Many of our basic data structures are trivially movable using
memcpy() even if they are not trivially constructable, destructable
or copyable.  It's worth taking advantage of this *ahem* trait.

Adding trivial_move_trait to String16 reduces appt running
time on frameworks/base/core/res by 40%!

Change-Id: I630a1a027e2d0ded96856e4ca042ea82906289fe
2012-03-16 16:21:21 -07:00
Andreas Huber
599ebfd48d Remove all traces of long obsolete OMXComponentBase class.
Change-Id: I749994fe1560363afc95beae45b66ea56a20caa8
2012-03-16 09:00:53 -07:00
Eino-Ville Talvala
642b9e58a3 Merge "Move CameraParameters.h to frameworks/native." 2012-03-15 10:33:59 -07:00
Eino-Ville Talvala
8c511a9d0c Move CameraParameters.h to frameworks/native.
CameraParameters.h is indirectly required to implement the Camera
HAL. Move it to frameworks/native.

Bug: 6171735
Change-Id: If4ccb273ea7ca79f54402ebc00febf1c3e59799f
2012-03-14 17:17:05 -07:00
Daniel Lam
b267579ba8 SurfaceTexture: Fully refactored from BufferQueue
SurfaceTexture and BufferQueue are separate objects.

Change-Id: I230bc0ae6f78d0f9b2b5df902f40ab443ed5a055
2012-03-13 14:39:07 -07:00
James Dong
9f70b92f1b Copy one more file to /frameworks/native
o related-to-bug: 6044887

Change-Id: I920c487089eb258ada87603134f2597db6fe14e9
2012-03-12 18:55:13 -07:00
James Dong
e56a585271 Merge "Copied some headers from /frameworks/base to /frameworks/native to support PDK effort" 2012-03-12 15:00:47 -07:00