aboutsummaryrefslogtreecommitdiff
path: root/render/wlr_texture.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-02-18 21:49:23 -0500
committerGitHub <noreply@github.com>2018-02-18 21:49:23 -0500
commit868ad5af69583646ba71d6e73e362818c7416941 (patch)
tree723b27e9b1fd24e85d9c44203f19364720510827 /render/wlr_texture.c
parent566c98846a92300d29e9fb4b408fd7e51898d42c (diff)
parent86269052eb7be715eba274dffc30c77c11b8309c (diff)
Merge pull request #647 from ascent12/elf_visibility
ELF Visibility
Diffstat (limited to 'render/wlr_texture.c')
-rw-r--r--render/wlr_texture.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/render/wlr_texture.c b/render/wlr_texture.c
index a82a16b2..f74ebc66 100644
--- a/render/wlr_texture.c
+++ b/render/wlr_texture.c
@@ -1,13 +1,16 @@
#include <stdbool.h>
#include <stdlib.h>
#include <wlr/render/interface.h>
+#include "util/defs.h"
+WLR_API
void wlr_texture_init(struct wlr_texture *texture,
struct wlr_texture_impl *impl) {
texture->impl = impl;
wl_signal_init(&texture->destroy_signal);
}
+WLR_API
void wlr_texture_destroy(struct wlr_texture *texture) {
if (texture && texture->impl && texture->impl->destroy) {
texture->impl->destroy(texture);
@@ -16,16 +19,19 @@ void wlr_texture_destroy(struct wlr_texture *texture) {
}
}
+WLR_API
void wlr_texture_bind(struct wlr_texture *texture) {
texture->impl->bind(texture);
}
+WLR_API
bool wlr_texture_upload_pixels(struct wlr_texture *texture, uint32_t format,
int stride, int width, int height, const unsigned char *pixels) {
return texture->impl->upload_pixels(texture, format, stride,
width, height, pixels);
}
+WLR_API
bool wlr_texture_update_pixels(struct wlr_texture *texture,
enum wl_shm_format format, int stride, int x, int y,
int width, int height, const unsigned char *pixels) {
@@ -33,31 +39,37 @@ bool wlr_texture_update_pixels(struct wlr_texture *texture,
width, height, pixels);
}
+WLR_API
bool wlr_texture_upload_shm(struct wlr_texture *texture, uint32_t format,
struct wl_shm_buffer *shm) {
return texture->impl->upload_shm(texture, format, shm);
}
+WLR_API
bool wlr_texture_update_shm(struct wlr_texture *texture, uint32_t format,
int x, int y, int width, int height, struct wl_shm_buffer *shm) {
return texture->impl->update_shm(texture, format, x, y, width, height, shm);
}
+WLR_API
bool wlr_texture_upload_drm(struct wlr_texture *texture,
struct wl_resource *drm_buffer) {
return texture->impl->upload_drm(texture, drm_buffer);
}
+WLR_API
bool wlr_texture_upload_eglimage(struct wlr_texture *texture,
EGLImageKHR image, uint32_t width, uint32_t height) {
return texture->impl->upload_eglimage(texture, image, width, height);
}
+WLR_API
void wlr_texture_get_matrix(struct wlr_texture *texture,
float (*matrix)[16], const float (*projection)[16], int x, int y) {
texture->impl->get_matrix(texture, matrix, projection, x, y);
}
+WLR_API
void wlr_texture_get_buffer_size(struct wlr_texture *texture, struct wl_resource
*resource, int *width, int *height) {
texture->impl->get_buffer_size(texture, resource, width, height);