Commit Graph

24 Commits

Author SHA1 Message Date
Jamie Gennis
695e331f01 BufferQueue: check before tracing buffer index
This change adds a check on ATRACE_ENABLED before calling snprintf to trace the
buffer index.

Change-Id: Id79430f9c69706393efd3d10780a4cc97055e9e0
2012-04-16 20:36:25 -07:00
Mathias Agopian
172a62a224 make sure to pass the transform-hint on ANW.connect
this optimization was probably lost during ST refactoring.

Change-Id: I845978c4b718cb91941d15b30484837f19714abe
2012-04-16 00:08:26 -07:00
Mathias Agopian
b364be8e55 fix a typo causing pre-rotation to never work
Change-Id: I8d698ec52d53ef1a553b887c7329413e1f49cc72
2012-04-12 19:40:28 -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
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
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
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
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
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
Dave Burke
74ff8c23f4 attempt to fix a deadlock in SurfaceTextureClient::disconnect
- condition wasn't signaled if an error happened between acquire and release
- also replace signal with broadcasts

Bug: 6109450
Change-Id: I8ac03c7eca35c9cc04a00ef7fad36bb9cb3fcef6
2012-03-12 21:49:41 -07:00
Daniel Lam
c2c1f2f24c BufferQueue: fixed issues with buffer slots not available
Bug: 6120953
Change-Id: I61d97d650c8dee0a6d7c19f2f50aa92a5f159095
2012-03-08 23:40:56 -08:00
Mathias Agopian
757507e3a0 Merge "Add ATRACEs for Buffer indices" 2012-03-05 19:41:29 -08:00
Daniel Lam
3fcee50ffa BufferQueue: fixed acquire operation
Bug: 6082872
Change-Id: I897dc61eb84fed953e51f97871cd3ae6321505d4
2012-03-02 11:30:56 -08:00
Mathias Agopian
546ed2d7d9 Add ATRACEs for Buffer indices
Change-Id: I44d7a9a9bf03f418cab2a4854583aac9e533daee
2012-03-01 22:20:24 -08:00
Jamie Gennis
1c8e95cf86 Add tracing to various graphics components.
This change adds ATRACE call tracing to BufferQueue,
SurfaceTextureClient, SurfaceTexture, SurfaceFlinger, Layer, and EGL.

Change-Id: I9d75ed26f5a3f0d1af635da38289520134cfbbb7
2012-02-27 17:50:35 -08:00
Daniel Lam
eae59d2ea7 Removed dependecies between BufferQueue and SurfaceTexture
Refactored SurfaceTexture and BufferQueue such that share
no protected members.  Created an consumer facing interface
for BufferQueue in preparation of connecting SurfaceTexture
and BufferQueue through a binder.

Change-Id: I938e63e085128148c58d0e26c7213b30145c109f
2012-02-27 16:40:48 -08:00
Jamie Gennis
fbb1655916 Merge "Revert "Removed dependecies between BufferQueue and SurfaceTexture"" 2012-02-27 13:23:51 -08:00
Mathias Agopian
90ac799241 fix libgui header location
Change-Id: Iec71706cdd4f29c6904993648ce873e83ef9cafe
2012-02-27 13:03:08 -08:00
Daniel Lam
9b10c47e11 Revert "Removed dependecies between BufferQueue and SurfaceTexture"
This reverts commit a631399f71dbc7659d2f241968f85d337726ae61
2012-02-27 11:32:06 -08:00
Daniel Lam
3330238841 Removed dependecies between BufferQueue and SurfaceTexture
Refactored SurfaceTexture and BufferQueue such that share
no protected members.  Created an consumer facing interface
for BufferQueue in preparation of connecting SurfaceTexture
and BufferQueue through a binder.

Change-Id: Iff55e740e36a7f70c9f7a17ee7a5af38e3d21f0f
2012-02-22 20:12:27 -08:00
Daniel Lam
b856052c00 Refactored query function from SurfaceTexture into BufferQueue
Change-Id: Id1cb6cc38d01edb4fcfcad867c5a7693bdcc3ab1
2012-02-09 16:16:51 -08:00
Daniel Lam
6b091c5300 Refactored ISurfaceTexture calls from SurfaceTexture into BufferQueue.
Change-Id: I514f6b802f6b49c9ae27bed37bf0b9d23da03c9a
2012-02-07 13:57:01 -08:00