compositor-drm: alow scanning out of buffers with XRGB8888 format
This commit is contained in:
committed by
Kristian Høgsberg
parent
555c17ddd8
commit
a64b15d160
@@ -238,10 +238,6 @@ drm_output_prepare_scanout_surface(struct drm_output *output)
|
||||
es = container_of(c->base.surface_list.next,
|
||||
struct weston_surface, link);
|
||||
|
||||
/* Need to verify output->region contained in surface opaque
|
||||
* region. Or maybe just that format doesn't have alpha. */
|
||||
return -1;
|
||||
|
||||
if (es->geometry.x != output->base.x ||
|
||||
es->geometry.y != output->base.y ||
|
||||
es->geometry.width != output->base.current->width ||
|
||||
@@ -256,6 +252,14 @@ drm_output_prepare_scanout_surface(struct drm_output *output)
|
||||
es->geometry.height,
|
||||
GBM_BO_USE_SCANOUT);
|
||||
|
||||
/* Need to verify output->region contained in surface opaque
|
||||
* region. Or maybe just that format doesn't have alpha.
|
||||
* For now, scanout only if format is XRGB8888. */
|
||||
if (gbm_bo_get_format(bo) != GBM_FORMAT_XRGB8888) {
|
||||
gbm_bo_destroy(bo);
|
||||
return -1;
|
||||
}
|
||||
|
||||
output->next = drm_fb_get_from_bo(bo, output);
|
||||
if (!output->next) {
|
||||
gbm_bo_destroy(bo);
|
||||
|
||||
Reference in New Issue
Block a user