From: Zhigang Gong <zhigang.gong at linux.intel.com> We need to put current front_buffer to back buffer thus we don't need to create a new back buffer next time. This behaviou should be the same with or without glamor. Previous code incorrectly discard the previous front_buffer and cause a big buffer leak problem. Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com> --- src/intel_dri.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/intel_dri.c b/src/intel_dri.c index ed5078e..0405937 100644 --- a/src/intel_dri.c +++ b/src/intel_dri.c @@ -1023,9 +1023,10 @@ I830DRI2ScheduleFlip(struct intel_screen_private *intel, priv = info->front->driverPrivate; /* Exchange the current front-buffer with the fresh bo */ + + intel->back_buffer = intel->front_buffer; + drm_intel_bo_reference(intel->back_buffer); if (!(intel->uxa_flags & UXA_USE_GLAMOR)) { - intel->back_buffer = intel->front_buffer; - drm_intel_bo_reference(intel->back_buffer); intel_set_pixmap_bo(priv->pixmap, new_back); drm_intel_bo_unreference(new_back); } -- 1.7.4.4