All, I have been implementing primary layer hooks, in the ST driver for our SoC's, to support many of the DFB layer options on the framebuffer's hardware display plane (one of many in our systems). However I have come across a problem when changing the layer configuration, after it has originally been set, via the layer interface when in the administrative cooperation state (e.g. using layer->SetOpacity). The problem is that the code in src/core/layer_region.c dfb_layer_region_set_configuration only changes the hardware state if the layer's primary region is in a realized state. This is different from _dfb_layer_region_surface_listener in the same file, used to change the layer configuration as a result of say a surface SetAlphaRamp or SetPalette call, which changes the hardware if the primary region is in either a realized or configured state. This logic appears on the surface (no pun intended) to be inconsistent.
I have attached a patch which makes my test application do what I would expect it to do, but I am very unsure about it as I do not understand the relationship between layers, layer regions and surfaces. It is unclear why, when you have a primary surface visible on the primary layer, the primary layer region is in a configured but not a realized state. The relevant bits of the application code are below, it seems that something like this should just work. DFBCHECK(DirectFBCreate( &dfb )); DFBCHECK(dfb->SetCooperativeLevel( dfb, DFSCL_FULLSCREEN )); dsc.flags = DSDESC_CAPS | DSDESC_PIXELFORMAT; dsc.caps = DSCAPS_PRIMARY | DSCAPS_PREMULTIPLIED; dsc.pixelformat = DSPF_ARGB4444; DFBCHECK(dfb->CreateSurface(dfb, &dsc, &primary)); DFBCHECK(dfb->GetDisplayLayer(dfb, DLID_PRIMARY, &layer)); DFBCHECK(layer->SetCooperativeLevel( layer, DLSCL_ADMINISTRATIVE)); DFBCHECK(layer->SetOpacity(layer,128)); What am I doing wrong, given that I do not want, and believe I should not need, to put the layer into exclusive mode and use the layer surface directly? Regards, -stephen
DirectFB-1.0.0-rc4_set_configuration_hack.patch
Description: Binary data
_______________________________________________ directfb-dev mailing list [email protected] http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev
