wlmaker
|
#include <cairo.h>
#include <libbase/libbase.h>
#include <wlr/types/wlr_buffer.h>
Go to the source code of this file.
Functions | |
struct wlr_buffer * | bs_gfxbuf_create_wlr_buffer (unsigned width, unsigned height) |
void | wlr_buffer_drop_nullify (struct wlr_buffer **wlr_buffer_ptr_ptr) |
bs_gfxbuf_t * | bs_gfxbuf_from_wlr_buffer (struct wlr_buffer *wlr_buffer_ptr) |
cairo_t * | cairo_create_from_wlr_buffer (struct wlr_buffer *wlr_buffer_ptr) |
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
struct wlr_buffer * bs_gfxbuf_create_wlr_buffer | ( | unsigned | width, |
unsigned | height | ||
) |
Creates a wlroots buffer tied to a libbase graphics buffer.
This creates a libbase graphics buffer, and wraps it as struct wlr_buffer
.
width | |
height |
bs_gfxbuf_t * bs_gfxbuf_from_wlr_buffer | ( | struct wlr_buffer * | wlr_buffer_ptr | ) |
Returns the libbase graphics buffer for the struct wlr_buffer
.
wlr_buffer_ptr | Pointer to a struct wlr_buffer . Must be a wlr_buffer that was previously created by bs_gfxbuf_create_wlr_buffer. |
wlr_buffer_ptr
must outlive the bs_gfxbuf_t*
. Must not be destroyed. cairo_t * cairo_create_from_wlr_buffer | ( | struct wlr_buffer * | wlr_buffer_ptr | ) |
Returns a cairo_t
for the WLR buffer backed by a libbase graphics buffer.
wlr_buffer_ptr | Pointer to a struct wlr_buffer . Must be a wlr_buffer that was previously created by bs_gfxbuf_create_wlr_buffer. |
wlr_buffer_ptr
must outlive the cairo_t*
. It must be destroyed using cairo_destroy
. void wlr_buffer_drop_nullify | ( | struct wlr_buffer ** | wlr_buffer_ptr_ptr | ) |
Drops a WLR buffer, and sets the pointer to NULL.
wlr_buffer_ptr_ptr | Points to a pointer to a WLR buffer. The pointer to the WLR buffer may be NULL; in that case, the call is a no-op. |