3643 Commits

Author SHA1 Message Date
Mathias Agopian
becc91d6b0 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
Romain Guy
6816972eb6 Don't use bilinear filtering on unscaled bitmaps
Bug #5198590

Change-Id: I4333d850501ac849eeeeb247e4178dd469b9de3d
2011-08-22 17:33:33 -07:00
Romain Guy
28d8ff6dbc Move constants to the correct header
Change-Id: Id4bd14f72487bd7156cd2e1930eaf97b47896273
2011-08-22 14:01:34 -07:00
Stephen Hines
c3ccfb8eec Merge "Issue proper parameters to root() calls for RS." 2011-08-19 14:17:47 -07:00
Stephen Hines
1222393e35 Issue proper parameters to root() calls for RS.
BUG=5076887

Change-Id: Ic0ce9d45ee20a99add4c780233c0804d05a55e96
2011-08-19 12:27:07 -07:00
Jason Sams
00c0dcb846 Merge "Fix issue with freeing allocation with circular references." 2011-08-19 11:23:46 -07:00
Jason Sams
777ec2662e Fix issue with freeing allocation with circular references.
Change-Id: I45871c20a192815eafee77f95e17a025f6dcf9d1
2011-08-18 18:01:33 -07:00
Jamie Gennis
c8f4c6a5d0 Merge "SurfaceTexture: fix queues-to-composer" 2011-08-18 14:31:39 -07:00
Wu-cheng Li
fde00591c6 Merge "Add new camera focus mode FOCUS_MODE_CONTINUOUS_PICTURE." 2011-08-17 22:24:53 -07:00
Jamie Gennis
9b8fc65b03 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
Jason Sams
24b3522428 Merge "Fix "return 0" behavior in rs 0 was not properly blocking for the next message." 2011-08-17 17:23:16 -07:00
Jason Sams
85deb78165 Fix "return 0" behavior in rs
0 was not properly blocking for the next message.

Change-Id: I0d9f0a8f799ba457197920c6a699f80f496eaa8e
2011-08-17 17:15:23 -07:00
Mathias Agopian
c395530de8 Merge "don't return the current buffer from dequeueBuffer" 2011-08-17 16:45:35 -07:00
Mathias Agopian
656f9b6a1c Merge "fix a small race condition when returning the default width/height of a SurfaceTexture" 2011-08-17 16:45:23 -07:00
Mathias Agopian
8618ebcc5d 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
Jason Sams
c1b4c1ff9b Add structure to pack params for forEach.
This allows the driver to not pass all the sub-params.

Change-Id: I9728a7bb39893f49193a55155994ede0400cb7a6
2011-08-17 14:13:50 -07:00
Alex Sakhartchouk
4270295ae8 Merge "Fixing asynchronous performance issues." 2011-08-17 13:29:24 -07:00
Mathias Agopian
1a227437be 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
Wu-cheng Li
b9ac75d3df Add new camera focus mode FOCUS_MODE_CONTINUOUS_PICTURE.
The API is still hidden.

bug:5086125
Change-Id: I69268a95ad6aae249771d3a8dfb423ffe2d87081
2011-08-18 00:15:40 +08:00
Romain Guy
2ce81fcd7d Merge "Add an API to set the transform on a TextureView's surface texture. Bug #5156689" 2011-08-16 13:56:38 -07:00
Romain Guy
302a9df1d5 Add an API to set the transform on a TextureView's surface texture.
Bug #5156689

Change-Id: I635a625885c9b832a60d44ece0de7613ceb84109
2011-08-16 13:55:02 -07:00
Alex Sakhartchouk
117abdbc67 Fixing asynchronous performance issues.
Change-Id: I10f02cd37a33a6c655814d24e0a4291dc044fba3
2011-08-16 13:09:46 -07:00
Mathias Agopian
47b2129350 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
Alex Sakhartchouk
c929158f0e Merge "Fix to the memory leak problem." 2011-08-12 15:29:46 -07:00
Jason Sams
f5af42933d Merge "Fix the RS frame timeout. Previous a slow app would block from receiving new commands until the timer expired. This change will expire the timer immediatly." 2011-08-12 15:16:39 -07:00
Jason Sams
bfc7891bdd Fix the RS frame timeout.
Previous a slow app would block from receiving new
commands until the timer expired.  This change will
expire the timer immediatly.

Change-Id: I42b949d21f98ee0f1d3156763cd723c3e9cabb67
2011-08-12 15:05:15 -07:00
Romain Guy
e52531121d Merge "Make sure we correctly copy caches keys. Bug #5136067" 2011-08-12 14:35:27 -07:00
Romain Guy
e5df231434 Make sure we correctly copy caches keys.
Bug #5136067

Change-Id: I366e840bef44415436dc7b13d89cfb610feed663
2011-08-12 14:23:53 -07:00
Mathias Agopian
6e97ed2127 Merge "fix a memory leak and memory corruption in RefBase" 2011-08-12 12:23:54 -07:00
Alex Sakhartchouk
065fa8deb1 Fix to the memory leak problem.
Change-Id: I18dfa76ecae62ed5165415531adf3a13ad992b54
2011-08-12 11:30:30 -07:00
Justin Ho
1213697980 Merge "Replacing sans serif system font with Roboto" 2011-08-12 07:25:47 -07:00
Mathias Agopian
6fe2481392 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
Romain Guy
03f156e96f Merge "Remove unnecessary private API" 2011-08-11 17:51:23 -07:00
Romain Guy
9d865512f1 Remove unnecessary private API
Change-Id: I2ecb367528ec0691c07153a3d163b82a6ca33fdf
2011-08-11 17:37:02 -07:00
Christian Robertson
beb2b5cfdb Replacing sans serif system font with Roboto
Change-Id: Ibe0aa11e2259898e65dc422c7794ab4065a0a90e
2011-08-11 15:35:52 -07:00
Dave Burke
4982b6918a 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
246ae5011c Merge "Read leftover parcel data when a parceled Surface is found in the cache." 2011-08-10 19:45:34 -07:00
Mathias Agopian
5c71575983 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
71fd1213b4 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
a04cda9986 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
3f945fa5ef 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
4954193651 fix a crasher in dumpsys
Bug: 5141729
Change-Id: Ib104d49c8660621180966be099198fe29c5bebf5
2011-08-09 15:49:26 -07:00
Mathias Agopian
f6d08b9528 Merge changes Ie06e73e5,I7ac6b5b0
* changes:
  free all buffers when ANativeWindow::disconnect is called
  return correct value from query after connecting a surface
2011-08-09 15:23:19 -07:00
Alex Sakhartchouk
9ce7c0971d Merge "add renderscript doc comments for exposed headers" 2011-08-09 14:13:09 -07:00
Stephen Hines
9940c60af4 Merge "Start refactoring RS headerfiles for docs." 2011-08-09 14:00:51 -07:00
Alex Sakhartchouk
6b2b8bdb28 add renderscript doc comments for exposed headers
Change-Id: Ia7dd82f890775045e543963d64e6dcd3ea4db825
2011-08-09 11:36:19 -07:00
Jason Sams
573fa62074 Start refactoring RS headerfiles for docs.
Change-Id: Ieb7797601f94beec2835e1d936dc2dd0c38cb48c
2011-08-09 11:34:33 -07:00
Mathias Agopian
43a3d91dff free all buffers when ANativeWindow::disconnect is called
Change-Id: Ie06e73e5b44398cda9e99876f78175b5eef765dc
2011-08-08 20:25:45 -07:00
Mathias Agopian
053b02df2d 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
fc4ba11415 Merge "improve dumpsys SurfaceFlinger output" 2011-08-08 20:13:16 -07:00