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
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
Add the concept of synchronous dequeueBuffer in SurfaceTexture
Implement {Surface|SurfaceTextureClient}::setSwapInterval()
Add SurfaceTexture logging
fix onFrameAvailable
query() does not modify the object's data, so it needs to be a const method
Change-Id: I67c40a3c865461e6f1cc2193fd2d74286ff6ac8f
Signed-off-by: Iliyan Malchev <malchev@google.com>
API addition: The timestamps are represented as nanoseconds from some
arbitrary time point. Like the SurfaceTexture transform matrix, the
timestamp retrieved by getTimestamp is for the last frame sent to the
GL texture using updateTexImage().
Camera HAL change: Expect vendors to set these timestamps using
native_window_set_buffers_timestamp(). For now, they are
autogenerated by SurfaceTextureClient if set_buffers_timestamp() is
never called, but such timing is likely not accurate enough to pass a
CTS test.
bug:3300707
Change-Id: Ife131a0c2a826ac27342e11b8a6c42ff49e1bea7
This change adds a new query to ANativeWindow for getting the minimum
number of buffers that must be left un-dequeued during the steady-state
operation of the ANativeWindow.
Change-Id: Ie8c461fc26b02ecde02ddb4f95bf763662cf1551
Related-Bug: 3356050
when we validate the surface there, most errors are in fact allowed
because it is legal to cancel a buffer after a surface has been
destroyed (for instance). in that case make sure to not log
error messages as they are very confusing.
Change-Id: Iecdfbaf6d9ee5da54d56cd7ea7a0d430c30934b0
Merge commit 'ff04e97faf75c435e453d4c1caf7eeac8b9c1ceb'
* commit 'ff04e97faf75c435e453d4c1caf7eeac8b9c1ceb':
fix [2835280] Add support for cancelling buffers to ANativeWindow
There is a new ANativeWindow::cancelBuffer() API that can be used to
cancel any dequeued buffer, BEFORE it's been enqueued. The buffer is
returned to the list of availlable buffers. dequeue and cancel are not
mutually thread safe, they must be called from the same thread or
external synchronization must be used.
Change-Id: I86cc7985bace8b6a93ad2c75d2bef5c3c2cb4d61
Merge commit 'bc4389edfbb5777aec1a9af7863b2ca3ade2fa64'
* commit 'bc4389edfbb5777aec1a9af7863b2ca3ade2fa64':
fix [2931513] Add support for setting the orientation of an ANativeWindow
This change makes the camera HAL interface take an ANativeWindow interface from
which all the camera preview buffers will be allocated. The framework code
running in application processes now passes a Surface object rather than an
ISurface to the camera server via Binder when setting the preview surface. The
camera server then forwards that Surface object (which implements the
ANativeWindow interface) to the camera HAL, which uses it to communicate with
SurfaceFlinger to allocate the camera preview buffers.
Change-Id: Ie438f721559cd7de5e4f848a26d96360dda07b5f
commit 35cc68814a9537c31fde146e171e7b0bbdfe211e
Author: Andreas Huber <andih@google.com>
Date: Mon Aug 16 08:48:42 2010 -0700
Only enable support for yuv to yuv conversion on passion, where it's available, use the slower yuv->rgb565 path everywhere else.
commit d8ac5a8814103e60d11d2acf61997fc31a1dc58d
Author: Andreas Huber <andih@google.com>
Date: Fri Aug 13 13:56:44 2010 -0700
The software renderer takes over all rendering, converting from yuv to yuv if possible and rgb565 otherwise.
commit 684972074b74318bdcb826ed9b5b0864d2d2e273
Author: Andreas Huber <andih@google.com>
Date: Fri Aug 13 09:34:35 2010 -0700
A first shot at supporting the new rendering APIs.
Change-Id: Iea9b32856da46950501f1a700f616b5feac710fd
This change adds a process-global cache of previously deserialized Surface
objects so that if a Surface object wrapping the same ISurface gets received
again the same Surface can be used. This is important because the 'tail'
pointer in the SharedBufferClient is stored only on the client side, and needs
to be the same for all the Surface objects wrapping an ISurface instance. This
solves the problem by making there only be one Surface object wrapping an
ISurface per process.
Change-Id: I4bf0b8787885c56277622fca053022d2bb638902
Not yet hooked up to anything in the NDK, but requires renaming
the existing android_native_window_t type everywhere.
Change-Id: Iffee6ea39c93b8b34e20fb69e4d2c7c837e5ea2e
Surfaces can now be parcelized and sent to remote
processes. When a surface crosses a process
boundary, it looses its connection with the
current process and gets attached to the new one.
Change-Id: I39c7b055bcd3ea1162ef2718d3d4b866bf7c81c0
this is called for each relayout() and used to create a full Surface (cpp)
which in turn did some heavy work (including an IPC with surfaceflinger),
most of the time to destroy it immediatelly when the returned surface
(the one in the parcel) was the same.
we now more intelligentely read from the parcel and construct the new
object only if needed.
Change-Id: Idfd40d9ac96ffc6d4ae5fd99bcc0773e131e2267
SurfaceComposerClient now only exist on the WindowManager side,
the client side uses the new SurfaceClient class, which only
exposes what a client needs.
also instead of keeping mappings from IBinder to SurfaceComposerClients
we have a SurfaceClient per Surface (referring to the same IBinder), this
is made possible by the fact that SurfaceClient is very light.
Change-Id: I6a1f7015424f07871632a25ed6a502c55abfcfa6
the new native_window_set_buffers_geometry allows
to specify a size and format for all buffers to be
dequeued. the buffer will be scalled to the window's
size.
Change-Id: I2c378b85c88d29cdd827a5f319d5c704d79ba381
this method can be used to change the number of buffers
associated to a native window. the default is two.
Change-Id: I608b959e6b29d77f95edb23c31dc9b099a758f2f
the reason for the above change is that waitForCondition() had become
large over time, mainly to handle error cases, using inlines to
evaluate the condition doesn't buys us much anymore while it increases
code size.
Change-Id: I2595d850832628954b900ab8bb1796c863447bc7
this is used in a few places to get access to the android.view.Surface
native surface. use a macro instead. Also rename the field to mNativeSurface.
Change-Id: I1c6dea14abd6b8b1392c7f97b304115999355094
the framebuffer implementation doesn't do anything special with this
but the surfaceflinger implementation makes sure the surface is not used
by two APIs simultaneously.
Change-Id: Id4ca8ef7093d68846abc2ac814327cc40a64b66b