monado/src/xrt/compositor/main/comp_renderer.h

80 lines
1.4 KiB
C
Raw Normal View History

2019-03-18 05:52:32 +00:00
// Copyright 2019, Collabora, Ltd.
// SPDX-License-Identifier: BSL-1.0
/*!
* @file
* @brief Compositor rendering code header.
* @author Lubosz Sarnecki <lubosz.sarnecki@collabora.com>
* @author Jakob Bornecrantz <jakob@collabora.com>
2020-03-01 10:31:21 +00:00
* @ingroup comp_main
2019-03-18 05:52:32 +00:00
*/
#pragma once
#include "xrt/xrt_compiler.h"
#ifdef __cplusplus
extern "C" {
#endif
struct comp_compositor;
struct comp_renderer;
struct comp_swapchain_image;
/*!
* Called by the main compositor code to create the renderer.
*
2020-03-01 10:31:21 +00:00
* @ingroup comp_main
2019-03-18 05:52:32 +00:00
*/
struct comp_renderer *
comp_renderer_create(struct comp_compositor *c);
/*!
* Render a distorted stereo frame.
*
2020-03-01 10:31:21 +00:00
* @ingroup comp_main
2019-03-18 05:52:32 +00:00
*/
void
comp_renderer_frame(struct comp_renderer *r,
struct comp_swapchain_image *left,
2019-05-02 13:07:41 +00:00
uint32_t left_layer,
struct comp_swapchain_image *right,
2019-05-02 13:07:41 +00:00
uint32_t right_layer);
2019-03-18 05:52:32 +00:00
/*!
* Reset renderer as input has changed.
*
* @ingroup comp_main
*/
void
comp_renderer_reset(struct comp_renderer *r);
2019-03-18 05:52:32 +00:00
/*!
* Clean up and free the renderer.
*
2020-03-01 10:31:21 +00:00
* @ingroup comp_main
2019-03-18 05:52:32 +00:00
*/
void
comp_renderer_destroy(struct comp_renderer *r);
2020-04-16 15:56:59 +00:00
/*!
* Set dummy images in renderer.
*
* @ingroup comp_main
*/
void
comp_renderer_set_idle_images(struct comp_renderer *r);
/*!
* Render frame without setting new images.
*
* @ingroup comp_main
*/
void
comp_renderer_frame_cached(struct comp_renderer *r);
2019-03-18 05:52:32 +00:00
#ifdef __cplusplus
}
#endif