From 738b9a45399485893fa9541fae19c47e01bc4af4 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Thu, 6 Aug 2009 16:41:02 -0700 Subject: make sure bootanimation will choose the right config wrt the native surface --- cmds/bootanimation/BootAnimation.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'cmds/bootanimation/BootAnimation.cpp') diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp index 008fa3694e5c..5b904cb27f8d 100644 --- a/cmds/bootanimation/BootAnimation.cpp +++ b/cmds/bootanimation/BootAnimation.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -138,8 +139,10 @@ status_t BootAnimation::readyToRun() { sp s = control->getSurface(); // initialize opengl and egl - const EGLint attribs[] = { EGL_RED_SIZE, 5, EGL_GREEN_SIZE, 6, - EGL_BLUE_SIZE, 5, EGL_DEPTH_SIZE, 0, EGL_NONE }; + const EGLint attribs[] = { + EGL_DEPTH_SIZE, 0, + EGL_NONE + }; EGLint w, h, dummy; EGLint numConfigs; EGLConfig config; @@ -149,8 +152,7 @@ status_t BootAnimation::readyToRun() { EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY); eglInitialize(display, 0, 0); - eglChooseConfig(display, attribs, &config, 1, &numConfigs); - + EGLUtils::selectConfigForNativeWindow(display, attribs, s.get(), &config); surface = eglCreateWindowSurface(display, config, s.get(), NULL); context = eglCreateContext(display, config, NULL, NULL); eglQuerySurface(display, surface, EGL_WIDTH, &w); -- cgit v1.2.3-59-g8ed1b