From: Vasiliy Ulyanov Date: Fri, 3 Jul 2015 15:33:02 +0000 (+0300) Subject: VIGS: clear color before compositing dpy image X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.2~320^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=de014dee06a31496525bf21ad38b82ecb118d173;p=sdk%2Femulator%2Fqemu.git VIGS: clear color before compositing dpy image Needs to be done to avoid artifacts with underlays (e.g. when bottom plane does not fit the whole screen and the root surface has alpha enabled). Change-Id: I58b1f3c98a9a6dac5042118441a553de23283491 Signed-off-by: Vasiliy Ulyanov --- diff --git a/hw/vigs/vigs_gl_backend.c b/hw/vigs/vigs_gl_backend.c index efe89c2a15..d7b431be3b 100644 --- a/hw/vigs/vigs_gl_backend.c +++ b/hw/vigs/vigs_gl_backend.c @@ -2184,6 +2184,8 @@ static bool vigs_gl_backend_composite(struct vigs_surface *surface, gl_backend->FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, gl_backend->dpy_tex, 0); + gl_backend->Clear(GL_COLOR_BUFFER_BIT); + bottom = vigs_gl_backend_composite_planes(gl_backend, sorted_planes, false, @@ -2771,6 +2773,7 @@ bool vigs_gl_backend_init(struct vigs_gl_backend *gl_backend) gl_backend->dpy_scale_prog_texSize_loc = gl_backend->GetUniformLocation(gl_backend->dpy_scale_prog_id, "texSize"); gl_backend->dpy_scale_prog_brightness_loc = gl_backend->GetUniformLocation(gl_backend->dpy_scale_prog_id, "brightness"); + gl_backend->ClearColor(0.0f, 0.0f, 0.0f, 0.0f); gl_backend->Disable(GL_DEPTH_TEST); gl_backend->Disable(GL_BLEND);