egl/android: Refactor image creation to separate flink and prime paths (v2)
authorTomasz Figa <tfiga@chromium.org>
Tue, 2 Aug 2016 11:07:52 +0000 (20:07 +0900)
committerChad Versace <chad@kiwitree.net>
Mon, 8 Aug 2016 18:40:37 +0000 (11:40 -0700)
commite77b4933907106238c7872cb74d0ba0b5246aee6
tree6810215bc15000ac320a5de7f52601fd2d029b62
parent217af75a4092545fb9f5afe4a12e0b74cb1b48e4
egl/android: Refactor image creation to separate flink and prime paths (v2)

This patch splits current dri2_create_image_android_native_buffer() into
main entry point and two additional functions, one for creating an image
from flink name and one for handling prime FDs using the generic DMA-buf
path. This makes the code cleaner and also prepares for disabling flink
path more easily in the future.

v2: Split into separate patch.
    Add error messages.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Tested-by: Rob Herring <rob@kernel.org>
Reviewed-by: Chad Versace <chad@kiwitree.net>
Change-Id: Ifdfb5927399d56992fe707160423c29278f49172
src/egl/drivers/dri2/platform_android.c