summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.qmake.conf2
-rw-r--r--Source/WebCore/platform/mac/WebCoreNSStringExtras.h2
-rw-r--r--Source/WebKit2/UIProcess/qt/QtWebPageSGNode.cpp43
3 files changed, 40 insertions, 7 deletions
diff --git a/.qmake.conf b/.qmake.conf
index 717d46d44..b6ffe6de4 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -3,4 +3,4 @@ MODULE_QMAKE_OUTDIR = $$shadowed($$PWD/Tools/qmake)
QMAKEPATH += $$PWD/Tools/qmake $$MODULE_QMAKE_OUTDIR
load(qt_build_config)
-MODULE_VERSION = 5.7.1
+MODULE_VERSION = 5.8.0
diff --git a/Source/WebCore/platform/mac/WebCoreNSStringExtras.h b/Source/WebCore/platform/mac/WebCoreNSStringExtras.h
index a2a0e9316..750fd67d0 100644
--- a/Source/WebCore/platform/mac/WebCoreNSStringExtras.h
+++ b/Source/WebCore/platform/mac/WebCoreNSStringExtras.h
@@ -32,7 +32,7 @@
#include <Foundation/Foundation.h>
@class NSString;
#else
-typedef struct NSString NSString;
+typedef struct objc_object NSString;
#endif
#ifdef __cplusplus
diff --git a/Source/WebKit2/UIProcess/qt/QtWebPageSGNode.cpp b/Source/WebKit2/UIProcess/qt/QtWebPageSGNode.cpp
index 002d00507..9a7b34951 100644
--- a/Source/WebKit2/UIProcess/qt/QtWebPageSGNode.cpp
+++ b/Source/WebKit2/UIProcess/qt/QtWebPageSGNode.cpp
@@ -27,7 +27,12 @@
#include <QtQuick/QSGSimpleRectNode>
#include <WebCore/CoordinatedGraphicsScene.h>
#include <WebCore/TransformationMatrix.h>
-#include <private/qsgrendernode_p.h>
+
+#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)
+#include <QtQuick/QSGRenderNode>
+#else
+#include <QtQuick/private/qsgrendernode_p.h>
+#endif
using namespace WebCore;
@@ -41,12 +46,33 @@ public:
coordinatedGraphicsScene()->setActive(true);
}
- virtual StateFlags changedStates()
+#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)
+
+ StateFlags changedStates() const override
+ {
+ return StateFlags(StencilState) | ColorState | BlendState;
+ }
+
+ void render(const RenderState* state) override
+ {
+ renderInternal(state->projectionMatrix());
+ }
+
+#else
+
+ StateFlags changedStates() Q_DECL_OVERRIDE
{
return StateFlags(StencilState) | ColorState | BlendState;
}
- virtual void render(const RenderState& state)
+ void render(const RenderState& state) Q_DECL_OVERRIDE
+ {
+ renderInternal(state.projectionMatrix);
+ }
+
+#endif // QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)
+
+ void renderInternal(const QMatrix4x4* projection)
{
TransformationMatrix renderMatrix;
if (pageNode()->devicePixelRatio() != 1.0) {
@@ -58,18 +84,25 @@ public:
// When rendering to an intermediate surface, Qt will
// mirror the projection matrix to fit on the destination coordinate system.
- const QMatrix4x4* projection = state.projectionMatrix;
bool mirrored = projection && (*projection)(0, 0) * (*projection)(1, 1) - (*projection)(0, 1) * (*projection)(1, 0) > 0;
// FIXME: Support non-rectangular clippings.
coordinatedGraphicsScene()->paintToCurrentGLContext(renderMatrix, inheritedOpacity(), clipRect(), mirrored ? TextureMapper::PaintingMirrored : 0);
}
- ~ContentsSGNode()
+ void releaseResources()
+#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)
+ override
+#endif
{
coordinatedGraphicsScene()->purgeGLResources();
}
+ ~ContentsSGNode()
+ {
+ releaseResources();
+ }
+
const QtWebPageSGNode* pageNode() const
{
const QtWebPageSGNode* parent = static_cast<QtWebPageSGNode*>(this->parent());