The IDirectFBDisplayLayer::GetSurface function's docs they that it is intended to only be used when the display layer cooperative level is DLSCL_EXCLUSIVE.
However, the implementation appears to be designed for it to be used also (potentially if needed) when the level is also DLSCL_ADMINISTRATIVE. It also currently even allows usage when it is DLSCL_SHARED. 1. What's the intent for this function long term? Should the documentation be updated to state that DLSCL_ADMINISTRATIVE is also allowed? 2. Why is DLSCL_SHARED being allowed temporarily and should it be kept that way? In the current implementation, I believe the following fix in src/display/idirectfbdisplaylayer.c's IDirectFBDisplayLayer_GetSurface function is needed to change the logic of when dfb_layer_region_flip_update is called for a single buffered display layer to be first made visible AND to not always perform a clear/background rendering if the GetSurface function is called multiple times. if (region->config.buffermode == DLBM_FRONTONLY && data->level != DLSCL_SHARED && D_FLAGS_IS_SET( region->state, CLRSF_FROZEN )) { if (data->level == DLSCL_EXCLUSIVE) { // Is this still needed if dfb_windowstack_repaint_all is // called below? Probably just in case there is legacy // code depending upon it and the surface buffer memory is // not cleared when it is allocated. surface->Clear( surface, 0, 0, 0, 0 ); } // If a window stack is available, give it the opportunity to // render the background (optionally based on configuration) and // flip the display layer so it is visible. Otherwise, just // directly flip the display make and make it visible. if (region->context->stack) { dfb_windowstack_repaint_all( region->context->stack ); } else { dfb_layer_region_flip_update( region, NULL, DSFLIP_NONE ); } } Thoughts? Best Regards, Timothy -- Timothy Strelchun CE Software Engineering Digital Home Group Intel Corporation The views expressed above are my own and not those of Intel _______________________________________________ directfb-dev mailing list directfb-dev@directfb.org http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev