Commit Graph

189 Commits

Author SHA1 Message Date
Steve Block
252778f3ef Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF)
Change-Id: I8fbdfa7a7581f481968dbb65aa40f7042936d7cb
2012-01-19 14:44:59 -08:00
Steve Block
5b11920b1a Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF)
Change-Id: I26f76452ac49e2890b14d133c065493d8df0fb4a
2012-01-19 14:44:56 -08:00
Steve Block
a6c2fd5ac1 Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF)
Change-Id: I44f267700356967dc51e8f85ebf457dc85cfb229
2012-01-19 14:44:50 -08:00
Steve Block
1888a81fb7 Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF)
Change-Id: I5321ebd12e9c6248a108529e82c4e1af2a4405e3
2012-01-19 14:44:31 -08:00
Jamie Gennis
988637e559 SurfaceTexture: fix a verbose-log compile error
Change-Id: I045231207e068d950bb0cb5085717af5d9454ed1
2011-12-09 15:07:44 -08:00
Jamie Gennis
86edf4f647 SurfaceTexture: add EGL_KHR_fence_sync option
This change adds a compile-time option for SurfaceTexture to use the
EGL_KHR_fence_sync extension to synchronize access to Gralloc buffers.

Bug: 5122031
Change-Id: I7e973a358631fff5308acf377581b811911fe790
2011-11-29 17:09:01 -08:00
Jamie Gennis
fe27e2f468 SurfaceTexture: add a blit-to-FBO test
This change adds a test for blitting (via GL rendering) from a
SurfaceTexture to an FBO.

Change-Id: Ib3386fcc3f37153277f3e37a26347441bb80ab58
2011-11-29 14:52:36 -08:00
Mathias Agopian
7723773df3 Merge "don't report an error when disconnecting from an abandoned surfacetexture" into ics-mr1 2011-11-21 17:57:31 -08:00
Mathias Agopian
75cf5a7480 Merge "enable ALLOW_DEQUEUE_CURRENT_BUFFER for tegra devices" into ics-mr1 2011-11-21 17:57:20 -08:00
Jamie Gennis
e3603d7d09 SurfaceTexture: fix a couple tests
This change fixes some robustness issues with the
EglDestroySurfaceUnrefsBuffers and
EglDestroySurfaceAfterAbandonUnrefsBuffers tests.  The tests previously
depended upon GL implementation details that should not have been relied
upon.

Change-Id: I37fd43b56568efe1dbe69d85e892be8a1cf44d20
2011-11-21 14:38:15 -08:00
Jamie Gennis
59769469e4 EGL: default to swap interval 1
This change explicitly sets swap interval 1 on the window when an
EGLSurface is created to render to it.

Change-Id: I91eb29dbee3ae4a55076b921f084d503fbe94e03
2011-11-21 14:37:29 -08:00
Jamie Gennis
6f4cdfe0db SurfaceTexture: clean up some tests
This change cleans a few things up in the SurfaceTexture tests:
- Wraps a few long lines.
- Refactors the multithreading portions of SurfaceTextureGLToGLTest into
  a new test fixture called SurfaceTextureGLThreadToGLTest.
- Changes some of the tests that were creating their own EGLSurface to
  use the SurfaceTextureGLToGLTest fixture.
- Reorders the test functions so that they are immediately below to the
  test fixture that they use.

Change-Id: I0491ce3528a7ff2b4f1e83602ba290269c087297
2011-11-21 11:52:02 -08:00
Mathias Agopian
8b8a004148 don't report an error when disconnecting from an abandoned surfacetexture
this happens often with CPU Surfaces, which disconnect long
after their surfacetexture has been abandoned.

Change-Id: If49da03b72f99130e01b2b9bcbd444bb38f7ed4e
2011-11-18 14:32:35 -08:00
Mathias Agopian
7c6eba6669 enable ALLOW_DEQUEUE_CURRENT_BUFFER for tegra devices
this flag should be enabled for all targets, but currently
some have issues with it, so we're turning it on only for
tested targets.

this will hopefully resolve some performance issues.

Bug: 5553562, 5631630
Change-Id: I54c7a9e2068586898ab13e405d95534669260537
2011-11-18 13:50:35 -08:00
Mathias Agopian
6285c6cf10 Merge "attempt to fix bug 5313580" into ics-mr1 2011-11-18 12:11:15 -08:00
Mathias Agopian
a36bcd53ac attempt to fix bug 5313580
the working theory here is that a Surface object has become non-promotable
because it lost its last reference; later Surface::readFromParcel is called
the previous surface is found in the cache, but can't be promoted. this causes
a new Surface object to be created which will promptly try to connect to the
CPU_API -- this in turn will fail because the previous (now dead) surface is
still connected.

To fix this, we make sure to disconnect from the SurfaceTexture when
Surface[TextureClient] is destroyed.

Change-Id: I422234868a05d7b7d283e9d5a85f7ab79e65d8a9
2011-11-17 18:46:09 -08:00
Jamie Gennis
e984dd11c1 Merge "SurfaceTexture: fix a bug with buffer reallocation" into ics-mr1 2011-11-17 17:10:47 -08:00
Jamie Gennis
aaa3ecff4b SurfaceTexture: fix a bug with buffer reallocation
This change fixes an issue involving buffer reallocation and the
ALLOW_DEQUEUE_CURRENT_BUFFER mode in SurfaceTexture.  The bug happened
when the buffer slot currently attached to the GL texture was selected
for dequeuing, but the dequeue operation caused the buffer to be
reallocated.  Because the buffer is new, the image producer could fill
the buffer and queue it before an updateTexImage call, which would
result in the "slot %d is current" error in queueBuffer.

Bug: 5631630
Change-Id: Icdd8bc5cad3c7db43953446d9be2603aaea11a8d
2011-11-17 16:00:44 -08:00
Mathias Agopian
c554d2b8ad Merge "Revert "enable ALLOW_DEQUEUE_CURRENT_BUFFER for tegra devices"" into ics-mr1 2011-11-16 16:13:38 -08:00
Mathias Agopian
c21180ee67 Revert "enable ALLOW_DEQUEUE_CURRENT_BUFFER for tegra devices"
This reverts commit e7758be6da85728df6b4215f413660c67c5a9740.

Seemed to cause failures un SurfaceTexture.

Bug: 5627450
2011-11-16 15:59:13 -08:00
Jamie Gennis
c1ef3c4d7d Merge "SurfaceTexture: Fix to return the oldest of free buffers to Client on Dequeue call" into ics-mr1 2011-11-16 11:34:30 -08:00
Sunita Nadampalli
a929748ddb SurfaceTexture: Fix to return the oldest of free buffers to Client on Dequeue call
Surface Texture dequeue logic is modified to return the oldest of the
free buffers to Client on dequeue call.

Currently dequeue method is returning the first buffer index which is free.
The parsing is done in ascending order of the buffer slot indices.
This leads to returning the buffer which has been just queued to composer,
and hence display, and this defeats the purpose of having minimum dequeue count
as 2 in asynchrnouse mode.

This is fixed by checking all the free slots and returning the oldest buffer.

Change-Id: Ibbac10593c3994c278c601af0480b171635ecdd4
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
2011-11-15 11:43:35 -08:00
Mathias Agopian
251ce852cc enable ALLOW_DEQUEUE_CURRENT_BUFFER for tegra devices
this flag should be enabled for all targets, but currently
some have issues with it, so we're turning it on only for
tested targets.

this will hopefully resolve some performance issues.

Bug: 5553562
Change-Id: I939992b4cd0debea980dec0127c72be2dff33af8
2011-11-14 19:17:37 -08:00
Mathias Agopian
194c76c047 Define, document, and test the behavior of very large SurfaceTextures
updateTexImage() now throws a runtime exception when its native
counterpart fails

Bug: 5506633

Change-Id: I151a6f685d465966e7df4df624412ab2da62e95f
2011-11-11 18:44:35 -08:00
Jamie Gennis
6ee96ad6a3 SurfaceTexture: various logging improvements
Change-Id: I1f7216276547a1e9f9343c88c6cc1c24efcdcdbc
2011-11-01 15:48:42 -07:00
Jesse Hall
83d3fa10d5 Merge "SurfaceTexture: add tests for buffer leaks" 2011-10-20 09:09:31 -07:00
Jamie Gennis
79e3125d56 SurfaceTexture: add tests for buffer leaks
This change adds two tests to ensure that eglDestroySurface does not
cause Gralloc buffers to be leaked.

Bug: 5472838
Change-Id: Id675d74e34b6479f2d68314d40de94aede69f142
2011-10-19 15:19:19 -07:00
Jamie Gennis
baf0e06dea am 827d069a: Merge "SurfaceTexture: free buffers when disconnect fails" into ics-mr0
* commit '827d069afb297b6d96c995c03da9d4ee17e60679':
  SurfaceTexture: free buffers when disconnect fails
2011-10-19 11:08:11 -07:00
Jamie Gennis
13c5ca3b55 SurfaceTexture: free buffers when disconnect fails
This change makes SurfaceTextureClient free its references to all the
buffers even when the disconnect binder call to the SurfaceTexture
fails.

Bug: 5384823
Change-Id: Iad787fbae5fda4769546fd52276e4e4030c62be6
2011-10-18 17:14:33 -07:00
Mathias Agopian
7731f4eb63 am 9a0732af: Merge "SensorManager reconnects to sensor service when the later dies" into ics-mr0
* commit '9a0732af1bd96a7d8247dee124a7da389137a52f':
  SensorManager reconnects to sensor service when the later dies
2011-10-17 15:52:31 -07:00
Mathias Agopian
0ee55fd4e5 Merge "SensorManager reconnects to sensor service when the later dies" into ics-mr0 2011-10-17 15:50:36 -07:00
Jamie Gennis
31218730d4 am 3a735078: Merge "SurfaceTexture: report binder transaction failures" into ics-mr0
* commit '3a73507801b56da83140fad14a1a3d4eced213d9':
  SurfaceTexture: report binder transaction failures
2011-10-17 11:35:53 -07:00
Mathias Agopian
2532077bb6 am fefffc68: Merge "add logging and defensive code when initializing sensors" into ics-mr0
* commit 'fefffc685ab703b44f6e32b5ec45292b22d370a3':
  add logging and defensive code when initializing sensors
2011-10-17 11:32:15 -07:00
Jamie Gennis
8e42e48f4e Merge "SurfaceTexture: report binder transaction failures" into ics-mr0 2011-10-17 11:25:46 -07:00
Mathias Agopian
1a2b83a17d SensorManager reconnects to sensor service when the later dies
if system process ever restarted, processes using a SensorManager
would loose the ability to use it, resulting to a crash.
we now listen for sensor service death and reconnected if necessary.

Bug: 5445240
Change-Id: Ia47f8b26cdcecb729fa22bf11d55e10fcaef8cfc
2011-10-16 22:15:23 -07:00
Mathias Agopian
be58de0d62 add logging and defensive code when initializing sensors
Bug: 5445240
Change-Id: I9dc7d27d3e8b4f15989488859831526d8c7ded3b
2011-10-16 00:38:30 -07:00
Jamie Gennis
28378392fd SurfaceFlinger: make sync transactions explicit
This change enables a layer or orientation update transaction sent to
SurfaceFlinger to explicitly request a synchronous transaction.

Change-Id: I97cbba610c13679849f66114b216fa6dbf12f2a9
2011-10-14 16:11:51 -07:00
Jamie Gennis
8a29ff2a35 SurfaceTexture: report binder transaction failures
This change fixes the ISurfaceTexture error reporting for the case where
the binder transaction fails.

Bug: 5082219
Change-Id: I6517532992e3a76dc9eb5e4a36af43a562391aaa
2011-10-14 15:17:07 -07:00
Jamie Gennis
c901ca0abc Surface: fix a protected buffer test
This change renames the ScreenshotsOfProtectedBuffersFail to
ScreenshotsOfProtectedBuffersSucceed and changes the test to verify that
the screenshot succeeds.

Change-Id: I960bb8eed4211578cb4dc446b08392937da064b6
2011-10-12 18:42:33 -07:00
Jamie Gennis
b8d69a55f1 SurfaceFlinger: update orientation via transactions
This change merges the ISurfaceComposer::setOrientation functionality
into ISurfaceComposer::setTransactionState.  It enables the window
manager to atomically update both the display orientation and the
position and size of the windows in a single transaction with
SurfaceFlinger.

Bug: 5439574
Change-Id: I18a8ccc564d7d760ef8afb2d015ccdb7a7963900
2011-10-11 13:34:01 -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
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
06649fece4 cleanup: fix typos in logs
Change-Id: Ib5744564a873ea2b84100174673dc4d3ae109fcf
2011-09-16 11:56:40 -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
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