Fix size of vertex_t on 64-bit architectures
Fix __get_tls casts, the TLS area is a void**
Cast through uintptr_t to store integers in a pointer
Use %zu to print size_t
Change-Id: I91079ec76025237e6d2081784c5348518b0ce122
This change makes GLConsumer use the EGL_ANDROID_image_crop extension when
available on a device. The crop rectangle is passed to the EGL driver when
creating EGLImages, allowing the crop to be performed by the driver rather than
using the texture transform matrix.
Bug: 10897141
Change-Id: I63e9a5d5c85067376abc420e3639154468346311
EGL now picks the buffer format out of a small set
of formats compatible with CPU consumers instead of
using the EGL_NATIVE_VISUAL_ID.
Bug: 10194508
Change-Id: If423cd29601b7a3ace8670f4c73004132cfc4b31
If the implementation eglCreateContext failed, we called
eglGetError(), so we could check that it set the EGL error properly.
But since we'd already called this, when the app called eglGetError()
it would get EGL_SUCCESS!
Bug: 10181333
Change-Id: Ic45d3a8fcb8c4421e04844c6d2f52761790b5948
We've had the extended behavior since Android 4.3, but the extension
hadn't been ratified by Khronos yet so we couldn't add it to the
extension string.
Bug: 9681677
Change-Id: I78842316a3ab7a3f66a0ac1a4742d837de664c4c
this means they only have access to the consumer end of
the interface. we had a lot of code that assumed consumers
where holding a BufferQueue (i.e.: both ends), so most of
this change is untangling in fix that
Bug: 9265647
Change-Id: Ic2e2596ee14c7535f51bf26d9a897a0fc036d22c
While currently untested, this should allow to move the
BuffereQueue in the consumer process and have everything
work as usual.
Bug: 9265647
Change-Id: I9ca8f099f7c65b9a27b7e7a3643b46d1b58eacfc
If there are two or more buffers pending that are ready for
immediate presentation, drop all but the last one.
Any code that didn't explicitly specify timestamps for buffers
was using the default value (auto-generated "now"). As a result,
surfaceflinger would drop frames whenever more than one buffer
was queued. We now use zero as the auto-generated timestamp,
and we don't set the timestamp in eglBeginFrame().
Change-Id: I187f42d33de227cd3411ff0dcd3b9ce1961457eb
Fallout from the Flattenable change, update all its uses.
Additionnaly, fix/tighten size checks when (un)flatten()ing
things.
Removed the assumption by some flattenables (e.g.: Fence)
that the size passed to them would be exact (it can
and will be larger in some cases)
The code in Parcel is a bit complicated so that we don't
have to expose the full implementation (and also to
keep the code smallish).
Change-Id: I0bf1c8aca2a3128491b4f45510bc46667e566dde
this is the first step of a series of improvements to
BufferQueue. A few things happen in this change:
- setSynchronousMode() goes away as well as the SynchronousModeAllowed flag
- BufferQueue now defaults to (what used to be) synchronous mode
- a new "controlled by app" flag is passed when creating consumers and producers
those flags are used to put the BufferQueue in a mode where it
will never block if both flags are set. This is achieved by:
- returning an error from dequeueBuffer() if it would block
- making sure a buffer is always available by replacing
the previous buffer with the new one in queueBuffer()
(note: this is similar to what asynchrnous mode used to be)
Note: in this change EGL's swap-interval 0 is broken; this will be
fixed in another change.
Change-Id: I691f9507d6e2e158287e3039f2a79a4d4434211d
The EGL 1.4 spec section 3.5.1 states that EGL_BAD_ALLOC should be set
if the supplied window already has an associated EGLSurface, not
EGL_BAD_NATIVE_WINDOW as is currently set.
Change-Id: If1598617f4e31904f2045560ae1cdf49d8a697dc
This allows apps to find OpenGL ES 3.0 functions using
eglGetProcAddress() instead of dlopen/dlsym.
Bug: 9681677
Change-Id: I7ce6e1636bc47d6b0bf20a4e46bd67235714d129
in the common case this saves one instructions per jump
(which will help with the i-cache).
this change also gets rid of the "use slow tls" option,
which was useless. So at least now architectures that don't have
assembly bindings will perform much better.
Change-Id: I31be6c06ad2136b50ef3a1ac14682d7812ad40d2
Make it faster and correcter.
Also, fixed the "gen" script to update the static/egl/*.java files
as part of doing an update. Altered the "git" lines to change
directories before invoking git -- necessary because we're now
split between frameworks/base and frameworks/native.
Bug 9204146
Change-Id: Ie60504b1932349e6f2c9d3868dee6a645ef2b36e
destroyed but current-to-a-thread resources are only destroyed
when they're made not-current; however, we were not destroying
those when the thread itself terminated, causing these resources
to be leaked forever.
we now install a tls-key destructor that takes care of this
by calling eglReleaseThread upon thread termination.
Bug: 9209776
Change-Id: I88298a34e3a27488eb81eab76717715569c7d57c
Initially populated with EGL_ANDROID_presentation_time (moved from the
EGL14 class) and the ES-relevant parts of EGL_KHR_create_context.
Bug: 8678160
Change-Id: Ifed2ee3da264ca701ae1f4b309a0758f7fcc3acc