OSDN Git Service

minigbm: gralloc0: Fix error handling in lock_ycbcr
[android-x86/external-minigbm.git] / cros_gralloc / cros_gralloc_types.h
1 /*
2  * Copyright 2017 The Chromium OS Authors. All rights reserved.
3  * Use of this source code is governed by a BSD-style license that can be
4  * found in the LICENSE file.
5  */
6
7 #ifndef CROS_GRALLOC_TYPES_H
8 #define CROS_GRALLOC_TYPES_H
9
10 typedef enum {
11         CROS_GRALLOC_ERROR_NONE = 0,
12         CROS_GRALLOC_ERROR_BAD_DESCRIPTOR = 1,
13         CROS_GRALLOC_ERROR_BAD_HANDLE = 2,
14         CROS_GRALLOC_ERROR_BAD_VALUE = 3,
15         CROS_GRALLOC_ERROR_NOT_SHARED = 4,
16         CROS_GRALLOC_ERROR_NO_RESOURCES = 5,
17         CROS_GRALLOC_ERROR_UNDEFINED = 6,
18         CROS_GRALLOC_ERROR_UNSUPPORTED = 7,
19 } cros_gralloc_error_t;
20
21 struct cros_gralloc_buffer_descriptor {
22         uint32_t width;
23         uint32_t height;
24         uint32_t consumer_usage;
25         uint32_t producer_usage;
26         uint32_t droid_format;
27         uint32_t drm_format;
28         uint64_t drv_usage;
29 };
30
31 #endif