Mesa (pipe-video): g3dvl: It's ok to not have cliprects (minimized windows, etc).

Younes Manton ymanton at kemper.freedesktop.org
Sun Dec 6 13:04:26 PST 2009


Module: Mesa
Branch: pipe-video
Commit: 9e8ab2e7c1b8ff5279d4247b8690c9bfc57f7e02
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9e8ab2e7c1b8ff5279d4247b8690c9bfc57f7e02

Author: Younes Manton <younes.m at gmail.com>
Date:   Sat Dec  5 12:53:42 2009 -0500

g3dvl: It's ok to not have cliprects (minimized windows, etc).

---

 src/gallium/winsys/g3dvl/dri/dri_winsys.c |   34 +++++++++++++++-------------
 1 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/src/gallium/winsys/g3dvl/dri/dri_winsys.c b/src/gallium/winsys/g3dvl/dri/dri_winsys.c
index 257aa0a..da54c09 100644
--- a/src/gallium/winsys/g3dvl/dri/dri_winsys.c
+++ b/src/gallium/winsys/g3dvl/dri/dri_winsys.c
@@ -238,27 +238,29 @@ vl_dri_flush_frontbuffer(struct pipe_screen *screen,
 
    vl_dri_update_drawables_locked(vl_dri_ctx);
 
-   src_bbox.x1 = 0;
-   src_bbox.x2 = vl_dri_ctx->drawable->w;
-   src_bbox.y1 = 0;
-   src_bbox.y2 = vl_dri_ctx->drawable->h;
+   if (vl_dri_ctx->drawable->cliprects) {
+      src_bbox.x1 = 0;
+      src_bbox.x2 = vl_dri_ctx->drawable->w;
+      src_bbox.y1 = 0;
+      src_bbox.y2 = vl_dri_ctx->drawable->h;
 
 #if 0
-   if (vl_dri_scrn->_api_hooks->present_locked)
-      vl_dri_scrn->api_hooks->present_locked(pipe, surf,
-                                             vl_dri_ctx->drawable->cliprects,
-                                             vl_dri_ctx->drawable->num_cliprects,
-                                             vl_dri_ctx->drawable->x, vl_dri_drawable->y,
-                                             &bbox, NULL /*fence*/);
-   else
+      if (vl_dri_scrn->_api_hooks->present_locked)
+         vl_dri_scrn->api_hooks->present_locked(pipe, surf,
+                                                vl_dri_ctx->drawable->cliprects,
+                                                vl_dri_ctx->drawable->num_cliprects,
+                                                vl_dri_ctx->drawable->x, vl_dri_drawable->y,
+                                                &bbox, NULL /*fence*/);
+      else
 #endif
-   if (vl_dri_scrn->api_hooks->front_srf_locked) {
-      struct pipe_surface *front = vl_dri_scrn->api_hooks->front_srf_locked(screen);
+      if (vl_dri_scrn->api_hooks->front_srf_locked) {
+         struct pipe_surface *front = vl_dri_scrn->api_hooks->front_srf_locked(screen);
 
-      if (front)
-         vl_clip_copy(vl_dri_ctx, front, surf, &src_bbox);
+         if (front)
+            vl_clip_copy(vl_dri_ctx, front, surf, &src_bbox);
 
-      //st_flush(ctx->st, PIPE_FLUSH_RENDER_CACHE, fence);
+         //st_flush(ctx->st, PIPE_FLUSH_RENDER_CACHE, fence);
+      }
    }
 
    vl_dri_ctx->lost_lock = save_lost_lock;



More information about the mesa-commit mailing list