mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-16 08:56:26 -05:00
commit
1956d3cedb
27 changed files with 334 additions and 468 deletions
|
|
@ -8,7 +8,7 @@
|
|||
#include <wlr/render.h>
|
||||
#include <wlr/render/egl.h>
|
||||
#include <wlr/render/interface.h>
|
||||
#include <wlr/render/matrix.h>
|
||||
#include <wlr/types/wlr_matrix.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include "render/gles2.h"
|
||||
#include "util/signal.h"
|
||||
|
|
@ -229,7 +229,6 @@ static bool gles2_texture_upload_eglimage(struct wlr_texture *wlr_tex,
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
static bool gles2_texture_upload_dmabuf(struct wlr_texture *_tex,
|
||||
struct wl_resource *dmabuf_resource) {
|
||||
struct wlr_gles2_texture *tex = (struct wlr_gles2_texture *)_tex;
|
||||
|
|
@ -265,20 +264,6 @@ static bool gles2_texture_upload_dmabuf(struct wlr_texture *_tex,
|
|||
return true;
|
||||
}
|
||||
|
||||
static void gles2_texture_get_matrix(struct wlr_texture *_texture,
|
||||
float (*matrix)[16], const float (*projection)[16], int x, int y) {
|
||||
struct wlr_gles2_texture *texture = (struct wlr_gles2_texture *)_texture;
|
||||
float world[16];
|
||||
wlr_matrix_identity(matrix);
|
||||
wlr_matrix_translate(&world, x, y, 0);
|
||||
wlr_matrix_mul(matrix, &world, matrix);
|
||||
wlr_matrix_scale(&world,
|
||||
texture->wlr_texture.width, texture->wlr_texture.height, 1);
|
||||
wlr_matrix_mul(matrix, &world, matrix);
|
||||
wlr_matrix_mul(projection, matrix, matrix);
|
||||
}
|
||||
|
||||
|
||||
static bool gles2_texture_get_dmabuf_size(struct wlr_texture *texture, struct
|
||||
wl_resource *resource, int *width, int *height) {
|
||||
if (!wlr_dmabuf_resource_is_buffer(resource)) {
|
||||
|
|
@ -292,7 +277,6 @@ static bool gles2_texture_get_dmabuf_size(struct wlr_texture *texture, struct
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
static void gles2_texture_get_buffer_size(struct wlr_texture *texture, struct
|
||||
wl_resource *resource, int *width, int *height) {
|
||||
struct wl_shm_buffer *buffer = wl_shm_buffer_get(resource);
|
||||
|
|
@ -349,7 +333,6 @@ static struct wlr_texture_impl wlr_texture_impl = {
|
|||
.upload_drm = gles2_texture_upload_drm,
|
||||
.upload_dmabuf = gles2_texture_upload_dmabuf,
|
||||
.upload_eglimage = gles2_texture_upload_eglimage,
|
||||
.get_matrix = gles2_texture_get_matrix,
|
||||
.get_buffer_size = gles2_texture_get_buffer_size,
|
||||
.bind = gles2_texture_bind,
|
||||
.destroy = gles2_texture_destroy,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue