OSDN Git Service

minigbm: tweak cros-gralloc flags
authorGurchetan Singh <gurchetansingh@chromium.org>
Tue, 29 Nov 2016 22:45:46 +0000 (14:45 -0800)
committerchrome-bot <chrome-bot@chromium.org>
Fri, 9 Dec 2016 11:30:18 +0000 (03:30 -0800)
commitf17c813c9f95d91c53c7e72ca66473153527cdc6
tree22889632c66d3aa0b1ab2e8cbd9fd98fcb37b296
parentc67f9e422c5e4abd86cca009bf609e2438acf757
minigbm: tweak cros-gralloc flags

The Play Store wants a ABGR8888 HW cursor, and we can't in
general support this, so let's ignore the cursor flag rather
than fail the allocation.

We also interpret GRALLOC_USAGE_HW_COMPOSER as BO_USE_SCANOUT
| BO_USE_RENDERING. This fails with YV12, since we can't scanout
from it on Intel/Mediatek. Let's first try to allocate with the
scanout flag enabled and then fall-back to rendering if it's
not supported (i.e, first try overlay but then try OpenGL).

In addition, let's interpret GRALLOC_USAGE_HW_FB the same as
GRALLOC_USAGE_HW_COMPOSER since the framebuffer device
(Chrome in our case) wants to scanout but can also fall back.

BUG=chromium:616275
TEST=run cts --package com.drawelements.deqp.egl on minnie
CQ-DEPEND=CL:414536

Change-Id: I57cd681ca8ff0186698bd0a046c3a7b346f3e434
Reviewed-on: https://chromium-review.googlesource.com/414537
Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
cros_gralloc/cros_alloc_device.cc
cros_gralloc/cros_gralloc_helpers.cc