From 1b61390856ce336c82f7b99def574775893bf4f2 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Tue, 1 Dec 2015 12:31:14 +0100 Subject: Reduce flushes with repaint() when GL-based compositing is active Task-number: QTBUG-49655 Change-Id: I7a5d08f681a7d87709aac745154730764040e922 Reviewed-by: Paul Olav Tvete --- src/gui/painting/qplatformbackingstore.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gui/painting/qplatformbackingstore.cpp') diff --git a/src/gui/painting/qplatformbackingstore.cpp b/src/gui/painting/qplatformbackingstore.cpp index 4e26d8f741..cda2446a5e 100644 --- a/src/gui/painting/qplatformbackingstore.cpp +++ b/src/gui/painting/qplatformbackingstore.cpp @@ -301,6 +301,8 @@ void QPlatformBackingStore::composeAndFlush(QWindow *window, const QRegion ®i return; } + QWindowPrivate::get(window)->lastComposeTime.start(); + QOpenGLFunctions *funcs = context->functions(); funcs->glViewport(0, 0, window->width() * window->devicePixelRatio(), window->height() * window->devicePixelRatio()); funcs->glClearColor(0, 0, 0, translucentBackground ? 0 : 1); -- cgit v1.2.3