diff mbox

[weston,1/2] compositor: a couple debug logs

Message ID 1344897558-1976-2-git-send-email-rob.clark@linaro.org
State New
Headers show

Commit Message

Rob Clark Aug. 13, 2012, 10:39 p.m. UTC
From: Rob Clark <rob@ti.com>

Well, they were useful to me in debugging, so probably sooner or later
useful to someone else.

Signed-off-by: Rob Clark <rob@ti.com>
---
 src/compositor.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Kristian Høgsberg Aug. 14, 2012, 11:52 p.m. UTC | #1
On Mon, Aug 13, 2012 at 05:39:17PM -0500, Rob Clark wrote:
> From: Rob Clark <rob@ti.com>
> 
> Well, they were useful to me in debugging, so probably sooner or later
> useful to someone else.

Yeah, they look pretty reasonable.  Committed.

Kristian

> Signed-off-by: Rob Clark <rob@ti.com>
> ---
>  src/compositor.c |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/src/compositor.c b/src/compositor.c
> index ed887a4..b2a3ae9 100644
> --- a/src/compositor.c
> +++ b/src/compositor.c
> @@ -817,8 +817,10 @@ weston_surface_attach(struct wl_surface *surface, struct wl_buffer *buffer)
>  							 NULL,
>  							 EGL_WAYLAND_BUFFER_WL,
>  							 buffer, attribs);
> -			if (!es->images[i])
> +			if (!es->images[i]) {
> +				weston_log("failed to create img for plane %d\n", i);
>  				continue;
> +			}
>  			es->num_images++;
>  
>  			glActiveTexture(GL_TEXTURE0 + i);
> @@ -829,7 +831,7 @@ weston_surface_attach(struct wl_surface *surface, struct wl_buffer *buffer)
>  
>  		es->pitch = buffer->width;
>  	} else {
> -		/* unhandled buffer type */
> +		weston_log("unhandled buffer type!\n");
>  	}
>  }
>  
> -- 
> 1.7.9.5
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
diff mbox

Patch

diff --git a/src/compositor.c b/src/compositor.c
index ed887a4..b2a3ae9 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -817,8 +817,10 @@  weston_surface_attach(struct wl_surface *surface, struct wl_buffer *buffer)
 							 NULL,
 							 EGL_WAYLAND_BUFFER_WL,
 							 buffer, attribs);
-			if (!es->images[i])
+			if (!es->images[i]) {
+				weston_log("failed to create img for plane %d\n", i);
 				continue;
+			}
 			es->num_images++;
 
 			glActiveTexture(GL_TEXTURE0 + i);
@@ -829,7 +831,7 @@  weston_surface_attach(struct wl_surface *surface, struct wl_buffer *buffer)
 
 		es->pitch = buffer->width;
 	} else {
-		/* unhandled buffer type */
+		weston_log("unhandled buffer type!\n");
 	}
 }