On 02/04/2015 05:13 AM, Emil Velikov wrote:
> On 4 February 2015 at 06:20, Tapani Pälli <[email protected]> wrote:
>>
>>
>> On 02/03/2015 07:32 PM, Emil Velikov wrote:
>>>
>>> On 2 February 2015 at 13:08, Tapani Pälli <[email protected]> wrote:
>>>>
>>>> Patch introduces a new API that enables application to register
>>>> a callback to be called when swapbuffers has finished. This can be
>>>> used to throttle rendering loop.
>>>>
>>> [...]
>>>>
>>>> @@ -173,6 +174,9 @@ bool
>>>>   waffle_is_extension_in_string(const char *extension_string,
>>>>                                 const char *extension_name);
>>>>
>>>> +bool
>>>> +waffle_register_swap_callback(waffle_swapbuffers_cb func);
>>>> +
>>>
>>> Perhaps inlining the typedef in there, and wrapping it in
>>> WAFFLE_API_VERSION (alongside the function prototype) ?
>>
>>
>> I put it in separate header so that wcore_platform.h would not need to
>> include whole "waffle.h" but if that feels ok then typedef can be moved
>> here.
>>
> Hmm good point. I would leave the final decision to Chad, but imho
> things will be better if we're compacted.

If we do add this function to the public API, let's put into the main
waffle.h. Like Emil said, let's keep the public headers "compacted".

>>> Fwiw changing the func prototype to something like the following will
>>> be more consistent, and less likely to abuse.
>>>
>>> bool
>>> waffle_window_register_swap_callback(struct waffle_window *window,
>>> waffle_swapbuffers_cb func);
>>
>>
>> This means that callback would be window specific. I think this is ok,
>> although then user needs to register callback for each window separately and
>> window argument could be removed from the actual callback.
>>
> True, and I don't think it can be seen as a problem.

I like the idea of a per-window callback too. 


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
waffle mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/waffle

Reply via email to