Re: [PATCH] protocol: Add buffer_scale to wl_surface and wl_output

2013-05-15 Thread Bill Spitzak
Alexander Larsson wrote: In fact, working on this in weston a bit it seems that in general, scale is seldom used by itself but rather its used to calculate the buffer and screen size which are then used, and we want both of these to be integers. So, it seems to me that we should specify scaling

Re: [PATCH] protocol: Add buffer_scale to wl_surface and wl_output

2013-05-15 Thread Alex Deucher
On Wed, May 15, 2013 at 9:11 AM, Alexander Larsson wrote: > On ons, 2013-05-15 at 11:13 +0300, Pekka Paalanen wrote: >> On Tue, 14 May 2013 12:26:48 +0200 >> al...@redhat.com wrote: > > Lots of good stuff snipped. I'll try to fix things up based on that. > Some responses below. > >> > + >> >

Re: [PATCH] protocol: Add buffer_scale to wl_surface and wl_output

2013-05-15 Thread Alexander Larsson
On ons, 2013-05-15 at 11:13 +0300, Pekka Paalanen wrote: > On Tue, 14 May 2013 12:26:48 +0200 > al...@redhat.com wrote: Lots of good stuff snipped. I'll try to fix things up based on that. Some responses below. > > + > > + > > Are you sure you really want fixed as the type? > Integer

Re: [PATCH] protocol: Add buffer_scale to wl_surface and wl_output

2013-05-15 Thread Pekka Paalanen
On Tue, 14 May 2013 12:26:48 +0200 al...@redhat.com wrote: > From: Alexander Larsson > > This adds wl_surface_set_buffer_scale() to set the buffer scale of a > surface. > > It is similar to set_buffer_transform that the buffer is stored in a > way that has been transformed (in this case scaled)

Re: [PATCH] protocol: Add buffer_scale to wl_surface and wl_output

2013-05-14 Thread Alexander Larsson
On tis, 2013-05-14 at 13:43 -0700, Bill Spitzak wrote: > al...@redhat.com wrote: > > > + > > + > > + > > > > Fixed is not a good idea for scaling factors. You cannot accurately > represent values like 2/3 or 1/fixed. For an actual problem with > scaling, if the accurate sca

Re: [PATCH] protocol: Add buffer_scale to wl_surface and wl_output

2013-05-14 Thread Pekka Paalanen
On Tue, 14 May 2013 13:43:12 -0700 Bill Spitzak wrote: > You may also want to allow different horizontal and vertical scales, > mostly because all plausable implementations can do this with no loss of > speed, and the scaler api allows this. You will need to define if this > is before or after

Re: [PATCH] protocol: Add buffer_scale to wl_surface and wl_output

2013-05-14 Thread Bill Spitzak
al...@redhat.com wrote: + + + Fixed is not a good idea for scaling factors. You cannot accurately represent values like 2/3 or 1/fixed. For an actual problem with scaling, if the accurate scaling is an odd fixed number, the client cannot specify that their scale is exac

Re: [PATCH] protocol: Add buffer_scale to wl_surface and wl_output

2013-05-14 Thread Bill Spitzak
John Kåre Alsaker wrote: On Tue, May 14, 2013 at 2:51 PM, Alexander Larsson > wrote: On tis, 2013-05-14 at 13:44 +0200, John Kåre Alsaker wrote: > I'd only accept a proposal which makes the clients tell the compositor > how much they increased the siz

Re: [PATCH] protocol: Add buffer_scale to wl_surface and wl_output

2013-05-14 Thread John Kåre Alsaker
On Tue, May 14, 2013 at 2:51 PM, Alexander Larsson wrote: > On tis, 2013-05-14 at 13:44 +0200, John Kåre Alsaker wrote: > > I'd only accept a proposal which makes the clients tell the compositor > > how much they increased the size of their window. If the compositor > > wants to resize anything i

Re: [PATCH] protocol: Add buffer_scale to wl_surface and wl_output

2013-05-14 Thread Alexander Larsson
On tis, 2013-05-14 at 13:44 +0200, John Kåre Alsaker wrote: > I'd only accept a proposal which makes the clients tell the compositor > how much they increased the size of their window. If the compositor > wants to resize anything it should resize the entire window and not > individual surfaces/buff

Re: [PATCH] protocol: Add buffer_scale to wl_surface and wl_output

2013-05-14 Thread John Kåre Alsaker
I'd only accept a proposal which makes the clients tell the compositor how much they increased the size of their window. If the compositor wants to resize anything it should resize the entire window and not individual surfaces/buffers. This also avoids having to position subsurfaces and have config

[PATCH] protocol: Add buffer_scale to wl_surface and wl_output

2013-05-14 Thread alexl
From: Alexander Larsson This adds wl_surface_set_buffer_scale() to set the buffer scale of a surface. It is similar to set_buffer_transform that the buffer is stored in a way that has been transformed (in this case scaled). This means that if an output is scaled we can directly use the pre-scale