[Spice-devel] [PATHCH win-qxl 8/8] CreateDeviceBitmap: more verbose debug prints on error paths

Hans de Goede hdegoede at redhat.com
Fri Apr 8 02:49:18 PDT 2011


Ack.

On 04/07/2011 06:10 PM, Alon Levy wrote:
> ---
>   display/surface.c |   11 ++++++++---
>   1 files changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/display/surface.c b/display/surface.c
> index 7146b32..98351e6 100644
> --- a/display/surface.c
> +++ b/display/surface.c
> @@ -106,8 +106,8 @@ HBITMAP CreateDeviceBitmap(PDev *pdev, SIZEL size, ULONG format, QXLPHYSICAL *ph
>       };
>
>       if (!(surf = EngCreateDeviceBitmap((DHSURF)GetSurfaceInfo(pdev, surface_id), size, format))) {
> -        DEBUG_PRINT((NULL, 0, "%s: create device surface failed, 0x%lx\n",
> -                     __FUNCTION__, pdev));
> +        DEBUG_PRINT((pdev, 0, "%s: EngCreateDeviceBitmap failed, pdev 0x%lx, surface_id=%d\n",
> +                    __FUNCTION__, pdev, surface_id));
>           goto out_error1;
>       }
>
> @@ -119,7 +119,8 @@ HBITMAP CreateDeviceBitmap(PDev *pdev, SIZEL size, ULONG format, QXLPHYSICAL *ph
>                                HOOK_GRADIENTFILL
>   #endif
>                                )) {
> -        DEBUG_PRINT((pdev, 0, "%s: EngAssociateSurface failed\n", __FUNCTION__));
> +        DEBUG_PRINT((pdev, 0, "%s: EngAssociateSurface failed, surface_id=%d\n",
> +                    __FUNCTION__, surface_id));
>           goto out_error2;
>       }
>
> @@ -128,10 +129,14 @@ HBITMAP CreateDeviceBitmap(PDev *pdev, SIZEL size, ULONG format, QXLPHYSICAL *ph
>       QXLGetSurface(pdev, phys_mem, size.cx, size.cy, depth,
>                     &stride, base_mem, allocation_type);
>       if (!*base_mem) {
> +        DEBUG_PRINT((pdev, 0, "%s: QXLGetSurface failed, surface_id=%d\n",
> +                    __FUNCTION__, surface_id));
>           goto out_error2;
>       }
>
>       if (!CreateDrawArea(pdev, *base_mem, format, size.cx, size.cy, stride, surface_id)) {
> +        DEBUG_PRINT((pdev, 0, "%s: CreateDrawArea failed, surface_id=%d\n",
> +                __FUNCTION__, surface_id));
>           goto out_error3;
>       }
>


More information about the Spice-devel mailing list