[PATCH weston] gl-renderer: Allow compilation when EGL_BUFFER_AGE_EXT is not present

Kristian Høgsberg krh at bitplanet.net
Wed Mar 20 12:17:46 PDT 2013


On Wed, Mar 20, 2013 at 1:25 PM, John Kåre Alsaker
<john.kare.alsaker at gmail.com> wrote:
> The extension should be added to weston-egl-ext.h instead.

Yup, that should do it.

Kristian

> On Wed, Mar 20, 2013 at 6:05 PM, Rob Bradford <robert.bradford at intel.com> wrote:
>> From: Rob Bradford <rob at linux.intel.com>
>>
>> In 1c169ff support is added for using the EGL_BUFFER_AGE_EXT extension
>> including runtime detection of whether the extension is available. This change
>> extends that to also check that the extension is known about at compile time.
>>
>> This allows weston to continue to compile against EGL stacks that don't yet
>> have that extension.
>> ---
>>  src/gl-renderer.c | 7 +++++--
>>  1 file changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/gl-renderer.c b/src/gl-renderer.c
>> index ea6631f..11a97f7 100644
>> --- a/src/gl-renderer.c
>> +++ b/src/gl-renderer.c
>> @@ -950,11 +950,13 @@ output_get_buffer_damage(struct weston_output *output,
>>                          pixman_region32_t *buffer_damage)
>>  {
>>         struct gl_output_state *go = get_output_state(output);
>> -       struct gl_renderer *gr = get_renderer(output->compositor);
>>         EGLint buffer_age = 0;
>> -       EGLBoolean ret;
>>         int i;
>>
>> +#ifdef EGL_BUFFER_AGE_EXT
>> +       struct gl_renderer *gr = get_renderer(output->compositor);
>> +       EGLBoolean ret;
>> +
>>         if (gr->has_egl_buffer_age) {
>>                 ret = eglQuerySurface(gr->egl_display, go->egl_surface,
>>                                       EGL_BUFFER_AGE_EXT, &buffer_age);
>> @@ -963,6 +965,7 @@ output_get_buffer_damage(struct weston_output *output,
>>                         gl_renderer_print_egl_error_state();
>>                 }
>>         }
>> +#endif
>>
>>         if (buffer_age == 0 || buffer_age - 1 > BUFFER_DAMAGE_COUNT)
>>                 pixman_region32_copy(buffer_damage, &output->region);
>> --
>> 1.8.1.2
>>
>> _______________________________________________
>> wayland-devel mailing list
>> wayland-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list