[hwcomposer] Switch to format HAL_PIXEL_FORMAT_RGB_888

We clearly do not need an alpha channel for our scene.
This commit is contained in:
Martin Gräßlin 2015-06-25 15:49:52 +02:00
parent 48bf38e830
commit 53dcd98b8b
2 changed files with 5 additions and 2 deletions

View file

@ -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,
};

View file

@ -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);