summaryrefslogtreecommitdiffstats
path: root/src/openvg/qwindowsurface_vgegl.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2010-04-16 12:20:46 +0200
committerOlivier Goffart <ogoffart@trolltech.com>2010-04-16 12:20:46 +0200
commitd626cfeae84a52f3f752be6dd5ed7df11e4b3be1 (patch)
treefe9732af8c2c49c20bc450cdb53087e185ff8633 /src/openvg/qwindowsurface_vgegl.cpp
parent140a96d0b860b045c18d53c1ac96e77b3893d31c (diff)
parentfb44c5b866da71fcbe992f6d02fb18ab2470ac53 (diff)
Merge remote branch 'origin/4.6' into qt-4.7-from-4.6
Conflicts: src/3rdparty/webkit/VERSION src/3rdparty/webkit/WebCore/ChangeLog src/3rdparty/webkit/WebCore/page/FrameView.cpp src/3rdparty/webkit/WebCore/rendering/RenderWidget.cpp src/3rdparty/webkit/WebKit/qt/symbian/eabi/QtWebKitu.def src/s60installs/bwins/QtCoreu.def src/s60installs/bwins/QtGuiu.def src/s60installs/bwins/QtNetworku.def src/s60installs/eabi/QtGuiu.def tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp
Diffstat (limited to 'src/openvg/qwindowsurface_vgegl.cpp')
-rw-r--r--src/openvg/qwindowsurface_vgegl.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/openvg/qwindowsurface_vgegl.cpp b/src/openvg/qwindowsurface_vgegl.cpp
index 13ae807ba4..92c4371421 100644
--- a/src/openvg/qwindowsurface_vgegl.cpp
+++ b/src/openvg/qwindowsurface_vgegl.cpp
@@ -758,6 +758,33 @@ void QVGEGLWindowSurfaceDirect::endPaint
}
}
+bool QVGEGLWindowSurfaceDirect::supportsStaticContents() const
+{
+#if defined(QVG_BUFFER_SCROLLING) && !defined(QVG_NO_PRESERVED_SWAP)
+ return true;
+#else
+ return QVGEGLWindowSurfacePrivate::supportsStaticContents();
+#endif
+}
+
+bool QVGEGLWindowSurfaceDirect::scroll(QWidget *widget, const QRegion& area, int dx, int dy)
+{
+#ifdef QVG_BUFFER_SCROLLING
+ QEglContext *context = ensureContext(widget);
+ if (context) {
+ context->makeCurrent(windowSurface);
+ QRect scrollRect = area.boundingRect();
+ int sx = scrollRect.x();
+ int sy = size.height() - scrollRect.y() - scrollRect.height();
+ vgSeti(VG_SCISSORING, VG_FALSE);
+ vgCopyPixels(sx + dx, sy - dy, sx, sy, scrollRect.width(), scrollRect.height());
+ context->lazyDoneCurrent();
+ return true;
+ }
+#endif
+ return false;
+}
+
QT_END_NAMESPACE
#endif