, memberIndex(0)
, flags(flags)
{
- object->o = o;
- current->o = o;
- #if QT_POINTER_SIZE == 4
- object->tag = QV4::Value::Managed_Type;
- current->tag = QV4::Value::Managed_Type;
- #endif
-
- if (object->as<ArgumentsObject>()) {
- Scope scope(object->engine());
- Scoped<ArgumentsObject> (scope, object->asReturnedValue())->fullyCreate();
- }
+ init(o);
}
-ObjectIterator::ObjectIterator(Scope &scope, const ObjectRef o, uint flags)
- : object(ObjectRef::fromValuePointer(scope.alloc(1)))
- , current(ObjectRef::fromValuePointer(scope.alloc(1)))
+ObjectIterator::ObjectIterator(Scope &scope, Object *o, uint flags)
+ : object(scope.alloc(1))
+ , current(scope.alloc(1))
, arrayNode(0)
, arrayIndex(0)
, memberIndex(0)
, flags(flags)
{
- : object(ObjectRef::fromValuePointer(scratch1))
- , current(ObjectRef::fromValuePointer(scratch2))
+ init(o);
+ }
+
+ ObjectIterator::ObjectIterator(Value *scratch1, Value *scratch2, uint flags)
- object = (Object*)0;
- current = (Object*)0;
++ : object(scratch1)
++ , current(scratch2)
+ , arrayNode(0)
+ , arrayIndex(0)
+ , memberIndex(0)
+ , flags(flags)
+ {
-void ObjectIterator::init(const ObjectRef o)
++ object->o = (Object*)0;
++ current->o = (Object*)0;
+ // Caller needs to call init!
+ }
+
- object = o.getPointer();
- current = o.getPointer();
++void ObjectIterator::init(Object *o)
+ {
- if (!!object && object->asArgumentsObject()) {
+ object->o = o;
+ current->o = o;
+
+#if QT_POINTER_SIZE == 4
+ object->tag = QV4::Value::Managed_Type;
+ current->tag = QV4::Value::Managed_Type;
+#endif
+
+ if (object->as<ArgumentsObject>()) {
Scope scope(object->engine());
Scoped<ArgumentsObject> (scope, object->asReturnedValue())->fullyCreate();
}
uint memberIndex;
uint flags;
- ObjectIterator(Value *scratch1, Value *scratch2, const ObjectRef o, uint flags);
- ObjectIterator(Scope &scope, const ObjectRef o, uint flags);
- void init(const ObjectRef o);
- void next(StringRef name, uint *index, Property *pd, PropertyAttributes *attributes = 0);
+ ObjectIterator(Value *scratch1, Value *scratch2, Object *o, uint flags);
+ ObjectIterator(Scope &scope, Object *o, uint flags);
++ void init(Object *o);
+ void next(String *&name, uint *index, Property *pd, PropertyAttributes *attributes = 0);
ReturnedValue nextPropertyName(ValueRef value);
ReturnedValue nextPropertyNameAsString(ValueRef value);
ReturnedValue nextPropertyNameAsString();
syncResultedInChanges = false;
- bool repaintRequested = pendingUpdate & RepaintRequest;
- bool syncRequested = pendingUpdate & SyncRequest;
+ uint pending = pendingUpdate;
pendingUpdate = 0;
- if (syncRequested) {
- QSG_RT_DEBUG(" - update pending, doing sync");
- sync();
+ if (pending & SyncRequest) {
+ qCDebug(QSG_LOG_RENDERLOOP) << QSG_RT_PAD << "- updatePending, doing sync";
+ sync(pending == ExposeRequest);
}
+ #ifndef QSG_NO_RENDER_TIMING
+ if (profileFrames)
+ syncTime = threadTimer.nsecsElapsed();
+ #endif
- if (!syncResultedInChanges && !(repaintRequested)) {
- QSG_RT_DEBUG(" - no changes, rendering aborted");
+ if (!syncResultedInChanges && ((pending & RepaintRequest) == 0)) {
+ qCDebug(QSG_LOG_RENDERLOOP) << QSG_RT_PAD << "- no changes, render aborted";
int waitTime = vsyncDelta - (int) waitTimer.elapsed();
if (waitTime > 0)
msleep(waitTime);
return;
}
- if (profileFrames)
- syncTime = threadTimer.nsecsElapsed();
-
- QSG_RT_DEBUG(" - rendering starting");
+ qCDebug(QSG_LOG_RENDERLOOP) << QSG_RT_PAD << "- rendering started";
QQuickWindowPrivate *d = QQuickWindowPrivate::get(window);