[PATCH] Move window frame surface dimensions into struct display and begin using them in place of hardcoded values

Chris Morgan chmorgan at gmail.com
Mon Feb 7 17:11:30 PST 2011


2011/2/7 Kristian Høgsberg <krh at bitplanet.net>:
> On Sun, Feb 6, 2011 at 11:14 PM, Chris Morgan <chmorgan at gmail.com> wrote:
>>  clients/window.c |   44 +++++++++++++++++++++++++++++++++++---------
>>  1 files changed, 35 insertions(+), 9 deletions(-)
>
> Hi Chris,
>
> I was thinking that we could introduce a struct frame type-of-thing
> that could hold the different frame details - the cairo surfaces, the
> dimensions etc.  And please follow the coding conventions in the code.
>
> Kristian
>

Would there be one of those things for each of the frame surfaces?

After looking more at the code I'm wondering if we shouldn't just
render the frame and decorations on demand. Some of the difficulty
comes from the tile_source() and tile_mask() code needing to know the
window border width found in 'struct window' as well as the frame
dimensions. Plus the cairo to draw the frames appears to be quite a
bit simpler than the masking code. Is the concern the performance in
drawing? Maybe it isn't a big deal with card acceleration?

Chris


More information about the wayland-devel mailing list