[weston,v2,02/20] gl-renderer: Call glViewport after the context is made current

Submitted by Derek Foreman on Oct. 16, 2014, 3:55 p.m.

Details

Message ID 1413474938-2407-3-git-send-email-derekf@osg.samsung.com
State Accepted
Headers show

Not browsing as part of any series.

Commit Message

Derek Foreman Oct. 16, 2014, 3:55 p.m.
From: Jason Ekstrand <jason@jlekstrand.net>

---
 src/gl-renderer.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/src/gl-renderer.c b/src/gl-renderer.c
index 076c242..d54928b 100644
--- a/src/gl-renderer.c
+++ b/src/gl-renderer.c
@@ -867,15 +867,15 @@  gl_renderer_repaint_output(struct weston_output *output,
 	pixman_region32_t buffer_damage, total_damage;
 	enum gl_border_status border_damage = BORDER_STATUS_CLEAN;
 
+	if (use_output(output) < 0)
+		return;
+
 	/* Calculate the viewport */
 	glViewport(go->borders[GL_RENDERER_BORDER_LEFT].width,
 		   go->borders[GL_RENDERER_BORDER_BOTTOM].height,
 		   output->current_mode->width,
 		   output->current_mode->height);
 
-	if (use_output(output) < 0)
-		return;
-
 	/* if debugging, redraw everything outside the damage to clean up
 	 * debug lines from the previous draw on this buffer:
 	 */

Comments

On Thu, 16 Oct 2014 10:55:20 -0500
Derek Foreman <derekf@osg.samsung.com> wrote:

> From: Jason Ekstrand <jason@jlekstrand.net>
> 
> ---
>  src/gl-renderer.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/gl-renderer.c b/src/gl-renderer.c
> index 076c242..d54928b 100644
> --- a/src/gl-renderer.c
> +++ b/src/gl-renderer.c
> @@ -867,15 +867,15 @@ gl_renderer_repaint_output(struct weston_output *output,
>  	pixman_region32_t buffer_damage, total_damage;
>  	enum gl_border_status border_damage = BORDER_STATUS_CLEAN;
>  
> +	if (use_output(output) < 0)
> +		return;
> +
>  	/* Calculate the viewport */
>  	glViewport(go->borders[GL_RENDERER_BORDER_LEFT].width,
>  		   go->borders[GL_RENDERER_BORDER_BOTTOM].height,
>  		   output->current_mode->width,
>  		   output->current_mode->height);
>  
> -	if (use_output(output) < 0)
> -		return;
> -
>  	/* if debugging, redraw everything outside the damage to clean up
>  	 * debug lines from the previous draw on this buffer:
>  	 */

R-b me, pushed.


Thanks,
pq