aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick
diff options
context:
space:
mode:
authorLorn Potter <lorn.potter@gmail.com>2017-12-19 14:53:37 +1000
committerLorn Potter <lorn.potter@gmail.com>2018-01-17 22:22:16 +0000
commit4d8237fc695350054980137e0a50cfc6f0f88d7d (patch)
treea0f99921b44d03706d9e2f497632440b3e675eeb /src/quick
parent62d07125620e787e7461edc5cfd4aa4287f26847 (diff)
wasm: bitfield packing fix
emscripten seems to have issues with them, acting as if they are const, and cannot be changed. Change-Id: I1b86580ca80dab08a0efbd25fbf5167625a704f9 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/quick')
-rw-r--r--src/quick/items/qquickloader_p_p.h8
-rw-r--r--src/quick/items/qquickopenglshadereffect_p.h15
-rw-r--r--src/quick/items/qquickwindow_p.h14
-rw-r--r--src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop_p.h5
-rw-r--r--src/quick/scenegraph/coreapi/qsgrenderer_p.h6
-rw-r--r--src/quick/scenegraph/qsgrenderloop.cpp5
-rw-r--r--src/quick/scenegraph/qsgthreadedrenderloop_p.h5
-rw-r--r--src/quick/scenegraph/util/qsgdefaultpainternode_p.h15
8 files changed, 71 insertions, 2 deletions
diff --git a/src/quick/items/qquickloader_p_p.h b/src/quick/items/qquickloader_p_p.h
index 7492527401..c3591567b6 100644
--- a/src/quick/items/qquickloader_p_p.h
+++ b/src/quick/items/qquickloader_p_p.h
@@ -109,11 +109,17 @@ public:
QQuickLoaderIncubator *incubator;
QV4::PersistentValue initialPropertyValues;
QV4::PersistentValue qmlCallingContext;
+#ifndef QT_NO_BITFIELDS
bool updatingSize: 1;
bool active : 1;
bool loadingFromSource : 1;
bool asynchronous : 1;
-
+#else
+ bool updatingSize = 1;
+ bool active = 1;
+ bool loadingFromSource = 1;
+ bool asynchronous = 1;
+#endif
void _q_sourceLoaded();
void _q_updateSize(bool loaderGeometryChanged = true);
};
diff --git a/src/quick/items/qquickopenglshadereffect_p.h b/src/quick/items/qquickopenglshadereffect_p.h
index bc2e2975ee..f602bd8b8e 100644
--- a/src/quick/items/qquickopenglshadereffect_p.h
+++ b/src/quick/items/qquickopenglshadereffect_p.h
@@ -178,6 +178,7 @@ private:
QQuickOpenGLShaderEffectCommon m_common;
+#ifndef QT_NO_BITFIELDS
uint m_blending : 1;
uint m_dirtyUniforms : 1;
uint m_dirtyUniformValues : 1;
@@ -190,6 +191,20 @@ private:
uint m_supportsAtlasTextures : 1;
uint m_vertNeedsUpdate : 1;
uint m_fragNeedsUpdate : 1;
+#else
+ uint m_blending = 1;
+ uint m_dirtyUniforms = 1;
+ uint m_dirtyUniformValues = 1;
+ uint m_dirtyTextureProviders = 1;
+ uint m_dirtyProgram = 1;
+ uint m_dirtyParseLog = 1;
+ uint m_dirtyMesh = 1;
+ uint m_dirtyGeometry = 1;
+ uint m_customVertexShader = 1;
+ uint m_supportsAtlasTextures = 1;
+ uint m_vertNeedsUpdate = 1;
+ uint m_fragNeedsUpdate = 1;
+#endif
};
QT_END_NAMESPACE
diff --git a/src/quick/items/qquickwindow_p.h b/src/quick/items/qquickwindow_p.h
index 06891406ab..8ac6cdfa36 100644
--- a/src/quick/items/qquickwindow_p.h
+++ b/src/quick/items/qquickwindow_p.h
@@ -258,7 +258,7 @@ public:
QQuickCustomRenderStage *customRenderStage;
QColor clearColor;
-
+#ifndef QT_NO_BITFIELDS
uint clearBeforeRendering : 1;
uint persistentGLContext : 1;
@@ -269,6 +269,18 @@ public:
bool allowChildEventFiltering : 1;
bool allowDoubleClick : 1;
+#else
+ uint clearBeforeRendering = 1;
+
+ uint persistentGLContext = 1;
+ uint persistentSceneGraph = 1;
+
+ uint lastWheelEventAccepted = 1;
+ bool componentCompleted = 1;
+
+ bool allowChildEventFiltering = 1;
+ bool allowDoubleClick = 1;
+#endif
Qt::FocusReason lastFocusReason;
diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop_p.h b/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop_p.h
index c724d18298..8987fb0940 100644
--- a/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop_p.h
+++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop_p.h
@@ -87,8 +87,13 @@ public:
QSGRenderContext *createRenderContext(QSGContext *) const override { return rc; }
struct WindowData {
+#ifndef QT_NO_BITFIELDS
bool updatePending : 1;
bool grabOnly : 1;
+#else
+ bool updatePending = 1;
+ bool grabOnly = 1;
+#endif
};
QHash<QQuickWindow *, WindowData> m_windows;
diff --git a/src/quick/scenegraph/coreapi/qsgrenderer_p.h b/src/quick/scenegraph/coreapi/qsgrenderer_p.h
index b890728fd8..ae8d9f75d2 100644
--- a/src/quick/scenegraph/coreapi/qsgrenderer_p.h
+++ b/src/quick/scenegraph/coreapi/qsgrenderer_p.h
@@ -123,9 +123,15 @@ private:
const QSGBindable *m_bindable;
+#ifndef QT_NO_BITFIELDS
uint m_changed_emitted : 1;
uint m_is_rendering : 1;
uint m_is_preprocessing : 1;
+#else
+ uint m_changed_emitted = 1;
+ uint m_is_rendering = 1;
+ uint m_is_preprocessing = 1;
+#endif
};
class Q_QUICK_PRIVATE_EXPORT QSGBindable
diff --git a/src/quick/scenegraph/qsgrenderloop.cpp b/src/quick/scenegraph/qsgrenderloop.cpp
index 04c19a5501..58450d7a50 100644
--- a/src/quick/scenegraph/qsgrenderloop.cpp
+++ b/src/quick/scenegraph/qsgrenderloop.cpp
@@ -161,8 +161,13 @@ public:
QSGRenderContext *createRenderContext(QSGContext *) const override { return rc; }
struct WindowData {
+#ifndef QT_NO_BITFIELDS
bool updatePending : 1;
bool grabOnly : 1;
+#else
+ bool updatePending = 1;
+ bool grabOnly = 1;
+#endif
};
QHash<QQuickWindow *, WindowData> m_windows;
diff --git a/src/quick/scenegraph/qsgthreadedrenderloop_p.h b/src/quick/scenegraph/qsgthreadedrenderloop_p.h
index 32bfcb7148..7568047fd2 100644
--- a/src/quick/scenegraph/qsgthreadedrenderloop_p.h
+++ b/src/quick/scenegraph/qsgthreadedrenderloop_p.h
@@ -101,8 +101,13 @@ private:
QQuickWindow *window;
QSGRenderThread *thread;
QSurfaceFormat actualWindowFormat;
+#ifndef QT_NO_BITFIELDS
uint updateDuringSync : 1;
uint forceRenderPass : 1;
+#else
+ uint updateDuringSync = 1;
+ uint forceRenderPass = 1;
+#endif
};
friend class QSGRenderThread;
diff --git a/src/quick/scenegraph/util/qsgdefaultpainternode_p.h b/src/quick/scenegraph/util/qsgdefaultpainternode_p.h
index 084fc1e004..af265c0ec2 100644
--- a/src/quick/scenegraph/util/qsgdefaultpainternode_p.h
+++ b/src/quick/scenegraph/util/qsgdefaultpainternode_p.h
@@ -155,6 +155,7 @@ private:
#endif
qreal m_contentsScale;
+#ifndef QT_NO_BITFIELDS
bool m_dirtyContents : 1;
bool m_opaquePainting : 1;
bool m_linear_filtering : 1;
@@ -166,6 +167,20 @@ private:
bool m_dirtyGeometry : 1;
bool m_dirtyRenderTarget : 1;
bool m_dirtyTexture : 1;
+#else
+ bool m_dirtyContents = 1;
+ bool m_opaquePainting = 1;
+ bool m_linear_filtering = 1;
+ bool m_mipmapping = 1;
+ bool m_smoothPainting = 1;
+ bool m_extensionsChecked = 1;
+ bool m_multisamplingSupported = 1;
+ bool m_fastFBOResizing = 1;
+ bool m_dirtyGeometry = 1;
+ bool m_dirtyRenderTarget = 1;
+ bool m_dirtyTexture = 1;
+#endif
+
};
QT_END_NAMESPACE