Commit Graph

1621 Commits

Author SHA1 Message Date
Jeff Brown
ec4e0063a1 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
de27227026 Fix regression in CursorWindow.copyStingToBuffer.
Bug: 5332296

Change-Id: Iff9eed786f0a8293b6156f883a66a322ddad5e99
2011-10-07 13:28:18 -07:00
Jeff Brown
cc0bf53f21 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
Dianne Hackborn
7746cc3188 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
5707dbf15d Transfer large bitmaps using ashmem.
Bug: 5224703

Change-Id: If385a66adf4c6179a0bb49c0e6d09a9567e23808
2011-10-03 17:28:13 -07:00
Dianne Hackborn
8938ed2c8e 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
fb1b5a2f33 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
Mathias Agopian
55b81b10aa may fix the build
Change-Id: I065b1e6652f0e800ba5674a6d9aa954c3ac6c790
2011-09-28 17:33:11 -07:00
Jamie Gennis
ed984d9406 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
0857c8f7f1 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
Bart Sears
8acda78034 Revert "Transfer large bitmaps using ashmem. Bug: 5224703"
This reverts commit 56c58f66b97d22fe7e7de1f7d9548bcbe1973029

This CL was causing the browser to crash when adding bookmarks, visiting the bookmarks page, and sharing pages (see bug http://b/issue?id=5369231
2011-09-25 14:30:21 -07:00
Jeff Brown
f4c1088d75 Transfer large bitmaps using ashmem.
Bug: 5224703

Change-Id: Ic7481dd9f173986f085a8bbdcc59bbe9830d7a44
2011-09-23 21:20:47 -07:00
Jamie Gennis
fa28c35c21 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
Mathias Agopian
0450452e8c 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
Jeff Brown
8756f2ec60 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
df9440f62f 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
b74b87c516 Merge "cleanup: fix typos in logs" 2011-09-16 12:58:30 -07:00
Mathias Agopian
06649fece4 cleanup: fix typos in logs
Change-Id: Ib5744564a873ea2b84100174673dc4d3ae109fcf
2011-09-16 11:56:40 -07:00
Andreas Huber
9dbb77d04b Fix androidGetThreadPriority for non-pthread configurations.
related-to-build

Change-Id: Ic865af0865906f96fd615a56a030c8e3adaf13c4
2011-09-16 11:47:13 -07:00
Andreas Huber
1d60b9629c A new API "androidGetThreadPriority"
Change-Id: I6baeead8c70460863343fd557250635fb1e6a170
2011-09-16 09:33:22 -07:00
Jeff Brown
73aaf0d8d2 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
Jeff Brown
137c3c5495 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
Andy McFadden
aefc9cda45 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
7f739ae68c Merge "SurfaceTexture: fix a test deadlock" 2011-09-05 14:51:20 -07:00
Pannag Sanketi
66378c63e6 Error check in queuebuffer in SurfaceTextureClient
In queuebuffer, if the surfacetexture returns an error,
surfacetextureclient should check for that and pass on the error.

Change-Id: Ie6d70e779fac0702f372eb4df5ecb655280875ee
2011-09-02 17:45:50 -07:00
Xia Wang
bc82a96491 Merge "Integreate surfacetexture test into our continuous test framework." 2011-08-31 09:26:34 -07:00
Xia Wang
4c875166c8 Integreate surfacetexture test into our continuous test framework.
Change-Id: Ic481f3a431166851947676d676749543c7afbbf7
2011-08-30 20:07:59 -07:00
Jamie Gennis
e68a52b0a2 SurfaceTexture: fix a test deadlock
This change fixes a test issue that resulted in a deadlock.

Change-Id: I4729e8dd47c8f5fea49bfeff3cea58627ead6d04
Bug: 5174876
2011-08-30 19:06:40 -07:00
Mathias Agopian
41b6aabf35 fix Surface positions are not floats
Added Surface.setPosition(float, float) which allows to set a surface's
position in float.

Bug: 5239859
Change-Id: I903aef4ad5b5999142202fb8ea30fe216d805711
2011-08-30 18:51:54 -07:00
Glenn Kasten
940673f92e Merge "Add C++ thread API androidGetThreadSchedulingGroup" 2011-08-29 14:38:52 -07:00
Mathias Agopian
70e3f81d0f make sure to re-initialize SurfaceTexture to its default state on disconnect
this caused problems where the NavigationBar would disapear or be
drawn in the wrong orientation.

Change-Id: I083c41338db83a4afd14f427caec2f31c180d734
2011-08-25 17:03:30 -07:00
Mathias Agopian
87a96ea9ea Fix an issue where Surface::lock() would never update the output region
this bug was introduced recently. in some situations Surface::lock()
is not able to preserve the content of the back buffer and needs
to tell the caller to redraw everything.

Bug: 5186460
Change-Id: I14e03939ddfc1b7ad2a8b99ad79435314c60e78e
2011-08-23 21:18:36 -07:00
Jamie Gennis
7f7e85898f Merge "SurfaceTexture: fix queues-to-composer" 2011-08-18 14:31:39 -07:00
Jamie Gennis
582270d69d SurfaceTexture: fix queues-to-composer
This change fixes the NATIVE_WINDOW_QUEUES_TO_WINDOW_COMPOSER query of
Surface and SurfaceTextureClient.  Surface now uses the inherited
SurfaceTextureClient implementation of this query.  SurfaceTextureClient
now queries SurfaceFlinger to determine whether buffers that are queued
to its ISurfaceTexture will be sent to SurfaceFlinger (as opposed to
some other process).

Change-Id: Iff187e72f30d454229f07f896b438198978270a8
2011-08-17 18:19:00 -07:00
Mathias Agopian
29b5762efc don't return the current buffer from dequeueBuffer
we were not reseting mCurrentTexture in some situations
which in turn caused dequeueBuffers() return a
"FREE" buffer that was also current.
Very often it was harmless, but it created a race with
updateTexImage() which could cause the following
queueBuffers() to fail.

Bug: 5156325
Change-Id: If15a31dc869117543d220d6e5562c57116cbabdb
2011-08-17 15:49:13 -07:00
Mathias Agopian
3902be629b fix a small race condition when returning the default width/height of a SurfaceTexture
Change-Id: I581bf609505dfb5d4ec5957b2ef2c77df6cfb15f
2011-08-17 12:45:40 -07:00
Mathias Agopian
f9606df42b revert last change to EGLUtils::selectConfigForPixelFormat
EGLUtils::selectConfigForPixelFormat is only used by
command line tests and it simply selects a config
based on the EGL_NATIVE_VISUAL_ID.
2011-08-15 15:25:39 -07:00
Mathias Agopian
cbe527884a fix a memory leak and memory corruption in RefBase
we would leak a weakref_impl if a RefBase was never incWeak()'ed.
there was also a dangling pointer that would cause memory corruption
and double-delete when a custom destroyer was used to delay the
execution of ~RefBase.

it turns out that the custom destroyer feature caused most of the
problems, so it's now gone. The only client was SurfaceFlinger
who now handles things on its own.

RefBase is essentially back its "gingerbread" state, but the
code was slightly cleaned-up.

Bug: 5151207, 5084978
Change-Id: Id6ef1d707f96d96366f75068f77b30e0ce2722a5
2011-08-11 22:33:02 -07:00
Dave Burke
4925ee11f9 Revert "error out when SurfaceTexture APIs are called while not connected"
This reverts commit a04cda9986366ab480ad8008c4d923271b05d78e.

Conflicts:

	include/gui/SurfaceTexture.h
	libs/gui/SurfaceTexture.cpp

Change-Id: Ib655016462c496ee2a27f7cb33a6e8b18cfe684a
2011-08-11 15:13:19 +01:00
Mathias Agopian
3477588d13 Merge "Read leftover parcel data when a parceled Surface is found in the cache." 2011-08-10 19:45:34 -07:00
Mathias Agopian
8e19c2e97e fix a crasher in SurfaceTexture::updateTexImage()
we now make sure to drain the buffer queue on disconnect.
this happens only when in synchrnous mode. in async mode
we clear all buffers except the head of the queue.

for extra safety we also catch the null pointer
in updateTexImage (which should  never happen) and return
an error.

Bug: 5111008

Change-Id: I5174a6ecbb0de641c6510ef56a611cbb4e9e1f59
2011-08-10 17:35:52 -07:00
Mathias Agopian
2560d14ce8 rework dequeueBuffer()'s main loop.
this simplifies the code a bit and also makes sure
we reevaluate mAbandoned and mConnectedApi each time
we come back from waiting on mDequeueCondition

Change-Id: I1f8538b62ad321b51ed79d953b700036daba796d
2011-08-10 17:35:26 -07:00
Mathias Agopian
ef51b99219 error out when SurfaceTexture APIs are called while not connected
- also log a warning when freeAllBuffers is called with a non empty buffer queue
- rename freeAllBuffers to freeAllBuffersLocked

Change-Id: Idb71fdcf233b9ccae62d5a2a7c3c4bad2501d877
2011-08-10 17:33:46 -07:00
Ted Bonkenburg
e5d6eb81e2 Read leftover parcel data when a parceled Surface is found in the cache.
This fixes an issue where the Surface readFromParcel code was leaving
unread parcel data in the case where the Surface was re-used from the
sCachedSurfaces cache. On a cache miss the code is creating a new
Surface from the remainder of the parcel data. On a hit that data was
being left unread, so anything that parcels a Surface followed by
additional arguments may end up reading the wrong values.

Change-Id: I25365159d945c125bd1fcc9f17e39a4f00aece55
2011-08-09 22:45:38 -07:00
Mathias Agopian
2db6f0a40b fix a crasher in dumpsys
Bug: 5141729
Change-Id: Ib104d49c8660621180966be099198fe29c5bebf5
2011-08-09 15:49:26 -07:00
Mathias Agopian
b0c15c9908 free all buffers when ANativeWindow::disconnect is called
Change-Id: Ie06e73e5b44398cda9e99876f78175b5eef765dc
2011-08-08 20:25:45 -07:00
Mathias Agopian
5bfc24515b return correct value from query after connecting a surface
the first time a surface was connected, the values returned
by query NATIVE_WINDOW_DEFAULT_{WIDTH|HEIGHT} and
NATIVE_WINDOW_TRANSFORM_HINT were wrong until a call
to queueBuffer was performed.

Bug: 5137366, 5121607
Change-Id: I7ac6b5b0daa876638f6bed7c20f286a6e6d984f6
2011-08-08 20:25:44 -07:00
Mathias Agopian
af08d8ab6d Merge "improve dumpsys SurfaceFlinger output" 2011-08-08 20:13:16 -07:00
Mathias Agopian
e47498f8f2 add some logs to track a crash in eglCreateImageKHR
Bug: 5111008

Change-Id: I3e7f5b986151e80cbded39e0dec057770da52fc1
2011-08-08 19:36:22 -07:00
Mathias Agopian
ad795baecc improve dumpsys SurfaceFlinger output
we now output the handle and size of all buffers of each layer.

Change-Id: I8d011ee4ae9199f4198bd07bed770ec3bcf02986
2011-08-08 16:02:13 -07:00
Mathias Agopian
97a9884edc Add a 'release' method to the SurfaceTexture public Java API
Bug: 5063618
Change-Id: I689cb0c01c14e597ccfb4eb0972e64fa570bd4e8
2011-08-03 17:23:44 -07:00
Jeff Brown
ecc0e1014f Merge "Refactor input reader to add stylus support. Bug: 5064702" 2011-08-01 17:48:21 -07:00
Mathias Agopian
d05b34a079 Merge "connect/disconnect is now called from our EGL wrapper" 2011-08-01 16:36:02 -07:00
Mathias Agopian
81a6335052 connect/disconnect is now called from our EGL wrapper
the original connect/disconnect hooks are deprecated
and replace by api_connect/api_disconnect. the original
hooks are no no-ops.
api_connect/api_disconnect is now only called from the
android framework.

Bug: 5057915
Change-Id: I8ca64cd1acd6cabf915bf54689ec2e5f6dfa495a
2011-08-01 14:06:20 -07:00
Jamie Gennis
35770345e4 Merge "SurfaceTexture: allow set_buffer_count(2)" 2011-08-01 13:25:03 -07:00
Jeff Brown
5873ce46ad Refactor input reader to add stylus support.
Bug: 5064702

Introduced the concept of an InputListener to further decouple
the InputReader from the InputDispatcher.  The InputListener
exposes just the minimum interface that the InputReader needs
to communicate with the outside world.  The InputReader
passes arguments to the InputListener by reference, which makes
it easy to queue them up.

Consolidated all of the InputReader locks into one simple global
Mutex.  The reason this wasn't done before was due to potential
re-entrance in outbound calls to the InputDispatcher.  To fix this,
the InputReader now queues up all of the events it wants to send
using a QueuedInputListener, then flushes them outside of the
critical section after all of the event processing is finished.
Removing all of the InputMapper locks greatly simplifies the
implementation.

Added tests for new stylus features such as buttons, tool types,
and hovering.

Added some helpers to BitSet32 to handle common code patterns
like finding the first marked bit and clearing it.

Fixed a bug in VelocityTracker where the wrong pointer trace
could get cleared when handling ACTION_POINTER_DOWN.  Oops.

Changed PointerCoords so it no longer stores useless zero
axis values.  Removed editAxisValue because it is not very
useful when all zero value axes are absent and therefore
cannot be edited in place.

Added dispatch of stylus hover events.

Added support for distance and tool types.

Change-Id: I4cf14d134fcb1db7d10be5f2af7b37deef8f8468
2011-07-31 15:38:09 -07:00
Jamie Gennis
1c121f68fc SurfaceTexture: allow set_buffer_count(2)
This change relaxes an error check in SurfaceTexture::setBufferCount to
allow clients to explicitly set a buffer count of 2.  The clients that
will do this are camera and video decode.  Previously it was thought
that for those clients we would always use async mode, which requires a
minimum of 3 buffers.  However, we now believe that for some devices it
may make sense to use synchronous mode (with 2 buffers) to reduce memory
usage.

Bug: 5088418
Change-Id: I620a0ef75075745be9d6c8219e0246aaf33ba950
2011-07-30 16:00:11 -07:00
Mathias Agopian
a947de88e7 improve GraphicAllocator dump method
GraphicAllocator debugging cannot deal with
custom HAL formats. make this more obvious in the
log.

Change-Id: I202e58a7f213f32e725aa4eac62cdf6e50ca5894
2011-07-29 16:35:41 -07:00
Ying Wang
e993c420d0 Merge "Fix uses of all-subdir-makefiles" 2011-07-27 18:29:26 -07:00
Ying Wang
0a1fdd7d50 Fix uses of all-subdir-makefiles
We should use all-makefiles-under instead.
all-subdir-makefiles can be used only before any "include" statement.
Before this change, both subdirs were actually not included.

Change-Id: I6bf35d07f294a5012c9322096f999ac26e37432f
2011-07-27 16:59:08 -07:00
Kenny Root
b313559b21 Merge "Move extract native libraries to JNI code" 2011-07-27 15:54:51 -07:00
Mathias Agopian
96e108271b Merge "remove dead code and member variables." 2011-07-26 12:08:07 -07:00
Kenny Root
49a65e5526 Move extract native libraries to JNI code
The built-in ZipFile class was quite a long time to find an unpack
libraries. Move everything to using the libutils ZipFileRO class that
goes quite a bit faster. Initial measurements are 6 times faster than
the Java code.

Also, read files off the disk and compare their CRC against the APK's
CRC to see if we need to write the new file to disk. This also cuts down
the bootup time by up to a second per APK that has native files.

Change-Id: Ic464a7969a17368fb6a6b81d026888c4136c7603
2011-07-26 10:14:58 -07:00
Mathias Agopian
3fbce7c560 remove dead code and member variables.
also fix some comments and improve debugging logs.

Change-Id: I83e55309f306332b59e1ec46104c4a7fffbf3c97
2011-07-25 20:03:43 -07:00
Kenny Root
395dcd07f1 am 64ed1059: am e612c881: am 4f3a8db6: am 3cf03987: Merge "Continue idmap generation even if name lookup fails."
* commit '64ed105957098a900d58e7c2598e060cb37755ce':
  Continue idmap generation even if name lookup fails.
2011-07-25 17:24:52 -07:00
Kenny Root
66a2eec564 am e612c881: am 4f3a8db6: am 3cf03987: Merge "Continue idmap generation even if name lookup fails."
* commit 'e612c881ecf74770098aa9c07d4f0611ac982038':
  Continue idmap generation even if name lookup fails.
2011-07-25 12:21:06 -07:00
Jamie Gennis
fa1e002cec Merge "SurfaceTexture: enable RGB external textures" 2011-07-25 11:46:51 -07:00
Ted Bonkenburg
8d14330bd7 Merge "Add support for creating a Surface from a a SurfaceTexture." 2011-07-25 10:24:30 -07:00
Ted Bonkenburg
bd050ab2af Add support for creating a Surface from a a SurfaceTexture.
The Surface is already using SurfaceTexture internally and it is parcelable. This
is intended to replace and phase out ParcelSurfaceTexture in favor of creating a
new Surface.java object from an existing SurfaceTexture.

Change-Id: I8e2dd86614523da6abed6403e1d705a68fa19fdf
2011-07-22 16:36:44 -07:00
Jamie Gennis
1f8e09f40d SurfaceTexture: enable RGB external textures
This change removes support for conditionally using the GL_TEXTURE_2D
target for SurfaceTexture textures with RGB buffers.  It also enables
and fixes the RGB-based SurfaceTexture tests.

Change-Id: I9a251a981cf66af6b048b2e4c3fe7231e4774f4d
2011-07-22 15:45:18 -07:00
Jamie Gennis
7b305fffc3 SurfaceTexture: add the abandon method.
This change adds the 'abandon' method to the SurfaceTexture C++ class.
This method may be used to put the SurfaceTexture in an abandoned state,
causing all ISurfaceTexture methods to fail.

Change-Id: Ibd261f7b73f44e2bec36a8508bf92113cfb7cf95
2011-07-22 14:20:41 -07:00
Jamie Gennis
6e50219aee SurfaceTexture: add a deadlock scenario test
This change adds a test to ensure that a GL driver that's blocking on a
call to dequeueBuffer does not block other GL threads from rendering and
queueing buffers.

Change-Id: Ifdd234effc534b6a9cf8522ca87f64da5bb0bbd6
2011-07-22 14:03:31 -07:00
Jamie Gennis
1259e9d6ac Merge changes I799532f7,I5cffa6eb
* changes:
  SurfaceTexture: fix a comment
  SurfaceTexture: remove getAllocator
2011-07-22 13:34:57 -07:00
Mathias Agopian
bb66c9b5a9 Fix a few issues with NATIVE_WINDOW_TRANSFORM_HINT
- fixed uninitialized variable
- set hint to indentity when transform is too complex
- make sure FrameBufferNativeWindow doesn't fail on needed perform commands

Bug: 4487161
Change-Id: I7cb2b0869b72404732eca7cb2d145ff669e2ed9b
2011-07-21 14:50:29 -07:00
Jamie Gennis
976f494d53 SurfaceTexture: remove getAllocator
This change removes the SurfaceTexture::getAllocator method, as it's no
longer needed.  Proper refcounting of the Gralloc buffers is now handled
by the IGraphicBufferAlloc binder marshalling code.

Change-Id: I5cffa6ebfc1bc5828fb7ce0e0a5b2f55cd8479da
2011-07-21 14:32:56 -07:00
Kenny Root
2cc4e531f0 am 3cf03987: Merge "Continue idmap generation even if name lookup fails."
* commit '3cf039876177b5b314b635bb12a1dae1b42f4605':
  Continue idmap generation even if name lookup fails.
2011-07-21 13:09:05 -07:00
Kenny Root
c0e7a06170 Merge "Continue idmap generation even if name lookup fails." 2011-07-21 13:05:03 -07:00
Mathias Agopian
aa5e671921 Merge "clean-up. get rid ofunused code and members in Surface[Control].cpp" 2011-07-20 18:52:51 -07:00
Mathias Agopian
c10d9d90b2 clean-up. get rid ofunused code and members in Surface[Control].cpp
Change-Id: Ia7790ae28af2c2ac99eae01c2c5044ace4a490a4
2011-07-20 16:53:13 -07:00
Jeff Brown
585ef1e14a Remove unimplemented memory pool.
dlmalloc does such a great job that we don't need a pool anyways.

Change-Id: I105b28c4a5c491543959190c7c0a9de75a5b8052
2011-07-20 15:19:50 -07:00
Mathias Agopian
97c602c5af implement: "Add an ANativeWindow API for SurfaceFlinger to suggest an optimal buffer orientation"
Bug: 4487161
Change-Id: I883f34efe542c2a566d04966f873374f40c50092
2011-07-19 15:24:46 -07:00
Mathias Agopian
933389f758 use SurfaceTexture new scaling mode in SF
SF now obeys SurfaceTexture's scaling mode instead
of inferring it from the buffer's size

Change-Id: I4d50e9851abedd7e64bfcfc8af9eefb9fb668529
2011-07-19 13:05:12 -07:00
Mathias Agopian
7734ebfe47 Add set_scaling_mode() to ANativeWindow.
This allows to specify the scaling mode independently from
the buffer size.

Change-Id: Iaa2baa660445531a97d3fac192e580f4929c5d3b
2011-07-19 13:05:11 -07:00
Jamie Gennis
a2f3b90d98 Merge "SurfaceTexture: add a multi-SurfaceTexture test" 2011-07-18 15:00:54 -07:00
Mathias Agopian
8f9dbf9e13 move lock/unlock implementaion outside of Surface into SurfaceTextureClient
This makes ANativeWindow_lock/ANativeWindow_unlockAndPost work
with ANativeWindows implemented by Surface and SurfaceTextureClient.

Also, Surface now inherits directly from SurfaceTextureClient.

Bug: 5003724
Change-Id: I9f285877c7bae9a262e9a7af91c2bae78804b2ef
2011-07-15 17:47:08 -07:00
Jamie Gennis
0b7c4953a1 Merge "SurfaceTexture: fix SurfaceTextureGLToGLTest" 2011-07-15 12:35:34 -07:00
Jeff Brown
ce071667d0 Merge "Add a call to pthread_attr_destroy to avoid potential memory leaks." 2011-07-14 22:31:27 -07:00
Mathias Agopian
2773004a83 fix a typo in ISurfaceTexture IPC code
Change-Id: Ied1d9ddb0d849b17219d0ea3d333ce12be849419
2011-07-14 20:20:58 -07:00
Le-Chun Wu
3919950de8 Add a call to pthread_attr_destroy to avoid potential memory leaks.
Change-Id: Ib57efc3530e9793298190cc9cab19c9af54e11a7
2011-07-14 20:14:07 -07:00
Jamie Gennis
677517ae3f Merge changes Id9aa1003,I8c154189
* changes:
  SurfaceTexture: make (dis)connect into an IPC
  SurfaceTexture: add support for new connect values
2011-07-14 17:54:27 -07:00
Jamie Gennis
fe0a87b546 SurfaceTexture: make (dis)connect into an IPC
This change makes the ANativeWindow connect and disconnect calls result
in an IPC to the SurfaceTexture object.  This will allow us to prevent
multiple simultaneous connections from different processes.

Change-Id: Id9aa1003b1335b96ca6bd4a1f5a67aa433d42efb
2011-07-14 17:48:32 -07:00
Jamie Gennis
2640bfd168 SurfaceTexture: fix SurfaceTextureGLToGLTest
This change fixes a couple different issues in the
SurfaceTextureGLToGLTest test fixture:
  - incorrect use of conditions
  - move logging after the locks are acquired
  - call the parent class's TearDown method
  - clean up the SurfaceTexture before eglTerminate gets called

Change-Id: I6960e5ab7f144225f01a2089d3f849c99fed0b38
2011-07-14 17:11:47 -07:00
Jamie Gennis
3e646d62e5 SurfaceTexture: add support for new connect values
This change adds support to SurfaceTextureClient for the new enum values
that can be passed to the ANativeWindow connect call.

Change-Id: I8c15418909e43a15673a9b22a5eb40df6923b273
2011-07-14 15:03:33 -07:00
Jeff Brown
c105333997 Minor code cleanups in vector.
Fixed a potential bug where calling replaceAt with a reference to
an existing element in the vector at the same index would cause
the element to be destroyed while being copied to itself.

Refactored the conditions in _grow and _shrink for clarity.
The computations are exactly the same but I think it reads better
this way.  In particular, the ssize_t variable 's' is gone: it didn't
need to be signed anyways because its value could never be negative.

Change-Id: If087841c15e6a87160eee874720c4a77eb0e99a6
2011-07-14 04:11:23 -07:00
Jeff Brown
686f62fcaf Replace Vector _grow/_shrink checks with assert.
On review of the code, _grow and _shrink are checking for conditions
that cannot happen and that don't even really make sense.  For
example, if _shrink is called with where + amount > mCount then
this is really bad, however the check only considered the case
when where >= mCount and then it would arbitrarily choose a new
value for where.  Huh?

As it happens, the callers are correctly validating the
arguments before passing them down to these methods so we can
get rid of this code.

Change-Id: I921852dba8997065bb0e9cac733e82028d14afcd
2011-07-14 04:11:22 -07:00
Jeff Brown
8a1d693e59 Provide more descriptive name for InputChannel ashmem.
Change-Id: I4307de9f717ac4810b1b91ee0c1a3899325acf71
2011-07-13 22:27:37 -07:00
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
Christopher Tate
a100c02b8d Compress the backup output stream
Zlib compression, with a full flush between each application's
data.  Encryption will be performed on the already-compressed data
once that's implemented.

On restore, the streamed data is similarly uncompressed on the fly.

Change-Id: I19b65c88e759a66527d10913d18fffa9df0bc011
2011-07-13 15:30:41 -07:00
Jeff Brown
7175398247 Merge "Remove the simulator target from all makefiles. Bug: 5010576" 2011-07-12 12:15:07 -07:00
Jeff Brown
baa44b89ec Remove the simulator target from all makefiles.
Bug: 5010576

Change-Id: I04d722f258951a3078fe07899f5bbe8aac02a8e8
2011-07-11 22:12:16 -07:00