diff options
author | Wang Zhenyu <zhenyu.z.wang@intel.com> | 2006-12-04 15:48:04 +0800 |
---|---|---|
committer | Keith Packard <keithp@neko.keithp.com> | 2007-01-06 15:49:23 -0800 |
commit | caf8010652f77e7687c0a3b7c267ba49d0a24d74 (patch) | |
tree | b21776131775e7ec72e5ab57c962226eaa755030 /src/mesa/drivers/dri/common/dri_util.c | |
parent | f34cad0f972ca838cb223429acab54d26c2f6a57 (diff) | |
parent | 8c1cc5fd8084e7a927b15c88709a615fa16b06a3 (diff) |
Merge branch 'master' into crestline
Conflicts:
src/mesa/drivers/dri/i965/brw_tex_layout.c
Michel Dänzer replaced the copy of the 945 mipmap layout code with that from
the 945 driver directly.
Diffstat (limited to 'src/mesa/drivers/dri/common/dri_util.c')
-rw-r--r-- | src/mesa/drivers/dri/common/dri_util.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index ba251a8143..cc3dcf9d8d 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -482,8 +482,27 @@ __driUtilUpdateDrawableInfo(__DRIdrawablePrivate *pdp) static void driSwapBuffers( __DRInativeDisplay *dpy, void *drawablePrivate ) { __DRIdrawablePrivate *dPriv = (__DRIdrawablePrivate *) drawablePrivate; + drm_clip_rect_t rect; + dPriv->swapBuffers(dPriv); - (void) dpy; + + /* Check that we actually have the new damage report method */ + if (api_ver < 20070105 || dri_interface->reportDamage == NULL) + return; + + /* Assume it's affecting the whole drawable for now */ + rect.x1 = 0; + rect.y1 = 0; + rect.x2 = rect.x1 + dPriv->w; + rect.y2 = rect.y1 + dPriv->h; + + /* Report the damage. Currently, all our drivers draw directly to the + * front buffer, so we report the damage there rather than to the backing + * store (if any). + */ + (*dri_interface->reportDamage)(dpy, dPriv->screen, dPriv->draw, + dPriv->x, dPriv->y, + &rect, 1, GL_TRUE); } /** |