OSDN Git Service

Add alpha channel for the EGLConfig
authorneo.he <neo.he@mstarsemi.com>
Tue, 21 Mar 2017 03:48:36 +0000 (11:48 +0800)
committerCody Northrop <cnorthrop@google.com>
Thu, 30 Mar 2017 20:05:10 +0000 (14:05 -0600)
If the alpha channel is not assigned,the framebuffer will be Opaque.
And it will mask the underlying video and make the video invisible
when play video width mediaplayer

cherry-picked from AOSP master

Issue: b/36025630
Test: clean build and boot PixelC
Change-Id: If756ad2aaa789f6ddb178333b3e8854f52c8eac3

services/surfaceflinger/RenderEngine/RenderEngine.cpp

index e3dbecc..7564269 100644 (file)
@@ -382,6 +382,7 @@ static status_t selectEGLConfig(EGLDisplay display, EGLint format,
         attribs[EGL_RED_SIZE]                   = 8;
         attribs[EGL_GREEN_SIZE]                 = 8;
         attribs[EGL_BLUE_SIZE]                  = 8;
+        attribs[EGL_ALPHA_SIZE]                 = 8;
         wantedAttribute                         = EGL_NONE;
         wantedAttributeValue                    = EGL_NONE;
     } else {