diff --git a/libweston/backend-drm/drm-gbm.c b/libweston/backend-drm/drm-gbm.c index c8c84fd1..76fa79f8 100644 --- a/libweston/backend-drm/drm-gbm.c +++ b/libweston/backend-drm/drm-gbm.c @@ -315,69 +315,3 @@ drm_output_render_gl(struct drm_output_state *state, pixman_region32_t *damage) return ret; } - -static void -switch_to_gl_renderer(struct drm_backend *b) -{ - struct drm_device *device = b->drm; - struct drm_output *output; - bool dmabuf_support_inited; - bool linux_explicit_sync_inited; - - if (!b->use_pixman) - return; - - dmabuf_support_inited = !!b->compositor->renderer->import_dmabuf; - linux_explicit_sync_inited = - b->compositor->capabilities & WESTON_CAP_EXPLICIT_SYNC; - - weston_log("Switching to GL renderer\n"); - - b->gbm = create_gbm_device(device->drm.fd); - if (!b->gbm) { - weston_log("Failed to create gbm device. " - "Aborting renderer switch\n"); - return; - } - - wl_list_for_each(output, &b->compositor->output_list, base.link) - pixman_renderer_output_destroy(&output->base); - - b->compositor->renderer->destroy(b->compositor); - - if (drm_backend_create_gl_renderer(b) < 0) { - gbm_device_destroy(b->gbm); - weston_log("Failed to create GL renderer. Quitting.\n"); - /* FIXME: we need a function to shutdown cleanly */ - assert(0); - } - - wl_list_for_each(output, &b->compositor->output_list, base.link) - drm_output_init_egl(output, b); - - b->use_pixman = 0; - - if (!dmabuf_support_inited && b->compositor->renderer->import_dmabuf) { - if (linux_dmabuf_setup(b->compositor) < 0) - weston_log("Error: initializing dmabuf " - "support failed.\n"); - } - - if (!linux_explicit_sync_inited && - (b->compositor->capabilities & WESTON_CAP_EXPLICIT_SYNC)) { - if (linux_explicit_synchronization_setup(b->compositor) < 0) - weston_log("Error: initializing explicit " - " synchronization support failed.\n"); - } -} - -void -renderer_switch_binding(struct weston_keyboard *keyboard, - const struct timespec *time, uint32_t key, void *data) -{ - struct drm_backend *b = - to_drm_backend(keyboard->seat->compositor); - - switch_to_gl_renderer(b); -} - diff --git a/libweston/backend-drm/drm-internal.h b/libweston/backend-drm/drm-internal.h index 3fc5f9b9..5bf825a8 100644 --- a/libweston/backend-drm/drm-internal.h +++ b/libweston/backend-drm/drm-internal.h @@ -867,9 +867,6 @@ drm_output_fini_egl(struct drm_output *output); struct drm_fb * drm_output_render_gl(struct drm_output_state *state, pixman_region32_t *damage); -void -renderer_switch_binding(struct weston_keyboard *keyboard, - const struct timespec *time, uint32_t key, void *data); #else inline static int init_egl(struct drm_backend *b) @@ -894,11 +891,4 @@ drm_output_render_gl(struct drm_output_state *state, pixman_region32_t *damage) { return NULL; } - -inline static void -renderer_switch_binding(struct weston_keyboard *keyboard, - const struct timespec *time, uint32_t key, void *data) -{ - weston_log("Compiled without GBM/EGL support\n"); -} #endif diff --git a/libweston/backend-drm/drm.c b/libweston/backend-drm/drm.c index 96f0166f..c8bec7e4 100644 --- a/libweston/backend-drm/drm.c +++ b/libweston/backend-drm/drm.c @@ -3239,8 +3239,6 @@ drm_backend_create(struct weston_compositor *compositor, planes_binding, b); weston_compositor_add_debug_binding(compositor, KEY_Q, recorder_binding, b); - weston_compositor_add_debug_binding(compositor, KEY_W, - renderer_switch_binding, b); if (compositor->renderer->import_dmabuf) { if (linux_dmabuf_setup(compositor) < 0) diff --git a/libweston/backend-drm/state-propose.c b/libweston/backend-drm/state-propose.c index a6adfb35..967b6bd0 100644 --- a/libweston/backend-drm/state-propose.c +++ b/libweston/backend-drm/state-propose.c @@ -979,14 +979,7 @@ drm_assign_planes(struct weston_output *output_base) pnode->try_view_on_plane_failure_reasons = FAILURE_REASONS_NONE; /* Test whether this buffer can ever go into a plane: - * non-shm, or small enough to be a cursor. - * - * FIXME: Also, we should keep a reference when using the - * pixman renderer. That makes it possible to do a seamless - * switch to the GL renderer and since the pixman renderer - * keeps a reference to the buffer anyway, there is no side - * effects. - */ + * non-shm, or small enough to be a cursor. */ ev->surface->keep_buffer = false; if (weston_view_has_valid_buffer(ev)) { struct weston_buffer *buffer = diff --git a/libweston/renderer-gl/gl-renderer.c b/libweston/renderer-gl/gl-renderer.c index 5f1cfab5..5419c191 100644 --- a/libweston/renderer-gl/gl-renderer.c +++ b/libweston/renderer-gl/gl-renderer.c @@ -1011,9 +1011,6 @@ draw_paint_node(struct weston_paint_node *pnode, GLint filter; struct gl_shader_config sconf; - /* In case of a runtime switch of renderers, we may not have received - * an attach for this surface since the switch. In that case we don't - * have a valid buffer or a proper shader set up so skip rendering. */ if (gb->shader_variant == SHADER_VARIANT_NONE && !buffer->direct_display) return; diff --git a/man/weston-bindings.man b/man/weston-bindings.man index 1cd39f7d..398bec25 100644 --- a/man/weston-bindings.man +++ b/man/weston-bindings.man @@ -130,10 +130,6 @@ Enable/Disable overlay planes. .RS 4 Start VAAPI recorder. .RE -- KEY_W : -.RS 4 -Switch to gl-renderer from pixman. -.RE - KEY_S : .RS 4 Enable fragment debugging for gl-renderer. @@ -144,7 +140,7 @@ Enable fan debugging for gl-renderer. .RE - KEY_R : .RS 4 -Enable repaint debugging for pixman: +Enable repaint debugging for Pixman. .RE .RE