render/wlr_texture: put wlr_texture_from_buffer into the public API

master
Simon Zeni 3 years ago committed by Simon Ser
parent 0778151f94
commit 04d4fb536d

@ -18,7 +18,6 @@
#include "render/pixel_format.h"
#include "render/swapchain.h"
#include "render/wlr_renderer.h"
#include "render/wlr_texture.h"
bool init_drm_renderer(struct wlr_drm_backend *drm,
struct wlr_drm_renderer *renderer) {

@ -1,15 +0,0 @@
#ifndef RENDER_WLR_TEXTURE_H
#define RENDER_WLR_TEXTURE_H
#include <wlr/render/wlr_texture.h>
/**
* Create a new texture from a buffer.
*
* Should not be called in a rendering block like renderer_begin()/end() or
* between attaching a renderer to an output and committing it.
*/
struct wlr_texture *wlr_texture_from_buffer(struct wlr_renderer *renderer,
struct wlr_buffer *buffer);
#endif

@ -13,6 +13,7 @@
#include <wayland-server-core.h>
#include <wlr/render/dmabuf.h>
struct wlr_buffer;
struct wlr_renderer;
struct wlr_texture_impl;
@ -73,4 +74,13 @@ bool wlr_texture_write_pixels(struct wlr_texture *texture,
*/
void wlr_texture_destroy(struct wlr_texture *texture);
/**
* Create a new texture from a buffer.
*
* Should not be called in a rendering block like renderer_begin()/end() or
* between attaching a renderer to an output and committing it.
*/
struct wlr_texture *wlr_texture_from_buffer(struct wlr_renderer *renderer,
struct wlr_buffer *buffer);
#endif

@ -4,7 +4,6 @@
#include <wlr/render/interface.h>
#include <wlr/render/wlr_texture.h>
#include "types/wlr_buffer.h"
#include "render/wlr_texture.h"
void wlr_texture_init(struct wlr_texture *texture,
const struct wlr_texture_impl *impl, uint32_t width, uint32_t height) {

@ -7,7 +7,6 @@
#include <wlr/types/wlr_linux_dmabuf_v1.h>
#include <wlr/util/log.h>
#include "render/pixel_format.h"
#include "render/wlr_texture.h"
#include "types/wlr_buffer.h"
#include "util/signal.h"

Loading…
Cancel
Save