[PATCH weston] compositor: automatically set opaque region for color formats
ppaalanen at gmail.com
Thu Sep 6 23:18:14 PDT 2012
On Thu, 6 Sep 2012 11:10:39 -0400
Kristian Høgsberg <hoegsberg at gmail.com> wrote:
> On Wed, Sep 05, 2012 at 09:36:59AM +0300, Pekka Paalanen wrote:
> > Some color formats are naturally opaque: RGB, XRGB, YUV formats without
> > A channel. For these, automatically set the opaque region to whole
> > surface.
> > Note:
> > If a client first sends a buffer with opaque color format, and then
> > sends another buffer of the same size but with non-opaque color format,
> > the opaque region in the server is no longer what the client expects
> > based on protocol: it has been changed from what the client earlier
> > specified into whole surface. Therefore this is a protocol change.
> > ---
> > This patch has been only compile-tested, because I'm not sure we can do
> > it like this, and temporary opaque region setup would be more complex.
> > Kristian, do we really want to go there?
> We do want to make sure we can disable blend when possible and clip
> obscured changes, regardless of whether or not the client sets the
> opaque region. But maybe not this way... I think we can do it in
> weston_surface_draw(), where we compute the surface_blend region.
In weston_surface_draw() we certainly can disable blending as
appropriate, but clipping obscured damage must be done earlier by
somehow changing the opaque region going into the damage/clip/repaint
> I'm working on abstracting out the gles2 rendering code, so let's put
> this off for just a couple of days.
Oh, cool! I've been aching to get compositor.c shorter. :-)
More information about the wayland-devel