[hwcomposer] Use three rendering buffers

Seems to improve the tearing problem.
This commit is contained in:
Martin Gräßlin 2015-10-20 11:39:42 +02:00
parent 98a669d70f
commit b38999e0a9

View file

@ -246,7 +246,7 @@ HwcomposerWindow::HwcomposerWindow(HwcomposerBackend *backend)
: HWComposerNativeWindow(backend->size().width(), backend->size().height(), HAL_PIXEL_FORMAT_RGB_888) : HWComposerNativeWindow(backend->size().width(), backend->size().height(), HAL_PIXEL_FORMAT_RGB_888)
, m_backend(backend) , m_backend(backend)
{ {
setBufferCount(2); setBufferCount(3);
size_t size = sizeof(hwc_display_contents_1_t) + 2 * sizeof(hwc_layer_1_t); size_t size = sizeof(hwc_display_contents_1_t) + 2 * sizeof(hwc_layer_1_t);
hwc_display_contents_1_t *list = (hwc_display_contents_1_t*)malloc(size); hwc_display_contents_1_t *list = (hwc_display_contents_1_t*)malloc(size);