summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2016-01-26 11:17:57 +0200
committerTor Lillqvist <tml@collabora.com>2016-01-26 11:43:50 +0200
commit2c55288357c9d5410afae58c1fbb97cdfabf0360 (patch)
tree5cd0ab352add75f31bb5d7eadf05e5257ed3d424 /toolkit
parent7c151f39144b7401a99c7b736a41e5dce4ac4db1 (diff)
Add API to get the number of OpenGL buffer swaps, including through UNO
Change-Id: Iff29ac615ad4b6516790b1cbbde0215a3cd0efe6
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/Library_tk.mk5
-rw-r--r--toolkit/source/awt/vclxtoolkit.cxx19
2 files changed, 23 insertions, 1 deletions
diff --git a/toolkit/Library_tk.mk b/toolkit/Library_tk.mk
index e5aaad5083e4..1136e2e65896 100644
--- a/toolkit/Library_tk.mk
+++ b/toolkit/Library_tk.mk
@@ -21,7 +21,10 @@ $(eval $(call gb_Library_Library,tk))
$(eval $(call gb_Library_set_componentfile,tk,toolkit/util/tk))
-$(eval $(call gb_Library_use_external,tk,boost_headers))
+$(eval $(call gb_Library_use_externals,tk,\
+ boost_headers \
+ glew \
+))
$(eval $(call gb_Library_set_include,tk,\
$$(INCLUDE) \
diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx
index 6929c5849045..7fe5032df1b4 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -22,6 +22,13 @@
#include <prewin.h>
#include <postwin.h>
#endif
+#if defined UNX && !defined MACOSX
+#include <prex.h>
+#include "GL/glxew.h"
+#include <postx.h>
+#undef None // Avoid clash with the one in <toolkit/awt/scrollabledialog.hxx>
+#undef Status // Sigh... used for instance as parameter name in css::awt::XImageConsumer
+#endif
#include <com/sun/star/awt/WindowAttribute.hpp>
#include <com/sun/star/awt/VclWindowPeerAttribute.hpp>
#include <com/sun/star/awt/WindowClass.hpp>
@@ -113,6 +120,7 @@
#include <vcl/window.hxx>
#include <vcl/wrkwin.hxx>
#include <vcl/throbber.hxx>
+#include <vcl/opengl/OpenGLContext.hxx>
#include "toolkit/awt/vclxspinbutton.hxx"
#include <tools/debug.hxx>
#include <comphelper/processfactory.hxx>
@@ -195,6 +203,9 @@ public:
virtual void SAL_CALL processEventsToIdle()
throw (css::uno::RuntimeException, std::exception) override;
+ virtual sal_Int64 SAL_CALL getOpenGLBufferSwapCounter()
+ throw (css::uno::RuntimeException, std::exception) override;
+
// css::awt::XToolkit
css::uno::Reference< css::awt::XWindowPeer > SAL_CALL getDesktopWindow( ) throw(css::uno::RuntimeException, std::exception) override;
css::awt::Rectangle SAL_CALL getWorkArea( ) throw(css::uno::RuntimeException, std::exception) override;
@@ -1906,6 +1917,8 @@ void SAL_CALL VCLXToolkit::reschedule()
Application::Reschedule(true);
}
+// css::awt::XToolkitExperimental
+
void SAL_CALL VCLXToolkit::processEventsToIdle()
throw (css::uno::RuntimeException, std::exception)
{
@@ -1913,6 +1926,12 @@ void SAL_CALL VCLXToolkit::processEventsToIdle()
Scheduler::ProcessEventsToIdle();
}
+sal_Int64 SAL_CALL VCLXToolkit::getOpenGLBufferSwapCounter()
+ throw (css::uno::RuntimeException, std::exception)
+{
+ return OpenGLContext::getBufferSwapCounter();
+}
+
// css:awt:XToolkitRobot
void SAL_CALL VCLXToolkit::keyPress( const css::awt::KeyEvent & aKeyEvent )