backend-drm: drop use_pixman from drm_backend
Now that the renderer type is stored in struct weston_renderer, use that instead of use_pixman to determine the renderer type. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
This commit is contained in:
parent
51c8882991
commit
a9c1b41f3f
|
@ -327,7 +327,6 @@ struct drm_backend {
|
||||||
struct wl_listener session_listener;
|
struct wl_listener session_listener;
|
||||||
uint32_t gbm_format;
|
uint32_t gbm_format;
|
||||||
|
|
||||||
bool use_pixman;
|
|
||||||
bool use_pixman_shadow;
|
bool use_pixman_shadow;
|
||||||
|
|
||||||
struct udev_input input;
|
struct udev_input input;
|
||||||
|
|
|
@ -274,7 +274,7 @@ drm_virtual_output_enable(struct weston_output *output_base)
|
||||||
|
|
||||||
assert(output->virtual);
|
assert(output->virtual);
|
||||||
|
|
||||||
if (b->use_pixman) {
|
if (output_base->compositor->renderer->type == WESTON_RENDERER_PIXMAN) {
|
||||||
weston_log("Not support pixman renderer on Virtual output\n");
|
weston_log("Not support pixman renderer on Virtual output\n");
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
|
@ -365,7 +365,6 @@ drm_output_render(struct drm_output_state *state, pixman_region32_t *damage)
|
||||||
struct drm_plane *scanout_plane = output->scanout_plane;
|
struct drm_plane *scanout_plane = output->scanout_plane;
|
||||||
struct drm_property_info *damage_info =
|
struct drm_property_info *damage_info =
|
||||||
&scanout_plane->props[WDRM_PLANE_FB_DAMAGE_CLIPS];
|
&scanout_plane->props[WDRM_PLANE_FB_DAMAGE_CLIPS];
|
||||||
struct drm_backend *b = device->backend;
|
|
||||||
struct drm_fb *fb;
|
struct drm_fb *fb;
|
||||||
pixman_region32_t scanout_damage;
|
pixman_region32_t scanout_damage;
|
||||||
pixman_box32_t *rects;
|
pixman_box32_t *rects;
|
||||||
|
@ -391,7 +390,7 @@ drm_output_render(struct drm_output_state *state, pixman_region32_t *damage)
|
||||||
(scanout_plane->state_cur->fb->type == BUFFER_GBM_SURFACE ||
|
(scanout_plane->state_cur->fb->type == BUFFER_GBM_SURFACE ||
|
||||||
scanout_plane->state_cur->fb->type == BUFFER_PIXMAN_DUMB)) {
|
scanout_plane->state_cur->fb->type == BUFFER_PIXMAN_DUMB)) {
|
||||||
fb = drm_fb_ref(scanout_plane->state_cur->fb);
|
fb = drm_fb_ref(scanout_plane->state_cur->fb);
|
||||||
} else if (b->use_pixman) {
|
} else if (c->renderer->type == WESTON_RENDERER_PIXMAN) {
|
||||||
fb = drm_output_render_pixman(state, damage);
|
fb = drm_output_render_pixman(state, damage);
|
||||||
} else {
|
} else {
|
||||||
fb = drm_output_render_gl(state, damage);
|
fb = drm_output_render_gl(state, damage);
|
||||||
|
@ -733,7 +732,7 @@ drm_output_apply_mode(struct drm_output *output)
|
||||||
*/
|
*/
|
||||||
device->state_invalid = true;
|
device->state_invalid = true;
|
||||||
|
|
||||||
if (b->use_pixman) {
|
if (b->compositor->renderer->type == WESTON_RENDERER_PIXMAN) {
|
||||||
drm_output_fini_pixman(output);
|
drm_output_fini_pixman(output);
|
||||||
if (drm_output_init_pixman(output, b) < 0) {
|
if (drm_output_init_pixman(output, b) < 0) {
|
||||||
weston_log("failed to init output pixman state with "
|
weston_log("failed to init output pixman state with "
|
||||||
|
@ -1904,7 +1903,7 @@ drm_output_enable(struct weston_output *base)
|
||||||
if (b->pageflip_timeout)
|
if (b->pageflip_timeout)
|
||||||
drm_output_pageflip_timer_create(output);
|
drm_output_pageflip_timer_create(output);
|
||||||
|
|
||||||
if (b->use_pixman) {
|
if (b->compositor->renderer->type == WESTON_RENDERER_PIXMAN) {
|
||||||
if (drm_output_init_pixman(output, b) < 0) {
|
if (drm_output_init_pixman(output, b) < 0) {
|
||||||
weston_log("Failed to init output pixman state\n");
|
weston_log("Failed to init output pixman state\n");
|
||||||
goto err_planes;
|
goto err_planes;
|
||||||
|
@ -1950,7 +1949,7 @@ drm_output_deinit(struct weston_output *base)
|
||||||
drm_pending_state_apply_sync(pending);
|
drm_pending_state_apply_sync(pending);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (b->use_pixman)
|
if (b->compositor->renderer->type == WESTON_RENDERER_PIXMAN)
|
||||||
drm_output_fini_pixman(output);
|
drm_output_fini_pixman(output);
|
||||||
else
|
else
|
||||||
drm_output_fini_egl(output);
|
drm_output_fini_egl(output);
|
||||||
|
@ -3158,7 +3157,6 @@ drm_backend_create(struct weston_compositor *compositor,
|
||||||
b->drm = device;
|
b->drm = device;
|
||||||
|
|
||||||
b->compositor = compositor;
|
b->compositor = compositor;
|
||||||
b->use_pixman = config->use_pixman;
|
|
||||||
b->pageflip_timeout = config->pageflip_timeout;
|
b->pageflip_timeout = config->pageflip_timeout;
|
||||||
b->use_pixman_shadow = config->use_pixman_shadow;
|
b->use_pixman_shadow = config->use_pixman_shadow;
|
||||||
|
|
||||||
|
@ -3203,7 +3201,7 @@ drm_backend_create(struct weston_compositor *compositor,
|
||||||
goto err_udev_dev;
|
goto err_udev_dev;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (b->use_pixman) {
|
if (config->use_pixman) {
|
||||||
if (init_pixman(b) < 0) {
|
if (init_pixman(b) < 0) {
|
||||||
weston_log("failed to initialize pixman renderer\n");
|
weston_log("failed to initialize pixman renderer\n");
|
||||||
goto err_udev_dev;
|
goto err_udev_dev;
|
||||||
|
|
|
@ -1343,7 +1343,7 @@ drm_pending_state_apply(struct drm_pending_state *pending_state)
|
||||||
drm_output_state_free(output->state_cur);
|
drm_output_state_free(output->state_cur);
|
||||||
output->state_cur = drm_output_state_alloc(output, NULL);
|
output->state_cur = drm_output_state_alloc(output, NULL);
|
||||||
device->state_invalid = true;
|
device->state_invalid = true;
|
||||||
if (!b->use_pixman) {
|
if (b->compositor->renderer->type == WESTON_RENDERER_GL) {
|
||||||
drm_output_fini_egl(output);
|
drm_output_fini_egl(output);
|
||||||
drm_output_init_egl(output, b);
|
drm_output_init_egl(output, b);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue