Evas filters: Fix glReadPixels usage for EGL

This is a simplified version of the patch in master:

commit 7a614c80f3
Author: Jean-Philippe Andre <jp.andre@samsung.com>
Date:   Wed May 13 10:16:17 2015 +0900

    Evas filters: Fix glReadPixels usage for EGL

    EGL might very well not support RGBA read mode, so we
    need to check for it first.

    Also remove some error logs (see previous commit), and useless
    initialization of the Evas GL engine.

    @fix
This commit is contained in:
Jean-Philippe Andre 2015-05-13 10:48:43 +09:00
parent a1ea4a417f
commit 22e210e5ae
1 changed files with 4 additions and 0 deletions

View File

@ -1343,9 +1343,13 @@ eng_gl_surface_read_pixels(void *data, void *surface,
*/
glsym_glBindFramebuffer(GL_FRAMEBUFFER, im->tex->pt->fb);
#ifndef GL_GLES
if (im->tex->pt->format == GL_BGRA)
glReadPixels(x, y, w, h, GL_BGRA, GL_UNSIGNED_BYTE, pixels);
else
#endif
{
DATA32 *ptr = pixels;
int k;