blob: 3f8e5bf139502a2df2e91e34301de517be88b516 [file] [log] [blame]
Stéphane Marchesin25a26062014-09-12 16:18:59 -07001/*
2 * Copyright (c) 2014 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 HELPERS_H
8#define HELPERS_H
9
Yuly Novikov96c7a3b2015-12-08 22:48:29 -050010size_t gbm_num_planes_from_format(uint32_t format);
Stéphane Marchesin25a26062014-09-12 16:18:59 -070011int gbm_bpp_from_format(uint32_t format);
Yuly Novikov96c7a3b2015-12-08 22:48:29 -050012int gbm_stride_from_format(uint32_t format, uint32_t width);
Stéphane Marchesin25a26062014-09-12 16:18:59 -070013int gbm_is_format_supported(struct gbm_bo *bo);
Stéphane Marchesinec88e892015-11-03 16:14:59 -080014int gbm_dumb_bo_create(struct gbm_bo *bo, uint32_t width, uint32_t height,
15 uint32_t format, uint32_t flags);
Stéphane Marchesin25a26062014-09-12 16:18:59 -070016int gbm_dumb_bo_destroy(struct gbm_bo *bo);
17int gbm_gem_bo_destroy(struct gbm_bo *bo);
18
19#endif