@ -1561,6 +1561,7 @@ drm_output_render(struct drm_output_state *state, pixman_region32_t *damage)
struct drm_output * output = state - > output ;
struct drm_output * output = state - > output ;
struct weston_compositor * c = output - > base . compositor ;
struct weston_compositor * c = output - > base . compositor ;
struct drm_plane_state * scanout_state ;
struct drm_plane_state * scanout_state ;
struct drm_plane * scanout_plane = output - > scanout_plane ;
struct drm_backend * b = to_drm_backend ( c ) ;
struct drm_backend * b = to_drm_backend ( c ) ;
struct drm_fb * fb ;
struct drm_fb * fb ;
@ -1571,10 +1572,20 @@ drm_output_render(struct drm_output_state *state, pixman_region32_t *damage)
if ( scanout_state - > fb )
if ( scanout_state - > fb )
return ;
return ;
if ( b - > use_pixman )
if ( ! pixman_region32_not_empty ( damage ) & &
scanout_plane - > state_cur - > fb & &
( scanout_plane - > state_cur - > fb - > type = = BUFFER_GBM_SURFACE | |
scanout_plane - > state_cur - > fb - > type = = BUFFER_PIXMAN_DUMB ) & &
scanout_plane - > state_cur - > fb - > width = =
output - > base . current_mode - > width & &
scanout_plane - > state_cur - > fb - > height = =
output - > base . current_mode - > height ) {
fb = drm_fb_ref ( scanout_plane - > state_cur - > fb ) ;
} else if ( b - > use_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 ) ;
}
if ( ! fb ) {
if ( ! fb ) {
drm_plane_state_put_back ( scanout_state ) ;
drm_plane_state_put_back ( scanout_state ) ;