Commit Graph

135 Commits

Author SHA1 Message Date
Jamie Gennis
47dd726460 SurfaceTexture: enable newly passing tests.
This change enables the following four SurfaceTextures tests:
  UpdateTexImageBeforeFrameFinishedWorks
  UpdateTexImageAfterFrameFinishedWorks
  RepeatedUpdateTexImageBeforeFrameFinishedWorks
  RepeatedUpdateTexImageAfterFrameFinishedWorks

Change-Id: I7632630bc97873e50d4a765ffc44a86f16ae62f1
2011-07-06 14:47:47 -07:00
Mathias Agopian
9303eee7dc fix ScreenshotsOfProtectedBuffersFail
- put the test window at the front most screen position
- use RGBA_8888 which is a mandatory format
- handle devices that don't support the protected usage flags

Bug: 4950464

Change-Id: I0005fb667cfe094e5978816e2924b294c5ef817e
2011-07-01 15:41:32 -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
Jamie Gennis
dfcff4b4ef SurfaceTexture: add a CPU -> GL sync test.
This change adds a test to verify that proper synchronization is done
when using SurfaceTexture to use CPU generated images as OpenGL ES
textures in 'synchronous mode'.  Synchronous mode is particularly tricky
because SurfaceTexture will allow the buffer that's currently bound to
the GL texture to be dequeued.  We rely on Gralloc's lock function to
block until this buffer is no longer being used by the OpenGL ES.

Change-Id: I1c4e37f3e9d60ab9a0905a90a1f5060fda8e485c
2011-06-28 13:18:07 -07:00
Jamie Gennis
c8c5152b19 SurfaceTexture: make tests use a large framebuffer.
This change makes the SurfaceTexture GL tests use a large (512x512)
framebuffer.  The tests now use glViewport to render to a region of the
framebuffer with a size matching that of the texture being drawn.  The
Npot test pixel checks must be changed because now the rendered region
is the same size as the texture.

Change-Id: Icc41803189c25e33ba1da7d2470720f0a11f3e4b
2011-06-20 15:42:57 -07:00
Jamie Gennis
07ed1a94bc SurfaceTexture: enable a test that now passes.
This change enables the QueryFormatAfterSettingWorks.

Change-Id: Ic868011a36a6c86c8646880246cd5b6960a13364
2011-06-15 12:44:01 -07:00
Jamie Gennis
d05bb2ed4c SurfaceTexture: enable a test that is now passing.
This change enables the TexturingFromCpuFilledYV12BufferPow2 test.

Change-Id: Ib356ee3d2f8979f34f849fd4090f598295e2e92e
2011-06-15 12:44:01 -07:00
Jamie Gennis
5dd0c4fd7e SurfaceTexture: increase the test's Surface layer.
This change increases the Surface layer used for displaying the test
results so that the tests will be visible over other windows in the
system.

Change-Id: I47f147f8743ff2a39d57d551811668371202bd31
2011-06-14 13:45:53 -07:00
Jamie Gennis
1876d13e45 SurfaceTexture: add some RGBA_8888 tests.
Change-Id: Id09915c98a00eca1209b7dab32039a06d260908e
2011-06-14 13:45:53 -07:00
Jamie Gennis
8b69defa2f SurfaceTextureClient: minor test refactoring.
Change-Id: Iabc6d27ca35d30d896c6aef65c4f1b5a1eed47b8
2011-06-14 13:45:52 -07:00
Jamie Gennis
135abde4c2 Merge "SurfaceTexture: add a format querying test." 2011-06-14 13:39:05 -07:00
Mathias Agopian
80728d87c9 Merge changes I9b8e1962,I7bb843ca
* changes:
  Temporarily don't return the current buffer in synchronous mode
  unify SurfaceTexture and Surface
2011-06-13 17:20:53 -07:00
Mathias Agopian
e122079be6 Temporarily don't return the current buffer in synchronous mode
activate synchronous mode by default.
2011-06-13 15:51:35 -07:00
Jamie Gennis
a6f35dd36e SurfaceTexture: add a format querying test.
This change adds a test to verify that querying the format of a
SurfaceTextureClient immediately after setting it returns the correct
result.  The test is currently disabled because it does not pass.

Change-Id: I5bddb39c5bf96d6104624094383d410ed913e9f3
2011-06-13 15:01:05 -07:00
Jamie Gennis
2510d9576f SurfaceTexture: disable a deadlocking test.
This change disables the UpdateTexImageAfterFrameFinishedWorks test
because it's currently causing deadlocks on some devices.

Change-Id: Ic9186db207e8d656f3af5d86fa138c7d96393c55
2011-06-13 13:43:51 -07:00
Jamie Gennis
824efa74e7 SurfaceTexture: add a pixel tolerance to the tests.
This change adds a default tolerance of 2 to all the pixel value checks
in the SurfaceTexture tests.

Change-Id: Id5a7cdffdfae16076e2daf4964a3326105b5ae2c
2011-06-13 13:41:01 -07:00
Jamie Gennis
5451d15ee2 SurfaceTexture: add some GL->GL tests.
This change adds some tests to verify streaming images from one GL
thread to another via SurfaceTexture.  Currently the tests do not
validate the correctness of the streamed images, but rather simply
verify that this streaming does not cause a deadlock.  3 of the 4 tests
are currently disabled because they do cause deadlocks on some devices.

Change-Id: I5677942053190063b97f370dba96c116711bc3bb
2011-06-13 10:50:13 -07:00
Jamie Gennis
5222604809 SurfaceTexture: add getTransformMatrix tests.
This change adds a test verifying that with no transform set on the
SurfaceTextureClient, the SurfaceTexture will return an identity
transform matrix.  It also verifies this same effect in the presence of
an additional call to native_window_set_buffer_count just before the
call to getTransformMatrix.

Bug: 4490420
Change-Id: Ic5adfa29b5696cc2b451433834e3758ef20c5edd
2011-06-13 10:50:13 -07:00
Jamie Gennis
8dda6b7bf8 SurfaceTexture: disable a failing test.
The SurfaceTextureSyncModeWaitRetire test was disabled.  It is failing
because of the synchronization hacks that were added to SurfaceTexture
to work around bugs in vendor device drivers.

Change-Id: I09a74538bfe14a04833acb6847471e00826cc7fc
2011-05-25 12:27:33 -07:00
Jamie Gennis
c2c8dfd71b SurfaceTexture: fix an error check in dequeueBuffer.
This change fixes the MIN_UNDEQUEUED_BUFFERS error check in
dequeueBuffer.  The check should only be performed if a buffer has been
queued since the last time the buffer count was changed by the client.
The check must be applied conditionally because video decoders require
all the bufferes to be dequeued and registered before beginning the
decode.

Change-Id: I08d96b380544e395c2fcf0f3983a199bfd695b09
2011-05-25 12:27:33 -07:00
Jamie Gennis
8cd5ba4b7f SurfaceTexture: clean up some comments, tests, etc.
This change fixes up some stale comments, member variable names, log
messages and disables a failing test.

Change-Id: Ic1d3344b18066cf710e4a42838b2417c6b1f2f6c
2011-05-25 12:27:33 -07:00
Mathias Agopian
8072711307 Implement {Surface|SurfaceTextureClient}::setSwapInterval()
Change-Id: I8382e346ddaa2c4c8ff56ac3ffd7f0109572f188
2011-05-11 18:01:51 -07:00
Mathias Agopian
7a5b22c4e3 new tests for SurfaceTexture synchronous mode
Change-Id: Icfdaa625238246f8d0224efe28fdf2c1c24203f8
2011-05-11 18:01:51 -07:00
Mathias Agopian
eafabcdc16 unify SurfaceTexture and Surface
Change-Id: I49da2f5d8408e4cd7e148cfb777bb4ff68cd8f37
2011-05-11 18:01:51 -07:00
Iliyan Malchev
697526bc9e frameworks/base: android_native_buffer_t -> ANativeWindowBuffer
Change-Id: Idc2eabaa805bb6d308ebb315872623f28d428417
Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-05-03 16:40:14 -07:00
Jamie Gennis
7fcb077c55 libgui: enable tests in the 'tests' build.
This change makes the libgui makefile recurse into the tests directory
so that the tests get built by a top-level make when
TARGET_BUILD_VARIANT=tests.

Change-Id: I6f623cc4b86dfeb00b9d21823316dbd9def23110
2011-04-26 17:26:37 -07:00
Jamie Gennis
1b528fb9d8 EGL: Allow creating a SurfaceTexture EGLSurface.
This change removes the check that disallowed the creation of an
EGLSurface that would send frames to a SurfaceTexture.

Change-Id: I44c6d5df503cc676a88144d72d39b414692ce4c9
2011-04-25 16:41:11 -07:00
Jamie Gennis
fc850124b3 libgui: Fix the tests so they build.
Change-Id: I7205b0819e5801ac549109ff562c3ab1b113d176
2011-04-25 16:40:05 -07:00
Mathias Agopian
a5c75c0162 SurfaceTexture can now force the client to request a buffer
SurfaceTexture now has the concept of default size a new method,
setDefaultBufferSize() to set it. When the default size is
changed, dequeueBuffer() will return a value telling the
client that it must ask for a new buffer.

The above only applies if the client has not
overriden the buffer size with setGeometry.

Change-Id: I520dc40363054b7e37fdb67d6a2e7bce70326e81
2011-04-01 14:43:35 -07:00
Mathias Agopian
d87f162026 merge libsurfaceflinger_client into libgui
this is the first step in unifying surfacetexture and surface.
for this reason the header files were not moved, as most of them
will eventually go away.

NOTE: currently we keep libsurfaceflinger_client.so as an empty
library to workaround prebuilt binaries wrongly linking against
it.

Change-Id: I130f0de2428e8579033dc41394d093f4e1431a00
2011-03-25 18:42:40 -07:00
Jamie Gennis
5c0c93a8c4 SurfaceTexture: disallow unsupported uses.
This change makes the ANativeWindow_lock NDK function error out if it is
passed an ANativeWindow with a concrete type that is not Surface.  It
also makes eglCreateWindowSurface fail if it is passed a
SurfaceTextureClient as its 'window' argument.

Bug: 4087277
Change-Id: Ie68c50c52d88f72d8a387f6c094908044c83a88c
2011-03-15 10:37:37 -07:00
Jamie Gennis
bae774eb20 SurfaceTextureClient: Add ISurfaceTexture getter.
This change adds a getter method to SurfaceTextureClient to get the
ISurfaceTexture object with which the SurfaceTextureClient is
communicating.

Bug: 4086509
Change-Id: Ifec621e0fe5392a5be56b2348fdc54067cbebcdd
2011-03-14 17:47:11 -07:00
Jamie Gennis
391bbe2246 ANativeWindow: add query for the concrete type.
This change adds a query to the ANativeWindow interface for getting the
concrete type of the ANativeWindow.

Bug: 4086509
Change-Id: I64aa86d72fbca3b52a98e1fc35608737781a3178
2011-03-14 17:47:11 -07:00
Jamie Gennis
d99c088f35 SurfaceTexture: fix transform matrix computation.
This change fixes the transform matrix computation in SurfaceTexture
when a crop rectangle is specified by the image producer.  It also adds
a test for this case as well as a basic test for the uncropped case.

Bug: 4070775
Change-Id: I1481c9ce9d08fe7f2bff86d3afdeab7d4002b157
2011-03-14 11:30:16 -07:00
Jamie Gennis
134f042286 ANativeWindow: add queues-to-window-composer check.
This change adds a new 'method' to the ANativeWindow interface to check
whether buffers queued to the window will be sent directly to the system
window compositor.

Change-Id: I4d4b199e328c110b68b250029aea650f03c8724d
Bug: 3495535
2011-03-08 16:49:51 -08:00