diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-02-19 18:01:27 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-19 18:01:27 -0500 |
commit | 1d9be89e2d62316690ed211e50b79f2bec38e00f (patch) | |
tree | 266f8d4438350bbaa56567f5553ca441e5d4f1be /render | |
parent | 09cfa39392bd049225b1be7590cd099131472bf2 (diff) |
Revert "ELF Visibility"
Diffstat (limited to 'render')
-rw-r--r-- | render/egl.c | 11 | ||||
-rw-r--r-- | render/gles2/renderer.c | 2 | ||||
-rw-r--r-- | render/matrix.c | 9 | ||||
-rw-r--r-- | render/wlr_renderer.c | 15 | ||||
-rw-r--r-- | render/wlr_texture.c | 12 |
5 files changed, 0 insertions, 49 deletions
diff --git a/render/egl.c b/render/egl.c index 046eeb36..21c446f1 100644 --- a/render/egl.c +++ b/render/egl.c @@ -6,13 +6,11 @@ #include <wlr/render/egl.h> #include <wlr/util/log.h> #include "glapi.h" -#include "util/defs.h" // Extension documentation // https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_image_base.txt. // https://cgit.freedesktop.org/mesa/mesa/tree/docs/specs/WL_bind_wayland_display.spec -WLR_API const char *egl_error(void) { switch (eglGetError()) { case EGL_SUCCESS: @@ -85,7 +83,6 @@ static bool egl_get_config(EGLDisplay disp, EGLint *attribs, EGLConfig *out, return false; } -WLR_API bool wlr_egl_init(struct wlr_egl *egl, EGLenum platform, void *remote_display, EGLint *config_attribs, EGLint visual_id) { if (!load_glapi()) { @@ -161,7 +158,6 @@ error: return false; } -WLR_API void wlr_egl_finish(struct wlr_egl *egl) { eglMakeCurrent(EGL_NO_DISPLAY, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); if (egl->wl_display && eglUnbindWaylandDisplayWL) { @@ -173,7 +169,6 @@ void wlr_egl_finish(struct wlr_egl *egl) { eglReleaseThread(); } -WLR_API bool wlr_egl_bind_display(struct wlr_egl *egl, struct wl_display *local_display) { if (!eglBindWaylandDisplayWL) { return false; @@ -187,7 +182,6 @@ bool wlr_egl_bind_display(struct wlr_egl *egl, struct wl_display *local_display) return false; } -WLR_API bool wlr_egl_query_buffer(struct wlr_egl *egl, struct wl_resource *buf, int attrib, int *value) { if (!eglQueryWaylandBufferWL) { @@ -196,7 +190,6 @@ bool wlr_egl_query_buffer(struct wlr_egl *egl, struct wl_resource *buf, return eglQueryWaylandBufferWL(egl->display, buf, attrib, value); } -WLR_API EGLImage wlr_egl_create_image(struct wlr_egl *egl, EGLenum target, EGLClientBuffer buffer, const EGLint *attribs) { if (!eglCreateImageKHR) { @@ -207,7 +200,6 @@ EGLImage wlr_egl_create_image(struct wlr_egl *egl, EGLenum target, buffer, attribs); } -WLR_API bool wlr_egl_destroy_image(struct wlr_egl *egl, EGLImage image) { if (!eglDestroyImageKHR) { return false; @@ -217,7 +209,6 @@ bool wlr_egl_destroy_image(struct wlr_egl *egl, EGLImage image) { return true; } -WLR_API EGLSurface wlr_egl_create_surface(struct wlr_egl *egl, void *window) { EGLSurface surf = eglCreatePlatformWindowSurfaceEXT(egl->display, egl->config, window, NULL); @@ -244,7 +235,6 @@ int wlr_egl_get_buffer_age(struct wlr_egl *egl, EGLSurface surface) { return buffer_age; } -WLR_API bool wlr_egl_make_current(struct wlr_egl *egl, EGLSurface surface, int *buffer_age) { if (!eglMakeCurrent(egl->display, surface, surface, egl->context)) { @@ -258,7 +248,6 @@ bool wlr_egl_make_current(struct wlr_egl *egl, EGLSurface surface, return true; } -WLR_API bool wlr_egl_swap_buffers(struct wlr_egl *egl, EGLSurface surface, pixman_region32_t *damage) { EGLBoolean ret; diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c index 36486232..81a932e6 100644 --- a/render/gles2/renderer.c +++ b/render/gles2/renderer.c @@ -13,7 +13,6 @@ #include <wlr/util/log.h> #include "render/gles2.h" #include "glapi.h" -#include "util/defs.h" struct shaders shaders; @@ -267,7 +266,6 @@ static struct wlr_renderer_impl wlr_renderer_impl = { .format_supported = wlr_gles2_format_supported, }; -WLR_API struct wlr_renderer *wlr_gles2_renderer_create(struct wlr_backend *backend) { init_globals(); struct wlr_gles2_renderer *renderer; diff --git a/render/matrix.c b/render/matrix.c index ca6b995b..d5d7f49d 100644 --- a/render/matrix.c +++ b/render/matrix.c @@ -4,14 +4,12 @@ #include <wlr/render/matrix.h> #include <wlr/types/wlr_box.h> #include <wlr/types/wlr_output.h> -#include "util/defs.h" /* Obtains the index for the given row/column */ static inline int mind(int row, int col) { return (row - 1) * 4 + col - 1; } -WLR_API void wlr_matrix_identity(float (*output)[16]) { static const float identity[16] = { 1.0f, 0.0f, 0.0f, 0.0f, @@ -22,7 +20,6 @@ void wlr_matrix_identity(float (*output)[16]) { memcpy(*output, identity, sizeof(identity)); } -WLR_API void wlr_matrix_translate(float (*output)[16], float x, float y, float z) { wlr_matrix_identity(output); (*output)[mind(1, 4)] = x; @@ -30,7 +27,6 @@ void wlr_matrix_translate(float (*output)[16], float x, float y, float z) { (*output)[mind(3, 4)] = z; } -WLR_API void wlr_matrix_scale(float (*output)[16], float x, float y, float z) { wlr_matrix_identity(output); (*output)[mind(1, 1)] = x; @@ -38,7 +34,6 @@ void wlr_matrix_scale(float (*output)[16], float x, float y, float z) { (*output)[mind(3, 3)] = z; } -WLR_API void wlr_matrix_rotate(float (*output)[16], float radians) { wlr_matrix_identity(output); float _cos = cosf(radians); @@ -49,7 +44,6 @@ void wlr_matrix_rotate(float (*output)[16], float radians) { (*output)[mind(2, 2)] = _cos; } -WLR_API void wlr_matrix_mul(const float (*x)[16], const float (*y)[16], float (*product)[16]) { float _product[16] = { (*x)[mind(1, 1)] * (*y)[mind(1, 1)] + (*x)[mind(1, 2)] * (*y)[mind(2, 1)] + @@ -126,7 +120,6 @@ static const float transforms[][4] = { }, }; -WLR_API void wlr_matrix_transform(float mat[static 16], enum wl_output_transform transform) { memset(mat, 0, sizeof(*mat) * 16); @@ -145,7 +138,6 @@ void wlr_matrix_transform(float mat[static 16], } // Equivilent to glOrtho(0, width, 0, height, 1, -1) with the transform applied -WLR_API void wlr_matrix_texture(float mat[static 16], int32_t width, int32_t height, enum wl_output_transform transform) { memset(mat, 0, sizeof(*mat) * 16); @@ -169,7 +161,6 @@ void wlr_matrix_texture(float mat[static 16], int32_t width, int32_t height, mat[15] = 1.0f; } -WLR_API void wlr_matrix_project_box(float (*mat)[16], struct wlr_box *box, enum wl_output_transform transform, float rotation, float (*projection)[16]) { diff --git a/render/wlr_renderer.c b/render/wlr_renderer.c index 83513452..fa6c6fc3 100644 --- a/render/wlr_renderer.c +++ b/render/wlr_renderer.c @@ -1,15 +1,12 @@ #include <stdbool.h> #include <stdlib.h> #include <wlr/render/interface.h> -#include "util/defs.h" -WLR_API void wlr_renderer_init(struct wlr_renderer *renderer, struct wlr_renderer_impl *impl) { renderer->impl = impl; } -WLR_API void wlr_renderer_destroy(struct wlr_renderer *r) { if (r && r->impl && r->impl->destroy) { r->impl->destroy(r); @@ -18,62 +15,51 @@ void wlr_renderer_destroy(struct wlr_renderer *r) { } } -WLR_API void wlr_renderer_begin(struct wlr_renderer *r, struct wlr_output *o) { r->impl->begin(r, o); } -WLR_API void wlr_renderer_end(struct wlr_renderer *r) { r->impl->end(r); } -WLR_API void wlr_renderer_clear(struct wlr_renderer *r, const float (*color)[4]) { r->impl->clear(r, color); } -WLR_API void wlr_renderer_scissor(struct wlr_renderer *r, struct wlr_box *box) { r->impl->scissor(r, box); } -WLR_API struct wlr_texture *wlr_render_texture_create(struct wlr_renderer *r) { return r->impl->texture_create(r); } -WLR_API bool wlr_render_with_matrix(struct wlr_renderer *r, struct wlr_texture *texture, const float (*matrix)[16]) { return r->impl->render_with_matrix(r, texture, matrix); } -WLR_API void wlr_render_colored_quad(struct wlr_renderer *r, const float (*color)[4], const float (*matrix)[16]) { r->impl->render_quad(r, color, matrix); } -WLR_API void wlr_render_colored_ellipse(struct wlr_renderer *r, const float (*color)[4], const float (*matrix)[16]) { r->impl->render_ellipse(r, color, matrix); } -WLR_API const enum wl_shm_format *wlr_renderer_get_formats( struct wlr_renderer *r, size_t *len) { return r->impl->formats(r, len); } -WLR_API bool wlr_renderer_buffer_is_drm(struct wlr_renderer *r, struct wl_resource *buffer) { return r->impl->buffer_is_drm(r, buffer); } -WLR_API bool wlr_renderer_read_pixels(struct wlr_renderer *r, enum wl_shm_format fmt, uint32_t stride, uint32_t width, uint32_t height, uint32_t src_x, uint32_t src_y, uint32_t dst_x, uint32_t dst_y, @@ -82,7 +68,6 @@ bool wlr_renderer_read_pixels(struct wlr_renderer *r, enum wl_shm_format fmt, dst_x, dst_y, data); } -WLR_API bool wlr_renderer_format_supported(struct wlr_renderer *r, enum wl_shm_format fmt) { return r->impl->format_supported(r, fmt); diff --git a/render/wlr_texture.c b/render/wlr_texture.c index f74ebc66..a82a16b2 100644 --- a/render/wlr_texture.c +++ b/render/wlr_texture.c @@ -1,16 +1,13 @@ #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); @@ -19,19 +16,16 @@ 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) { @@ -39,37 +33,31 @@ 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); |