void LLCacheName::Impl::processUUIDReply(LLMessageSystem* msg, bool isGroup) { S32 count = msg->getNumberOfBlocksFast(_PREHASH_UUIDNameBlock); for(S32 i = 0; i < count; ++i) { LLUUID id; msg->getUUIDFast(_PREHASH_UUIDNameBlock, _PREHASH_ID, id, i); LLCacheNameEntry* entry = get_ptr_in_map(mCache, id); if (!entry) { entry = new LLCacheNameEntry; mCache[id] = entry; } mPendingQueue.erase(id); entry->mIsGroup = isGroup; entry->mCreateTime = (U32)time(NULL); if (!isGroup) { msg->getStringFast(_PREHASH_UUIDNameBlock, _PREHASH_FirstName, entry->mFirstName, i); msg->getStringFast(_PREHASH_UUIDNameBlock, _PREHASH_LastName, entry->mLastName, i); } else { // is group msg->getStringFast(_PREHASH_UUIDNameBlock, _PREHASH_GroupName, entry->mGroupName, i); LLStringFn::replace_ascii_controlchars(entry->mGroupName, LL_UNKNOWN_CHAR); } if (!isGroup) { // NOTE: Very occasionally the server sends down a full name // in the first name field with an empty last name, for example, // first = "Ladanie1 Resident", last = "". // I cannot reproduce this, nor can I find a bug in the server code. // Ensure "Resident" does not appear via cleanFullName, because // buildFullName only checks last name. JC std::string full_name; if (entry->mLastName.empty()) { full_name = cleanFullName(entry->mFirstName); //fix what we are putting in the cache entry->mFirstName = full_name; entry->mLastName = "Resident"; } else { full_name = LLCacheName::buildFullName(entry->mFirstName, entry->mLastName); } mSignal(id, full_name, false); mReverseCache[full_name] = id; } else { mSignal(id, entry->mGroupName, true); mReverseCache[entry->mGroupName] = id; } } }
bool TerrainShaderUpdateTask::executeTaskInMainThread() { for (std::vector<const TerrainShader*>::const_iterator I = mShaders.begin(); I != mShaders.end(); ++I) { mSignal(*I, mAreas); } return true; }
void LLToolPipette::setTextureEntry(const LLTextureEntry* entry) { if (entry) { mTextureEntry = *entry; mSignal(mTextureEntry); } }
void Device::update() { lock_guard<mutex> lock( mMutex ); if ( mListener.mNewFrame ) { mSignal( mListener.mFrame ); mListener.mNewFrame = false; } const Leap::ScreenList& screens = mController->calibratedScreens(); mScreens.clear(); for ( const Leap::Screen& iter : screens ) { mScreens[ iter.id() ] = Screen( iter ); } }
void LLControlVariable::setValue(const LLSD& value, bool saved_value) { LLSD storable_value = getComparableValue(value); bool value_changed = llsd_compare(getValue(), storable_value) == FALSE; if(saved_value) { // If we're going to save this value, return to default but don't fire resetToDefault(false); if (llsd_compare(mValues.back(), storable_value) == FALSE) { mValues.push_back(storable_value); } } else { // This is a unsaved value. Its needs to reside at // mValues[2] (or greater). It must not affect // the result of getSaveValue() if (llsd_compare(mValues.back(), storable_value) == FALSE) { while(mValues.size() > 2) { // Remove any unsaved values. mValues.pop_back(); } if(mValues.size() < 2) { // Add the default to the 'save' value. mValues.push_back(mValues[0]); } // Add the 'un-save' value. mValues.push_back(storable_value); } } if(value_changed) { mSignal(storable_value); } }
void TerrainMaterialCompilationTask::executeTaskInMainThread() { TimedLog timedLog("TerrainMaterialCompilationTask::executeTaskInMainThread"); for (CompilationInstanceStore::const_iterator J = mMaterialRecompilations.begin(); J != mMaterialRecompilations.end(); ++J) { TerrainPageSurfaceCompilationInstance* compilationInstance = J->first; TerrainPage* page = J->second; compilationInstance->compile(page->getMaterial()); S_LOG_VERBOSE("Compiling terrain page composite map material"); compilationInstance->compileCompositeMap(page->getCompositeMapMaterial()); S_LOG_VERBOSE("Recompiled material for terrain page " << "[" << page->getWFIndex().first << "|" << page->getWFIndex().second << "]"); page->getSurface()->getShadow()->setShadowTextureName(compilationInstance->getShadowTextureName(page->getMaterial())); mSignal(page); // Notify the terrain system of the material change delete compilationInstance; std::stringstream ss; ss << "Compiled for page [" << page->getWFIndex().first << "|" << page->getWFIndex().second << "]"; timedLog.report(ss.str()); } updateSceneManagersAfterMaterialsChange(); }