The emulator EGL implementation tried to hold its own reference to
buffers acquired/released with dequeueBuffer/queueBuffer, but was
missing an incRef after dequeueBuffer during swapBuffers.
Since the native window holds a reference to the buffer between
dequeueBuffer and queueBuffer, the EGL reference isn't needed anyway.
Change-Id: I95e4f9f4faf59198f99939cdca6603fe176c56bc
This patches fixes a minor invalid usage of delete (instead of delete[])
and reformats the source code a little to make it more obvious.
Change-Id: If853d12e74549abcc6682430c837b0f14da81fdc
needed changes to support glEGLImageTargetRenderbufferStorageOES,
added implementation in egl and added tokens to renderControl.
Also fixed function pointers returned by eglGetProcAddress to
return functions that works independant of the current context,
see system/egl/ClientAPIExts.cpp
That makes the egl_image conformance test to pass on the guest.
Change-Id: I580cda82ba0fb44f12b75aa0bbacf5cd9f15f744
This is needed to support the rare, but still legal scenario,
when glDrawElemets is used with some index array data is stored in VBO's
while the actual attributes (vertices) data is in immediate mode.
When in immediate mode, we need to process the incodes, in order to know
which vertex data to send, which was impossible without the caching.
This commit introduces a new class GLSharedGroup, which will hold all data
that can be shared by shared contexts (buffers are such data).
This also makes the "Jet Cars Stunts" app work properly.
Change-Id: Ic937080dae461bc8cdf4d10cf37066a6e847f464
On every swapBuffers, we make sure to decRef on the prev buffer,
and incRef on the current buffer. This fixes all the anoying
crashes on application exit, and also after the speech windows
on Replica Island
Change-Id: I1981fbf17a24ef6f60cdcf6d7ec3a5e7eef5377f
Support for eglChooseConfig with configs==NULL.
Also added small change to query EGL_LARGEST_PBUFFER attrib of surfaces.
Fixed error print in QemuPipeStream::readFully.
Those changes make sure that covegl completes & passes on the emulator with Translator
on linux in the backend.
Change-Id: I892917ec102ae85d56a16a7cb321e8c12e7083f1
Added GLESv2 library to system.
Made fixes to the host libOpenGLRender to
compile and support GLESv2 (defined WITH_GLES2).
Other fixes required to make GLESv2 to work.
Change-Id: I9eb198e6092e7fa3550342c50929dd1714282cb3
Added a return value for rcFlushWindowColorBuffer and
rcUpdateColorBuffer in order to make those calls to block
with a round-trip to the host. This is to make sure that
the color buffer is up-to-date before the flinger use it
for rendering.
Also added a call to the native windows's lock function after
EGL is attached and bound to render on the window. This call
was missed before.
This syncronization can be optimized by removing the round-trip
and insert sync primitive to the stream at every draw command that
reads from a color buffer to make the sync happen on the host
before rendering the color buffer and remove the need for the
guest to wait for that update.
Change-Id: I1c2d8bc407b69663e992a68d5aa755f19bbe0ec3
The config_size argument in rcChooseConfig should match the number
of requested configs and not the size in bytes to store it.
Moved the configs array size computation into rendeerControl.attrib.
Change-Id: I9e797024522965a656764c20252b25ff5ae657f5
Added rcGetGLString token to renderControl to query
a GL string constant from the current context from the host.
Implement glGetString functinality in EGL so that the string
value can be cached in the context structure and also
implementation can be shared between GLESv1 and GLESv2.
Also, fixed clientAPI context initialization check in
eglMakeCurrent. The check was for the previously bounded
context instead for the newly bounded context.
Change-Id: I41c0b4ad462c9ad5bd5c66719b41509bb1b7a947
We need to share the cb_hande_t between gralloc/EGL/GLES, moved it
into the opengl system common lib.
Also added eglSwapBuffers implementation.
Change-Id: Ia461a48c273af42293aafcf084e457adf03cbed3