aboutsummaryrefslogtreecommitdiff
path: root/backend/drm
diff options
context:
space:
mode:
authornyorain <nyorain@gmail.com>2017-08-08 18:02:14 +0200
committernyorain <nyorain@gmail.com>2017-08-08 18:25:16 +0200
commite167f41fde7532ca453a9a70ad1e3f27d7177071 (patch)
treefb4f62dc4fcd4017db8695fc99a0e7ade8d6d80b /backend/drm
parentafd058b754e568728fbc7e2e34651dab9a8a827f (diff)
Rename wlr_surface -> wlr_texture; attach -> upload
Diffstat (limited to 'backend/drm')
-rw-r--r--backend/drm/drm.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index 700eb554..c4834081 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -224,8 +224,8 @@ static void wlr_drm_plane_renderer_free(struct wlr_drm_renderer *renderer,
gbm_surface_destroy(plane->gbm);
}
- if (plane->wlr_surf) {
- wlr_surface_destroy(plane->wlr_surf);
+ if (plane->wlr_tex) {
+ wlr_texture_destroy(plane->wlr_tex);
}
if (plane->wlr_rend) {
wlr_renderer_destroy(plane->wlr_rend);
@@ -241,7 +241,7 @@ static void wlr_drm_plane_renderer_free(struct wlr_drm_renderer *renderer,
plane->front = NULL;
plane->back = NULL;
plane->wlr_rend = NULL;
- plane->wlr_surf = NULL;
+ plane->wlr_tex = NULL;
plane->cursor_bo = NULL;
}
@@ -605,7 +605,7 @@ static bool wlr_drm_output_set_cursor(struct wlr_output_state *output,
// OpenGL will read the pixels out upside down,
// so we need to flip the image vertically
- wlr_matrix_surface(plane->matrix, plane->width, plane->height,
+ wlr_matrix_texture(plane->matrix, plane->width, plane->height,
output->base->transform ^ WL_OUTPUT_TRANSFORM_FLIPPED_180);
plane->wlr_rend = wlr_gles2_renderer_init();
@@ -613,8 +613,8 @@ static bool wlr_drm_output_set_cursor(struct wlr_output_state *output,
return false;
}
- plane->wlr_surf = wlr_render_surface_init(plane->wlr_rend);
- if (!plane->wlr_surf) {
+ plane->wlr_tex = wlr_render_texture_init(plane->wlr_rend);
+ if (!plane->wlr_tex) {
return false;
}
}
@@ -633,7 +633,7 @@ static bool wlr_drm_output_set_cursor(struct wlr_output_state *output,
wlr_drm_plane_make_current(renderer, plane);
- wlr_surface_attach_pixels(plane->wlr_surf, WL_SHM_FORMAT_ARGB8888,
+ wlr_texture_upload_pixels(plane->wlr_tex, WL_SHM_FORMAT_ARGB8888,
stride, width, height, buf);
glViewport(0, 0, plane->width, plane->height);
@@ -641,8 +641,8 @@ static bool wlr_drm_output_set_cursor(struct wlr_output_state *output,
glClear(GL_COLOR_BUFFER_BIT);
float matrix[16];
- wlr_surface_get_matrix(plane->wlr_surf, &matrix, &plane->matrix, 0, 0);
- wlr_render_with_matrix(plane->wlr_rend, plane->wlr_surf, &matrix);
+ wlr_texture_get_matrix(plane->wlr_tex, &matrix, &plane->matrix, 0, 0);
+ wlr_render_with_matrix(plane->wlr_rend, plane->wlr_tex, &matrix);
glFinish();
glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, bo_stride);