[Mesa-dev] [PATCH 2/3] egl_dri2: check the surface type in platform_android
Chad Versace
chad at chad-versace.us
Tue Aug 30 15:44:52 PDT 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 08/28/2011 08:39 AM, Chia-I Wu wrote:
> From: Chia-I Wu <olv at lunarg.com>
>
> Check the surface type is EGL_WINDOW_BIT before doing anything, in
> preparation for pbuffer support.
> ---
> src/egl/drivers/dri2/platform_android.c | 104 +++++++++++++++++--------------
> 1 files changed, 58 insertions(+), 46 deletions(-)
>
> diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c
> index 2bbd210..7b6730a 100644
> --- a/src/egl/drivers/dri2/platform_android.c
> +++ b/src/egl/drivers/dri2/platform_android.c
[snip]
> @@ -431,17 +441,19 @@ droid_get_buffers_with_format(__DRIdrawable * driDrawable,
> dri2_egl_display(dri2_surf->base.Resource.Display);
> int i;
>
> - if (!dri2_surf->buffer) {
> - if (!droid_window_dequeue_buffer(dri2_surf))
> - return NULL;
> - }
> + if (dri2_surf->base.Type == EGL_WINDOW_BIT) {
> + if (!dri2_surf->buffer) {
> + if (!droid_window_dequeue_buffer(dri2_surf))
> + return NULL;
> + }
The above would be easier to read if the two if-trees were combined:
if (!dri2_surf->buffer && !droid_window_dequeue_buffer(dri2_surf))
return NULL;
Either way,
Reviewed-by: Chad Versace <chad at chad-versace.us>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQIcBAEBAgAGBQJOXWfjAAoJEAIvNt057x8ikBUP/33hYl97ZxN/ftSLbPwzwqHW
g28pshV4q2CUe5y8hWngKOjXq+vqqJcpZcLCkpY2oJpRKhUGy3QLL6wFu3OEKqL8
gZgCbRqwCPpadUDGtev+tO+8SdEiMcUJP+m4cZ2ryUyWnjt9DgOYWVjScAXvrvpy
TPbuDTsF4F25lg2rW4MtWA1On/vHSvFMa4/wSUbSCkLQNC1PfKlT/T/mcyIxH0/a
++yG+y+ScDah0qFc4Mf1W0oBRTEfKYnI/VP57u32IMWh9DK+YxKQgS0Pc7oqcNOY
8hE19Ljk4OpT5CHNZcVfdLgGA10uNzwAwncUNSC/3Y1oSLuXeAqUXX0QK3uYnj1T
smzklKNqx9bbpmU2UVMOE2/OoiZUngpYVKUy9HLRUBVVitnRLkQ8O2tEB3LGNFf3
SUXlkh6D4N/H0MTjJZuxu+ZD6EWBoi9Zm4MZazzpBJGcjknl88cJ4iGIaBvWU+Sf
0jT9VgQs9FMaTeVaE4DLLOVxQ2JAO2KAlW6MMVqauCsQ8AtJLhcC/s0PCz57ngoB
GH12lh2hF9YL3kjE//9Zt8s/psMGWsUsW7z3dgSzgfZcpU6AaSp6vU+wtoobSN5M
8o+Z8HVlKhH77IbMIyNlN74krKPuNckDsTh1K9B2jdlJju/l2qHKR2KOkk/6O81s
mmmCbHoFCBwmTNx/ze7D
=RpKS
-----END PGP SIGNATURE-----
More information about the mesa-dev
mailing list