2 * Copyright 2016 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.
10 #include "cros_gralloc_helpers.h"
13 #include <unordered_set>
14 #include <unordered_map>
16 struct cros_gralloc_bo {
19 struct cros_gralloc_handle *hnd;
23 struct cros_gralloc_module {
24 gralloc_module_t base;
27 std::unordered_set<uint64_t> handles;
28 std::unordered_map<uint32_t, cros_gralloc_bo*> buffers;
31 int cros_gralloc_open(const struct hw_module_t *mod, const char *name,
32 struct hw_device_t **dev);
34 int cros_gralloc_validate_reference(struct cros_gralloc_module *mod,
35 struct cros_gralloc_handle *hnd,
36 struct cros_gralloc_bo **obj);
38 int cros_gralloc_decrement_reference_count(struct cros_gralloc_module *mod,
39 struct cros_gralloc_bo *obj);