Commit Graph

828 Commits

Author SHA1 Message Date
Mike Lockwood
c2be743a9c Remove some #ifdef HAVE_ANDROID_OS that were needed for the simulator build
Change-Id: I13d9f251f86c05ae5405f37adbf6b8e9660935ba
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-07-13 19:45:44 -04:00
Jamie Gennis
0d0c5a6d6b Merge "EGL: fix the ANativeWindow size/fmt override" 2011-07-11 15:47:20 -07:00
Jamie Gennis
bee205fd58 EGL: fix the ANativeWindow size/fmt override
This change fixes how the Android EGL layer overrides the size and
format of an ANativeWindow in eglCreateWindowSurface.  The new behavior
is to leave the size untouched when overriding the format.  The previous
behavior was to reset the ANativeWindow to use the default size set by
the ANativeWindow implementation.

It also adds two new 'perform' methods to the ANativeWindow interface:
set_buffers_dimensions and set_buffers_format, and redefines the
behavior of set_buffers_geometry to be the combination of these two new
methods.

Additionally, this change adds an error check for the return value of
the new native_window_set_buffers_format call, which required adding a
(stub) handler for to FramebufferNativeWindow.

Change-Id: I805c7ccd8d4730dfb132d10d8bc3fb058a0b9df1
2011-07-11 12:31:45 -07:00
Jeff Brown
e16986cae2 Eliminate single-process mode.
Bug: 5010576

Change-Id: Id450dc83efed4897d1e4ff451530fed14457aace
2011-07-08 19:54:07 -07:00
Glenn Kasten
be3c018f8b Merge "Add Thread::join" 2011-07-06 11:37:53 -07:00
Mathias Agopian
7946e416b6 Merge "return an error code with gralloc buffer allocation failures" 2011-07-06 11:09:55 -07:00
Glenn Kasten
f44c896b09 Merge "Thread ID zero for androidSetThreadSchedulingGroup" 2011-07-05 15:08:31 -07:00
Jeff Brown
2e0b543c09 Workaround apps that make assumptions about pointer ids.
Modified the touch input mapper to assign pointer ids sequentially
starting from 0 instead of using the tracking id or slot index
supplied by the driver.  Applications should not depend on this
ordering but some do.  (sigh)

Bug: 4980884
Change-Id: I0dfeb3ac27c57a7102a13c960c760e2a02eb7669
2011-07-01 19:08:15 -07:00
Mathias Agopian
d9e8c64c3d return an error code with gralloc buffer allocation failures
Change-Id: I471e5d37ea7a42fc8a0f93446ee3b4229da37807
2011-07-01 14:53:49 -07:00
Pannag Sanketi
19e0a8bfe9 Merge "Minor fix in SurfaceTexture" 2011-06-30 18:38:18 -07:00
Pannag Sanketi
292a31a4c2 Minor fix in SurfaceTexture
Change-Id: Ic859715becf3e6d5107bd8beb8c577034d00ec52
2011-06-30 15:41:19 -07:00
Mathias Agopian
e6786c92d7 Merge "SF transactions are now O(1) wrt IPC instead of O(N)." 2011-06-29 16:15:56 -07:00
Mathias Agopian
698c0873cf 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
acfc4829e4 Merge "Add a linear transform library to libutils" 2011-06-29 13:48:39 -07:00
Jason Simmons
c18d4da5e4 Add a linear transform library to libutils
Change-Id: Icdec5a6bebd9d8f24b3f335f8ec8b09a5810a774
2011-06-28 17:43:30 -07:00
Jamie Gennis
67b4cff399 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
bae6579eb2 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
99b49840d3 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
3d8063b02e 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
5728a92e29 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
Grace Kloba
14a0e58074 Add allowSynchronousMode to SurfaceTexture constructor.
Change-Id: I54f30a3c16bbe6b813f3bcd1d389da5627531304
2011-06-23 21:21:47 -07:00
Glenn Kasten
58e012d1e3 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
Glenn Kasten
ce63396eff Thread ID zero for androidSetThreadSchedulingGroup
Already implemented by androidSetThreadPriority but not documented

Change-Id: I85302b17092952065f3f3a4214d8d8abdd465dbd
2011-06-22 17:45:30 -07:00
tedbo
1e7fa9e945 Add method to create a ParcelSurfaceTexture from android.view.Surface.
Change-Id: I05e343ab7e327478f60322af9373574b70c148f5
2011-06-22 16:18:09 -07:00
Jamie Gennis
b36bb97ae3 Merge "SurfaceTexture: fix a NULL ptr dereference." 2011-06-20 15:34:00 -07:00
Jamie Gennis
1c4414091c SurfaceTexture: fix a NULL ptr dereference.
This change adds a NULL check when searching the slot list in
SurfaceTextureClient for the slot corresponding to a buffer being
queued or canceled.

Bug: 4645023
Change-Id: I806cbc1e34da118ea33a83c4f25ce8193ba1c3ad
2011-06-20 14:16:49 -07:00
Kenny Root
111280a8de Use rand() for MinGW
The version of MinGW we use doesn't have nrand48() which is really lame,
but we need to use libutils in the Windows SDK.

Change-Id: If854c03dbf02bc29e79f49e4539f08c2bf057517
2011-06-15 20:55:49 -07:00
Mathias Agopian
7a87ec7115 may fix build on some version of gcc
Change-Id: Ia88787c0432ec84d51fe505fd6a2b6f98ebe8f33
2011-06-14 11:50:22 -07:00
Mathias Agopian
ddc31c3e2b fix RefBase so it retains binary-compatibility with gingerbread
Bug: 4595257
Change-Id: I0d5e10f497e3f39868bff58f6ded510c38b44b12
2011-06-13 18:39:45 -07:00
Mathias Agopian
a67932fe68 unify SurfaceTexture and Surface
Add the concept of synchronous dequeueBuffer in SurfaceTexture
Implement {Surface|SurfaceTextureClient}::setSwapInterval()
Add SurfaceTexture logging
fix onFrameAvailable
2011-06-13 15:51:35 -07:00
Jamie Gennis
ac642349ba Merge "libutils: add a binary blob cache implementation." 2011-06-13 12:32:46 -07:00
Jamie Gennis
72f6af8630 Merge changes I56779420,I044e44e1,Ic5adfa29,Ied541ab8
* changes:
  SurfaceTexture: add some GL->GL tests.
  SurfaceTexture: fix up a comment.
  SurfaceTexture: add getTransformMatrix tests.
  SurfaceTexture: fix a getTransformMatrix crash.
2011-06-13 11:14:57 -07:00
Jamie Gennis
ae468f4341 SurfaceTexture: fix up a comment.
Change-Id: I044e44e17319e08af657a7ec9fa39100876fe862
2011-06-13 10:50:13 -07:00
Jamie Gennis
736aa9573b SurfaceTexture: fix a getTransformMatrix crash.
This change moves the computation of the transform matrix out of
getTransformMatrix and instead performs the computation when
updateTexImage gets called.  This is needed in order for
getTransformMatrix to succeed even if the buffers have been freed (e.g.
by changing the buffer count) because the computation depends upon the
properties of the current GraphicBuffer.

Change-Id: Ied541ab8747b7ad604f862717135f9a16a816be9
Bug: 4490420
2011-06-13 10:50:12 -07:00
Glenn Kasten
c4a0feaaf4 Merge "Remove redundant memory barrier" 2011-06-13 10:30:29 -07:00
Glenn Kasten
d9e1bb76fe Remove redundant memory barrier
pthread_create already includes the necessary memory barriers:
 - parent at pthread_create : pthread_mutex_unlock(start_mutex)
 - child at __thread_entry : pthread_mutex_lock(start_mutex)

Add lock around uses of mThread.

Added comments:
 - uses of mThread require lock
 - androidCreateRawThreadEtc returned ID is not safe for direct use from non-parent threads.

Change-Id: I18cb296b41ddaf64cf127b57aab31154319b5970
2011-06-10 17:07:46 -07:00
Dianne Hackborn
66168d4bb4 resolved conflicts for merge of f51ded0f to master
Change-Id: Ida356524a68aeb2b9b0013dfbb6ab4bd11e616e2
2011-06-10 12:45:36 -07:00
Dianne Hackborn
199512446d am a8d7ea06: am 220cd77d: Merge "Enforce public resource restriction on bag parents." into honeycomb-mr2
* commit 'a8d7ea067cf22baeee2ff0a33e5a8c5a35936942':
  Enforce public resource restriction on bag parents.
2011-06-09 16:06:07 -07:00
Dianne Hackborn
d4bfc93113 Enforce public resource restriction on bag parents.
Need to put some more styles in the SDK to avoid breaking apps.

Also, welcome Android 3.2.

Change-Id: Ia31d07c9b1b91ad868d8630437fdc1b5ae24f37d
2011-06-09 15:27:39 -07:00
Jeff Brown
5d99f17e82 am 61220e88: am bbbab26e: am 2c180499: Merge "Revert velocity damping. Bug: 4364920" into honeycomb-mr2
* commit '61220e880ac4d9d76b7fd50744439e68e929c697':
  Revert velocity damping. Bug: 4364920
2011-06-07 17:52:30 -07:00
Jeff Brown
b7edd04f7a am bbbab26e: am 2c180499: Merge "Revert velocity damping. Bug: 4364920" into honeycomb-mr2
* commit 'bbbab26ebe9bc789ba9abac757895a6c31de7cc5':
  Revert velocity damping. Bug: 4364920
2011-06-06 20:36:49 -07:00
Jeff Brown
1d3a7130f9 Merge "Revert velocity damping. Bug: 4364920" into honeycomb-mr2 2011-06-06 20:32:18 -07:00
Jeff Brown
7ca7ba2064 Revert velocity damping.
Bug: 4364920

Velocity damping proved to be a bad idea because it would
cause a significant ramp in velocity at the beginning of
a gesture, instead of the desired smooth behavior.  Oh well.

Change-Id: Ie631946f47ef2492bd71fbed1ab44bbb39a875a8
2011-06-06 20:23:54 -07:00
Mathias Agopian
f3d939c5e5 merge various SF fixes from gingerbread to honeycomb-mr2 (DO NOT MERGE)
Fix a race that could cause GL commands to be executed from the wrong thread.
  RefBase subclasses can now decide how they want to be destroyed.
  Fix a race in SurfaceFlinger that could cause layers to be leaked forever.
  Fix a race-condtion in SurfaceFlinger that could lead to a crash.

initial cherry-pick:
resolved conflicts for merge of b9783b49 to honeycomb-plus-aosp

Change-Id: I2a335e03fff219e35c18a7b0089b3a11d636576f
2011-06-06 15:14:25 -07:00
Marco Nelissen
0129f1a27f resolved conflicts for merge of b9783b49 to honeycomb-plus-aosp
Change-Id: I1d86ea56b3d1d1b69f6671e5b0df0ca3f0c79643
2011-06-06 09:55:15 -07:00
Jeff Brown
36f49c133e am 56503b8d: am 8186a5f0: am 10c3f367: Merge "Implement pointer acceleration." into honeycomb-mr2
* commit '56503b8ddfe5c82407da32e18061e725f668432d':
  Implement pointer acceleration.
2011-06-03 15:30:33 -07:00
Jeff Brown
576768ca0d am 8186a5f0: am 10c3f367: Merge "Implement pointer acceleration." into honeycomb-mr2
* commit '8186a5f065fac2b82c90cd18d79cd234bc221402':
  Implement pointer acceleration.
2011-06-02 17:33:55 -07:00
Dianne Hackborn
b18d467bbc resolved conflicts for merge of 54cb63e2 to master
Change-Id: I5b741a1781e3f76c03fc1534ffce871117effd10
2011-06-02 16:44:52 -07:00
Dianne Hackborn
dccd089992 am da9837fb: am c058d386: am ff762299: Merge "Small fixes and cleanup of resource config handling." into honeycomb-mr2
* commit 'da9837fb61c8aa53c67921682016d97655332089':
  Small fixes and cleanup of resource config handling.
2011-06-02 16:24:12 -07:00
Jeff Brown
adab620383 Implement pointer acceleration.
Bug: 4124987
Change-Id: I1f31a28f1594c55302ccabe13fe3ca6d2ff71d50
2011-06-02 14:12:05 -07:00