Hi Guys, I have been looking at the differences between DirectFB's FBdev subsystem between version 1.0.0 and 1.0.1, and I believe I have found a bug.
When a graphics driver has its own primary layer hooks implementation, and then defers to fbdev for primarySetRegion(), dfb_fbdev_set_mode() is called unnecessarily. The original implementation in DFB1.0.0 would only call dfb_fbdev_set_mode() if a flag indicated a change, however now that dfb_fbdev_set_mode() is in the default case of a switch statement, it is always called regardless. This has the side effect of resetting the panning, when features implemented in the graphics driver are called such as setting opacity. The Git tree shows the change on the following commitdiff titled "Add source rectangle support to fbdev layer." http://git.directfb.org/?p=core/DirectFB.git;a=commitdiff;h=18e71c700d6d6dea3981da42118639f298afe3e8#patch1 The following patch returns the original expected behaviour, whilst continuing the new source rectangle support. -- Cheers Kieran Bingham Index: DirectFB-1.0.1/systems/fbdev/fbdev.c =================================================================== --- DirectFB-1.0.1.orig/systems/fbdev/fbdev.c 2007-08-31 17:37: 38.000000000 +0100 +++ DirectFB-1.0.1/systems/fbdev/fbdev.c 2007-08-31 17:39: 43.000000000 +0100 @@ -1321,24 +1321,26 @@ if (!highest) return DFB_UNSUPPORTED; - switch (updated & (CLRCF_BUFFERMODE | CLRCF_FORMAT | CLRCF_HEIGHT | + if (updated & (CLRCF_BUFFERMODE | CLRCF_FORMAT | CLRCF_HEIGHT | CLRCF_SURFACE | CLRCF_WIDTH | CLRCF_SOURCE)) { - case CLRCF_SOURCE: - if (config->source.w == shared->current_mode.xres && - config->source.h == shared->current_mode.yres) { - ret = dfb_fbdev_pan( config->source.x, - surface->front_buffer->video.offset / - surface->front_buffer->video.pitch + config->source.y, - true ); - if (ret) - return ret; - break; - } - /* fall through */ - default: - ret = dfb_fbdev_set_mode( surface, highest, config ); - if (ret) - return ret; + switch (updated) { + case CLRCF_SOURCE: + if (config->source.w == shared->current_mode.xres && + config->source.h == shared->current_mode.yres) { + ret = dfb_fbdev_pan( config-> source.x, + surface->front_buffer->video.offset/ + surface->front_buffer->video.pitch+ config-> source.y, + true ); + if (ret) + return ret; + break; + } + /* fall through */ + default: + ret = dfb_fbdev_set_mode( surface, highest, config ); + if (ret) + return ret; + } } if ((updated & CLRCF_PALETTE) && palette)
_______________________________________________ directfb-dev mailing list [email protected] http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev
