Many people have requested re-adding BO_USE_TEXTURE as a flag
since:
BO_USE_RENDERING means the buffer will be used as a render target.
BO_USE_TEXTURE means the buffer will be textured from.
BUG=chromium:616275
TEST=minigbm/arc-cros-gralloc compiles
Change-Id: I63be6682cf4e2415dc42c78b2cab3ad694bcd818
Reviewed-on: https://chromium-review.googlesource.com/448251
Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
if ((flags & sw_write()) == GRALLOC_USAGE_SW_WRITE_OFTEN)
usage |= BO_USE_SW_WRITE_OFTEN;
if (flags & GRALLOC_USAGE_HW_TEXTURE)
- usage |= BO_USE_RENDERING;
+ usage |= BO_USE_TEXTURE;
if (flags & GRALLOC_USAGE_HW_RENDER)
usage |= BO_USE_RENDERING;
if (flags & GRALLOC_USAGE_HW_2D)
#define BO_USE_HW_CAMERA_READ (1ull << 14)
#define BO_USE_HW_CAMERA_ZSL (1ull << 15)
#define BO_USE_RENDERSCRIPT (1ull << 16)
+#define BO_USE_TEXTURE (1ull << 17)
/* This is our extension to <drm_fourcc.h>. We need to make sure we don't step
* on the namespace of already defined formats, which can be done by using invalid