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>
|
|
|
|
* @ingroup comp
|
|
|
|
*/
|
|
|
|
|
|
|
|
#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.
|
|
|
|
*
|
|
|
|
* @ingroup comp
|
|
|
|
*/
|
|
|
|
struct comp_renderer *
|
|
|
|
comp_renderer_create(struct comp_compositor *c);
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Render a distorted stereo frame.
|
|
|
|
*
|
|
|
|
* @ingroup comp
|
|
|
|
*/
|
|
|
|
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,
|
2019-05-01 15:17:17 +00:00
|
|
|
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
|
|
|
|
|
|
|
/*!
|
|
|
|
* Clean up and free the renderer.
|
|
|
|
*
|
|
|
|
* @ingroup comp
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
comp_renderer_destroy(struct comp_renderer *r);
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|