diff options
author | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2013-09-13 15:29:53 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-14 15:50:35 +0200 |
commit | 0b9ea2d05d1081ce4a667f0c7036a205bcd751a3 (patch) | |
tree | 3d194274878b1501bbe15428554d74aedafd0d56 /lib/render_widget_host_view_qt_delegate.h | |
parent | 338e24b48601a3cfdcde0977b6c9390d33d51c9f (diff) |
Render delegated renderer frames using the Qt scene graph.
This provides a stub implementation that renders quads and RenderPasses
using QSGNodes in QQuickWebEngineView.
The BackingStore code path is still supported when the delegated renderer
switch is not enabled. To use the new rendering, pass the following switches:
--enable-delegated-renderer --enable-threaded-compositing
This uses debug, plain color textures until we can fetch tiles and
textures from the ResourceProvider across OpenGL context boundaries.
Change-Id: I33ea0738dc5a326ef79c1435f75c044c42e8551f
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Diffstat (limited to 'lib/render_widget_host_view_qt_delegate.h')
-rw-r--r-- | lib/render_widget_host_view_qt_delegate.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/render_widget_host_view_qt_delegate.h b/lib/render_widget_host_view_qt_delegate.h index c73aa9aec..f84d1a085 100644 --- a/lib/render_widget_host_view_qt_delegate.h +++ b/lib/render_widget_host_view_qt_delegate.h @@ -42,6 +42,15 @@ #ifndef RENDER_WIDGET_HOST_VIEW_QT_DELEGATE_H #define RENDER_WIDGET_HOST_VIEW_QT_DELEGATE_H +// On Mac we need to reset this define in order to prevent definition +// of "check" macros etc. The "check" macro collides with a member function name in QtQuick. +// See AssertMacros.h in the Mac SDK. +#include <QtGlobal> // We need this for the Q_OS_MAC define. +#if defined(Q_OS_MAC) +#undef __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES +#define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 +#endif + #include "qtwebengineglobal.h" #include <QRect> @@ -54,6 +63,8 @@ QT_BEGIN_NAMESPACE class QCursor; class QEvent; class QPainter; +class QQuickWindow; +class QSGNode; class QWindow; QT_END_NAMESPACE @@ -80,6 +91,9 @@ public: protected: RenderWidgetHostViewQtDelegate(); void paint(QPainter*, const QRectF& boundingRect); +#if (QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)) + QSGNode *updatePaintNode(QSGNode *, QQuickWindow *); +#endif void fetchBackingStore(); void notifyResize(); bool forwardEvent(QEvent*); |