OSDN Git Service

check usage flags against device's supported formats in gbm_bo_create
authorZach Reizner <zachr@google.com>
Thu, 25 Feb 2016 19:44:36 +0000 (11:44 -0800)
committerchrome-bot <chrome-bot@chromium.org>
Fri, 26 Feb 2016 02:25:42 +0000 (18:25 -0800)
commit4fcc3c7d2275e8e90f44f6d87ebb3f858d6d4527
tree8600a1713da33f668a163de1051d255687ed94f0
parente4eaeb69c7f69fde0f9a0cfb3b7c46dc13376c49
check usage flags against device's supported formats in gbm_bo_create

Previously, gbm_bo_create called gbm_device_is_format_supported with 0
hardcoded as the usage flags. This meant gbm_bo_create could attempt to
create buffer objects for unsupported combos of usage flags and pixel
formats. Using 0 as the usage flag basically meant ANY usage flag that
was supported by the device would work.

Of course that's not the reality, and the usage flag should be
considered along with the pixel format during buffer object creation,
which is what this CL does.

TEST=ui works
BUG=None

Change-Id: Icd3bd0f47dc33790e4476515f2024f9765bea0a2
Reviewed-on: https://chromium-review.googlesource.com/329306
Commit-Ready: Zach Reizner <zachr@chromium.org>
Tested-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
gbm.c