Merge 5.11 into 5.11.2
Change-Id: I886fb173e156fb719d5e1d84cb1b0f3052a606b4
This commit is contained in:
commit
f25824e0b2
|
|
@ -45,12 +45,29 @@ using namespace QV4;
|
|||
|
||||
DEFINE_MANAGED_VTABLE(MemberData);
|
||||
|
||||
static size_t nextPowerOfTwo(size_t s)
|
||||
{
|
||||
--s;
|
||||
s |= s >> 1;
|
||||
s |= s >> 2;
|
||||
s |= s >> 4;
|
||||
s |= s >> 8;
|
||||
s |= s >> 16;
|
||||
#if (QT_POINTER_SIZE == 8)
|
||||
s |= s >> 32;
|
||||
#endif
|
||||
++s;
|
||||
return s;
|
||||
}
|
||||
|
||||
Heap::MemberData *MemberData::allocate(ExecutionEngine *e, uint n, Heap::MemberData *old)
|
||||
{
|
||||
Q_ASSERT(!old || old->values.size < n);
|
||||
Q_ASSERT(n);
|
||||
|
||||
size_t alloc = MemoryManager::align(sizeof(Heap::MemberData) + (n - 1)*sizeof(Value));
|
||||
// round up to next power of two to avoid quadratic behaviour for very large objects
|
||||
alloc = nextPowerOfTwo(alloc);
|
||||
Heap::MemberData *m = e->memoryManager->allocManaged<MemberData>(alloc);
|
||||
if (old)
|
||||
// no write barrier required here
|
||||
|
|
|
|||
|
|
@ -349,11 +349,16 @@ void QSGGuiThreadRenderLoop::windowDestroyed(QQuickWindow *window)
|
|||
|
||||
void QSGGuiThreadRenderLoop::renderWindow(QQuickWindow *window)
|
||||
{
|
||||
QQuickWindowPrivate *cd = QQuickWindowPrivate::get(window);
|
||||
if (!cd->isRenderable() || !m_windows.contains(window))
|
||||
if (!m_windows.contains(window))
|
||||
return;
|
||||
|
||||
WindowData &data = const_cast<WindowData &>(m_windows[window]);
|
||||
bool alsoSwap = data.updatePending;
|
||||
data.updatePending = false;
|
||||
|
||||
QQuickWindowPrivate *cd = QQuickWindowPrivate::get(window);
|
||||
if (!cd->isRenderable())
|
||||
return;
|
||||
|
||||
bool current = false;
|
||||
|
||||
|
|
@ -380,9 +385,6 @@ void QSGGuiThreadRenderLoop::renderWindow(QQuickWindow *window)
|
|||
current = gl->makeCurrent(window);
|
||||
}
|
||||
|
||||
bool alsoSwap = data.updatePending;
|
||||
data.updatePending = false;
|
||||
|
||||
bool lastDirtyWindow = true;
|
||||
auto i = m_windows.constBegin();
|
||||
while (i != m_windows.constEnd()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue