OSDN Git Service

minigbm: cros_gralloc: support GRALLOC_MODULE_API_VERSION_0_3
[android-x86/external-minigbm.git] / gbm_helpers.c
index 9d4645b..529d7fe 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016 The Chromium OS Authors. All rights reserved.
+ * Copyright 2016 The Chromium OS Authors. All rights reserved.
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
 
 uint64_t gbm_convert_flags(uint32_t flags)
 {
-       uint64_t usage = DRV_BO_USE_NONE;
+       uint64_t usage = BO_USE_NONE;
 
        if (flags & GBM_BO_USE_SCANOUT)
-               usage |= DRV_BO_USE_SCANOUT;
+               usage |= BO_USE_SCANOUT;
        if (flags & GBM_BO_USE_CURSOR)
-               usage |= DRV_BO_USE_CURSOR;
+               usage |= BO_USE_CURSOR;
        if (flags & GBM_BO_USE_CURSOR_64X64)
-               usage |= DRV_BO_USE_CURSOR_64X64;
+               usage |= BO_USE_CURSOR_64X64;
        if (flags & GBM_BO_USE_RENDERING)
-               usage |= DRV_BO_USE_RENDERING;
+               usage |= BO_USE_RENDERING;
+       if (flags & GBM_BO_USE_TEXTURING)
+               usage |= BO_USE_TEXTURE;
        if (flags & GBM_BO_USE_LINEAR)
-               usage |= DRV_BO_USE_LINEAR;
+               usage |= BO_USE_LINEAR;
+       if (flags & GBM_BO_USE_CAMERA_WRITE)
+               usage |= BO_USE_CAMERA_WRITE;
+       if (flags & GBM_BO_USE_CAMERA_READ)
+               usage |= BO_USE_CAMERA_READ;
 
        return usage;
 }