On Tue, Feb 28, 2012 at 1:19 PM, Jesse Barnes <jbar...@virtuousgeek.org> wrote:
> On Tue, 28 Feb 2012 13:52:21 +0200
> Tiago Vignatti <tiago.vigna...@intel.com> wrote:
>> @@ -907,11 +912,76 @@ sprite_handle_pending_buffer_destroy(struct 
>> wl_listener *listener,
>>       sprite->pending_surface = NULL;
>>  }
>>
>> +static void
>> +drm_set_backlight(struct weston_output *output_base, uint32_t up_down)
>> +{
>> +     struct drm_output *output = (struct drm_output *) output_base;
>> +     long brightness;
>> +
>> +     if (!output->backlight)
>> +             return;
>> +
>> +     /* I know, very very rudimentary logic for turning brighter/darker.
>> +      * Maybe we should normalize brightness value to have a scale say from
>> +      * 1 to 10 or something. */
>
> So if it's just up & down, why not make an enum to make the code
> clearer?  Then you don't need the last else clause too.

I was thinking that instead of up_down, we could just have an
well-defined range or a float 0-1 and have theweston_output
set_backlight interface take an absolute value in that range.  That
was we can actually make shell.c dim the backlight on idle and restore
it to what it was on activity.

Kristian
_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to