From 53dcd98b8b4bbcdcea22163ca807dac045b03dab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 25 Jun 2015 15:49:52 +0200 Subject: [PATCH] [hwcomposer] Switch to format HAL_PIXEL_FORMAT_RGB_888 We clearly do not need an alpha channel for our scene. --- backends/hwcomposer/egl_hwcomposer_backend.cpp | 5 ++++- backends/hwcomposer/hwcomposer_backend.cpp | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/backends/hwcomposer/egl_hwcomposer_backend.cpp b/backends/hwcomposer/egl_hwcomposer_backend.cpp index 2d52864bd8..f16ad42f52 100644 --- a/backends/hwcomposer/egl_hwcomposer_backend.cpp +++ b/backends/hwcomposer/egl_hwcomposer_backend.cpp @@ -72,7 +72,10 @@ void EglHwcomposerBackend::init() bool EglHwcomposerBackend::initBufferConfigs() { const EGLint config_attribs[] = { - EGL_BUFFER_SIZE, 32, + EGL_RED_SIZE, 8, + EGL_GREEN_SIZE, 8, + EGL_BLUE_SIZE, 8, + EGL_ALPHA_SIZE, 0, EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, EGL_NONE, }; diff --git a/backends/hwcomposer/hwcomposer_backend.cpp b/backends/hwcomposer/hwcomposer_backend.cpp index 745e229803..0c063e2b8e 100644 --- a/backends/hwcomposer/hwcomposer_backend.cpp +++ b/backends/hwcomposer/hwcomposer_backend.cpp @@ -537,7 +537,7 @@ static void initLayer(hwc_layer_1_t *layer, const hwc_rect_t &rect) } HwcomposerWindow::HwcomposerWindow(HwcomposerBackend *backend) - : HWComposerNativeWindow(backend->size().width(), backend->size().height(), HAL_PIXEL_FORMAT_RGBA_8888) + : HWComposerNativeWindow(backend->size().width(), backend->size().height(), HAL_PIXEL_FORMAT_RGB_888) , m_backend(backend) { size_t size = sizeof(hwc_display_contents_1_t) + 2 * sizeof(hwc_layer_1_t);