On Dec 6, 2007 9:56 AM, Carl Worth <[EMAIL PROTECTED]> wrote: > On Thu, 06 Dec 2007 09:44:55 +0100, Denis Oliver Kropp wrote: > > Carl Worth wrote: > > > For interleaving cairo and non-cairo rendering, cairo provides the > > > cairo_surface_flush and cairo_surface_mark_dirty APIs. Does > > > cairo-directfb implement those and does your application use them. > > > > Thanks for the pointer. The cairo-directfb backend seems to do nothing > > in these functions. I'm not sure what it's supposed to do. Should the > > first accumulate a region to flip and the second actually flips? > > I don't know how cairo-directfb surface is implemented exactly. So > I'll describe the general concepts and then illustrate them by way of > a fictitious "shadow" backend that is implemented with a > cairo-image-surface internally and can copy back and forth between > that and some underlying "system" object. > > When an application wants to switch from cairo- to non-cairo-based > drawing it should call cairo_surface_flush. In this case, our shadow > backend would copy its state from the image surface to the underlying > system. (Ideally it would copy a minimal region based on the extents > of cairo drawing operations that have occurred, but cairo's current > backend interfaces don't make it easy to know this. But there would be > no API impact from improving that.) > > Then, when an application wants to switch back from non-cairo- to > cairo-based drawing it should call cairo_surface_mark_dirty_rectangle > one or more times. Our shadow backend would accumulate a region from > these rectangles and before the next cairo drawing operation would > copy that region from the system to the image surface. > > Does that make sense? > > -Carl >
Yes Carl this support was added after I stopped actively working on the Cairo DFB backend. When we have a format mismatch then a shadow may be the right answer. Note for directfb you can ask for a different buffer format i.e ARGB for a window. But we probably still want to use dirty regions for flipping. I don't think your getting all of the emails on the topic but it finally looks like a lot of people are looking at the problem. So for now lets see how this resolves. I know I pulled my hair out on it for a while :) _______________________________________________ directfb-dev mailing list directfb-dev@directfb.org http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev