diff options
| author | Erik Kundiman <erik@megapahit.org> | 2026-09-04 23:09:56 +0800 |
|---|---|---|
| committer | Erik Kundiman <erik@megapahit.org> | 2026-09-04 23:25:54 +0800 |
| commit | 7f8684301a716d23343cd6e85a4759f3a11546d4 (patch) | |
| tree | 989df6258c0399431aba03da5805d93542db5317 | |
| parent | 0400b6693648c58f901c2b492a78e332815bcaa2 (diff) | |
| parent | a4aa5233cad1fb66555e7768750af1b57bc1da7c (diff) | |
Merge tag 'Second_Life_Release#a4aa523-26.4' into 26.4
| -rw-r--r-- | indra/llrender/llfontfreetype.cpp | 18 | ||||
| -rw-r--r-- | indra/llrender/llfontfreetype.h | 2 | ||||
| -rw-r--r-- | indra/llrender/llfontgl.cpp | 28 | ||||
| -rw-r--r-- | indra/llui/lltextbase.cpp | 2 | ||||
| -rw-r--r-- | indra/llwebrtc/llwebrtc.cpp | 16 | ||||
| -rw-r--r-- | indra/newview/llappviewer.cpp | 4 | ||||
| -rw-r--r-- | indra/newview/llfloateraddpaymentmethod.cpp | 5 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/floater_add_payment_method.xml | 4 |
8 files changed, 57 insertions, 22 deletions
diff --git a/indra/llrender/llfontfreetype.cpp b/indra/llrender/llfontfreetype.cpp index 73540200c9..ab3089a269 100644 --- a/indra/llrender/llfontfreetype.cpp +++ b/indra/llrender/llfontfreetype.cpp @@ -115,7 +115,7 @@ LLFontGlyphInfo::LLFontGlyphInfo(U32 index, EFontGlyphType glyph_type) mChar(0), mWidth(0), // In pixels mHeight(0), // In pixels - mXAdvance(0.f), // In pixels + mXAdvanceRaw(0.f), // In pixels mYAdvance(0.f), // In pixels mXBitmapOffset(0), // Offset to the origin in the bitmap mYBitmapOffset(0), // Offset to the origin in the bitmap @@ -133,7 +133,7 @@ LLFontGlyphInfo::LLFontGlyphInfo(const LLFontGlyphInfo& fgi) , mChar(fgi.mChar) , mWidth(fgi.mWidth) , mHeight(fgi.mHeight) - , mXAdvance(fgi.mXAdvance) + , mXAdvanceRaw(fgi.mXAdvanceRaw) , mYAdvance(fgi.mYAdvance) , mXBitmapOffset(fgi.mXBitmapOffset) , mYBitmapOffset(fgi.mYBitmapOffset) @@ -356,14 +356,14 @@ F32 LLFontFreetype::getXAdvance(llwchar wch) const { return mMaxDigitWidth; } - return gi->mXAdvance; + return gi->mXAdvanceRaw; } else { char_glyph_info_map_t::iterator found_it = mCharGlyphInfoMap.find((llwchar)0); if (found_it != mCharGlyphInfoMap.end()) { - return found_it->second->mXAdvance; + return found_it->second->mXAdvanceRaw; } } @@ -382,7 +382,7 @@ F32 LLFontFreetype::getXAdvance(const LLFontGlyphInfo* glyph) const return mMaxDigitWidth; } - return glyph->mXAdvance; + return glyph->mXAdvanceRaw; } F32 LLFontFreetype::getXKerning(llwchar char_left, llwchar char_right) const @@ -637,15 +637,15 @@ LLFontGlyphInfo* LLFontFreetype::addGlyphFromFont(const LLFontFreetype *fontp, l gi->mLsbDelta = (S32)fontp->mFTFace->glyph->lsb_delta; gi->mRsbDelta = (S32)fontp->mFTFace->glyph->rsb_delta; // Convert these from 26.6 units to float pixels. - gi->mXAdvance = fontp->mFTFace->glyph->advance.x / 64.f; + gi->mXAdvanceRaw = fontp->mFTFace->glyph->advance.x / 64.f; gi->mYAdvance = fontp->mFTFace->glyph->advance.y / 64.f; if (mWeight > 0 && wch >= '0' && wch <= '9') { // Digits are supposed to be preloaded, and buffers - // refresh when new chars get added, so this lazy load - // should not cause any issues. - mMaxDigitWidth = llmax(mMaxDigitWidth, gi->mXAdvance); + // refresh when new chars get added (mGeneration), + // so this lazy load should not cause any issues. + mMaxDigitWidth = llmax(mMaxDigitWidth, gi->mXAdvanceRaw); } insertGlyphInfo(wch, gi); diff --git a/indra/llrender/llfontfreetype.h b/indra/llrender/llfontfreetype.h index 3191ca8df7..608313b4d6 100644 --- a/indra/llrender/llfontfreetype.h +++ b/indra/llrender/llfontfreetype.h @@ -83,7 +83,7 @@ struct LLFontGlyphInfo // Metrics S32 mWidth; // In pixels S32 mHeight; // In pixels - F32 mXAdvance; // In pixels + F32 mXAdvanceRaw; // In pixels, don't use directly, use getXAdvance() for tabular numbers to work correctly. F32 mYAdvance; // In pixels // Information for actually rendering diff --git a/indra/llrender/llfontgl.cpp b/indra/llrender/llfontgl.cpp index bb5a12375e..89da15ed43 100644 --- a/indra/llrender/llfontgl.cpp +++ b/indra/llrender/llfontgl.cpp @@ -349,8 +349,9 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons F32 x_offset = 0.0f; if (mFontFreetype->getFontWeight() > 0 && fgi->mChar >= '0' && fgi->mChar <= '9' && mFontFreetype->getMaxDigitWidth() > 0.0f) { - // use mXAdvance directly here, since we don't want to get max width instead. - x_offset = (mFontFreetype->getMaxDigitWidth() - fgi->mXAdvance) * 0.5f; + // getXAdvance will return max digit width. + // use mXAdvanceRaw directly here, since we don't want to get max width instead. + x_offset = (mFontFreetype->getMaxDigitWidth() - fgi->mXAdvanceRaw) * 0.5f; } // Draw the text at the appropriate location @@ -613,10 +614,15 @@ S32 LLFontGL::maxDrawableChars(const llwchar* wchars, F32 max_pixels, S32 max_ch S32 start_of_last_word = 0; bool in_word = false; - // avoid S32 overflow when max_pixels == S32_MAX by staying in floating point F32 scaled_max_pixels = max_pixels * sScaleX; + if (scaled_max_pixels >= (F32)S32_MAX) + { + scaled_max_pixels = (F32)S32_MAX; + } + F32 width_padding = 0.f; + const S32 LAST_CHARACTER = LLFontFreetype::LAST_CHAR_FULL; LLFontGlyphInfo* next_glyph = NULL; S32 i; @@ -673,21 +679,25 @@ S32 LLFontGL::maxDrawableChars(const llwchar* wchars, F32 max_pixels, S32 max_ch } } + F32 advance = mFontFreetype->getXAdvance(fgi); + // account for glyphs that run beyond the starting point for the next glyphs width_padding = llmax( 0.f, // always use positive padding amount - width_padding - fgi->mXAdvance, // previous padding left over after advance of current character - (F32)(fgi->mWidth + fgi->mXBearing) - fgi->mXAdvance); // difference between width of this character and advance to next character + width_padding - advance, // previous padding left over after advance of current character + (F32)(fgi->mWidth + fgi->mXBearing) - advance); // difference between width of this character and advance to next character - cur_x += fgi->mXAdvance; + cur_x += advance; - // clip if current character runs past scaled_max_pixels (using width_padding) + // Clip if current character runs past scaled_max_pixels (using width_padding) if (scaled_max_pixels < cur_x + width_padding) { clip = true; break; } - if (((i+1) < max_chars) && wchars[i+1]) + if (((i+1) < max_chars) + && wchars[i+1] + && (wchars[i + 1] < LAST_CHARACTER)) { // Kern this puppy. next_glyph = mFontFreetype->getGlyphInfo(wchars[i+1], EFontGlyphType::Unspecified); @@ -743,7 +753,7 @@ S32 LLFontGL::firstDrawableChar(const llwchar* wchars, F32 max_pixels, S32 text_ // other characters just use advance F32 width = (i == start) ? (F32)(fgi->mWidth + fgi->mXBearing) // use actual width for last character - : fgi->mXAdvance; // use advance for all other characters + : mFontFreetype->getXAdvance(fgi); // use advance for all other characters if( scaled_max_pixels < (total_width + width) ) { diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 06645df203..f0c3c97ef9 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -4151,7 +4151,7 @@ S32 LLInlineViewSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 lin { return 0; } - else if (line_offset != 0 && num_pixels < mView->getRect().getWidth()) + else if (line_offset != 0 && num_pixels < (mLeftPad + mRightPad + mView->getRect().getWidth())) { return 0; } diff --git a/indra/llwebrtc/llwebrtc.cpp b/indra/llwebrtc/llwebrtc.cpp index ce5f487b32..4b98944d10 100644 --- a/indra/llwebrtc/llwebrtc.cpp +++ b/indra/llwebrtc/llwebrtc.cpp @@ -720,7 +720,11 @@ void LLWebRTCImpl::workerStartPlayout() { // Only run playout while voice is enabled and there's a connection to // render (running the output device otherwise is heard as a buzz). +#if CM_WEBRTC if (!mDeviceModule || !mVoiceEnabled || mTuningMode || mDeviceModule->Playing() || mPeerConnections.empty()) +#else + if (!mDeviceModule || !mVoiceEnabled || mTuningMode || mPeerConnections.empty()) +#endif { return; } @@ -744,6 +748,18 @@ void LLWebRTCImpl::workerStartPlayout() } } +#if !CM_WEBRTC + if (mDeviceModule->Playing()) + { + if (mDeviceModule->GetPlayoutDevice() == playoutDevice) + { + return; + } + + mDeviceModule->StopPlayout(); + } +#endif + #if WEBRTC_WIN if (playoutDevice < 0) { diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 39a89a9373..8b99657618 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3195,7 +3195,9 @@ bool LLAppViewer::initConfiguration() // This happens AFTER LLSplashScreen::show(). That may or may not be // important. // - if (mSecondInstance && !gSavedSettings.getBOOL("AllowMultipleViewers")) + if (mSecondInstance + && !gGPUBenchmarkMode + && !gSavedSettings.getBOOL("AllowMultipleViewers")) { OSMessageBox( LLTrans::getString("MBAlreadyRunning"), diff --git a/indra/newview/llfloateraddpaymentmethod.cpp b/indra/newview/llfloateraddpaymentmethod.cpp index fc962ce89f..64bd7b6aa1 100644 --- a/indra/newview/llfloateraddpaymentmethod.cpp +++ b/indra/newview/llfloateraddpaymentmethod.cpp @@ -29,6 +29,7 @@ #include "llfloateraddpaymentmethod.h" #include "llnotificationsutil.h" #include "lluictrlfactory.h" +#include "llviewernetwork.h" #include "llweb.h" @@ -63,7 +64,9 @@ void LLFloaterAddPaymentMethod::onContinueBtn() S32 opt = LLNotificationsUtil::getSelectedOption(notif, resp); if (opt == 0) { - LLWeb::loadURL(this->getString("continue_url")); + const std::string& grid_id = LLGridManager::getInstance()->getGridId(); + const std::string& grid_id_lower = utf8str_tolower(grid_id); + LLWeb::loadURL(getString(grid_id_lower == "damballah" ? "continue_staging_url" : "continue_url")); } }); } diff --git a/indra/newview/skins/default/xui/en/floater_add_payment_method.xml b/indra/newview/skins/default/xui/en/floater_add_payment_method.xml index 308f4feb5a..18f5f2af32 100644 --- a/indra/newview/skins/default/xui/en/floater_add_payment_method.xml +++ b/indra/newview/skins/default/xui/en/floater_add_payment_method.xml @@ -17,6 +17,10 @@ name="continue_url"> https://secondlife.com/my/lindex/buy.php?associate_for_viewer=1 </floater.string> + <floater.string + name="continue_staging_url"> + https://secondlife-staging.com/my/lindex/buy.php?associate_for_viewer=1 + </floater.string> <panel background_opaque="false" bg_alpha_color="PanelGray" |
