mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-05 03:26:15 +02:00
Merge branch 'master' of https://github.com/highfidelity/hifi into 20301-addPlatformInfo
This commit is contained in:
commit
4918f7d186
4 changed files with 36 additions and 22 deletions
|
@ -1079,6 +1079,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
|||
|
||||
auto nodeList = DependencyManager::get<NodeList>();
|
||||
nodeList->startThread();
|
||||
nodeList->setFlagTimeForConnectionStep(true);
|
||||
|
||||
// move the AddressManager to the NodeList thread so that domain resets due to domain changes always occur
|
||||
// before we tell MyAvatar to go to a new location in the new domain
|
||||
|
|
|
@ -300,10 +300,10 @@ bool LimitedNodeList::packetSourceAndHashMatchAndTrackBandwidth(const udt::Packe
|
|||
} else {
|
||||
HIFI_FCDEBUG(networking(), "Replicated packet of type" << headerType
|
||||
<< "received from unknown upstream" << packet.getSenderSockAddr());
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
emit dataReceived(NodeType::Unassigned, packet.getPayloadSize());
|
||||
return true;
|
||||
|
@ -319,7 +319,7 @@ bool LimitedNodeList::packetSourceAndHashMatchAndTrackBandwidth(const udt::Packe
|
|||
SharedNodePointer matchingNode = nodeWithLocalID(sourceLocalID);
|
||||
sourceNode = matchingNode.data();
|
||||
}
|
||||
|
||||
|
||||
QUuid sourceID = sourceNode ? sourceNode->getUUID() : QUuid();
|
||||
|
||||
if (!sourceNode &&
|
||||
|
@ -1261,6 +1261,10 @@ void LimitedNodeList::flagTimeForConnectionStep(ConnectionStep connectionStep) {
|
|||
}
|
||||
|
||||
void LimitedNodeList::flagTimeForConnectionStep(ConnectionStep connectionStep, quint64 timestamp) {
|
||||
if (!_flagTimeForConnectionStep) {
|
||||
// this is only true in interface
|
||||
return;
|
||||
}
|
||||
if (connectionStep == ConnectionStep::LookupAddress) {
|
||||
QWriteLocker writeLock(&_connectionTimeLock);
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ public:
|
|||
bool getThisNodeCanWriteAssets() const { return _permissions.can(NodePermissions::Permission::canWriteToAssetServer); }
|
||||
bool getThisNodeCanKick() const { return _permissions.can(NodePermissions::Permission::canKick); }
|
||||
bool getThisNodeCanReplaceContent() const { return _permissions.can(NodePermissions::Permission::canReplaceDomainContent); }
|
||||
|
||||
|
||||
quint16 getSocketLocalPort() const { return _nodeSocket.localPort(); }
|
||||
Q_INVOKABLE void setSocketLocalPort(quint16 socketLocalPort);
|
||||
|
||||
|
@ -204,9 +204,9 @@ public:
|
|||
// This allows multiple threads (i.e. a thread pool) to share a lock
|
||||
// without deadlocking when a dying node attempts to acquire a write lock
|
||||
template<typename NestedNodeLambda>
|
||||
void nestedEach(NestedNodeLambda functor,
|
||||
int* lockWaitOut = nullptr,
|
||||
int* nodeTransformOut = nullptr,
|
||||
void nestedEach(NestedNodeLambda functor,
|
||||
int* lockWaitOut = nullptr,
|
||||
int* nodeTransformOut = nullptr,
|
||||
int* functorOut = nullptr) {
|
||||
auto start = usecTimestampNow();
|
||||
{
|
||||
|
@ -310,6 +310,9 @@ public:
|
|||
void setAuthenticatePackets(bool useAuthentication) { _useAuthentication = useAuthentication; }
|
||||
bool getAuthenticatePackets() const { return _useAuthentication; }
|
||||
|
||||
void setFlagTimeForConnectionStep(bool flag) { _flagTimeForConnectionStep = flag; }
|
||||
bool isFlagTimeForConnectionStep() { return _flagTimeForConnectionStep; }
|
||||
|
||||
static void makeSTUNRequestPacket(char* stunRequestPacket);
|
||||
|
||||
#if (PR_BUILD || DEV_BUILD)
|
||||
|
@ -440,6 +443,7 @@ private:
|
|||
using LocalIDMapping = tbb::concurrent_unordered_map<Node::LocalID, SharedNodePointer>;
|
||||
LocalIDMapping _localIDMap;
|
||||
Node::LocalID _sessionLocalID { 0 };
|
||||
bool _flagTimeForConnectionStep { false }; // only keep track in interface
|
||||
};
|
||||
|
||||
#endif // hifi_LimitedNodeList_h
|
||||
|
|
|
@ -24,6 +24,19 @@ const DELTA_X_MOVE_COLUMNS_THRESHOLD = 2;
|
|||
const DELTA_X_COLUMN_SWAP_POSITION = 5;
|
||||
const CERTIFIED_PLACEHOLDER = "** Certified **";
|
||||
|
||||
function decimalMegabytes(number) {
|
||||
return number ? (number / BYTES_PER_MEGABYTE).toFixed(1) : "";
|
||||
}
|
||||
|
||||
function displayIfNonZero(number) {
|
||||
return number ? number : "";
|
||||
}
|
||||
|
||||
function getFilename(url) {
|
||||
let urlParts = url.split('/');
|
||||
return urlParts[urlParts.length - 1];
|
||||
}
|
||||
|
||||
const COLUMNS = {
|
||||
type: {
|
||||
columnHeader: "Type",
|
||||
|
@ -79,6 +92,7 @@ const COLUMNS = {
|
|||
dropdownLabel: "Texture Size",
|
||||
propertyID: "texturesSize",
|
||||
initialWidth: 0.10,
|
||||
format: decimalMegabytes
|
||||
},
|
||||
hasTransparent: {
|
||||
columnHeader: "",
|
||||
|
@ -605,19 +619,6 @@ function loaded() {
|
|||
}));
|
||||
}
|
||||
|
||||
function decimalMegabytes(number) {
|
||||
return number ? (number / BYTES_PER_MEGABYTE).toFixed(1) : "";
|
||||
}
|
||||
|
||||
function displayIfNonZero(number) {
|
||||
return number ? number : "";
|
||||
}
|
||||
|
||||
function getFilename(url) {
|
||||
let urlParts = url.split('/');
|
||||
return urlParts[urlParts.length - 1];
|
||||
}
|
||||
|
||||
function updateEntityData(entityData) {
|
||||
entities = [];
|
||||
entitiesByID = {};
|
||||
|
@ -639,7 +640,7 @@ function loaded() {
|
|||
certificateID: entity.certificateID,
|
||||
verticesCount: displayIfNonZero(entity.verticesCount),
|
||||
texturesCount: displayIfNonZero(entity.texturesCount),
|
||||
texturesSize: decimalMegabytes(entity.texturesSize),
|
||||
texturesSize: entity.texturesSize,
|
||||
hasTransparent: entity.hasTransparent,
|
||||
isBaked: entity.isBaked,
|
||||
drawCalls: displayIfNonZero(entity.drawCalls),
|
||||
|
@ -874,7 +875,11 @@ function loaded() {
|
|||
if (column.data.glyph) {
|
||||
elCell.innerHTML = itemData[column.data.propertyID] ? column.data.columnHeader : null;
|
||||
} else {
|
||||
elCell.innerHTML = itemData[column.data.propertyID];
|
||||
let value = itemData[column.data.propertyID];
|
||||
if (column.data.format) {
|
||||
value = column.data.format(value);
|
||||
}
|
||||
elCell.innerHTML = value;
|
||||
}
|
||||
elCell.style = "min-width:" + column.widthPx + "px;" + "max-width:" + column.widthPx + "px;";
|
||||
elCell.className = createColumnClassName(column.columnID);
|
||||
|
|
Loading…
Reference in a new issue