diff options
author | Ayane <chanayane83@gmail.com> | 2024-07-17 01:47:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-17 02:47:22 +0300 |
commit | bd0baebb6eea478260880d04e34f6b3181d883a6 (patch) | |
tree | c282e22c3a2f709e878197c936b380c500608685 /indra/newview/llagentbenefits.cpp | |
parent | b05ab692ba60438e3900b351d654bc0124a42f50 (diff) |
Raised the 512x512 limitation for uploading snapshots to inventory to 2048x2048 (#2025)
Diffstat (limited to 'indra/newview/llagentbenefits.cpp')
-rw-r--r-- | indra/newview/llagentbenefits.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/indra/newview/llagentbenefits.cpp b/indra/newview/llagentbenefits.cpp index e9f00f6556..f651b42010 100644 --- a/indra/newview/llagentbenefits.cpp +++ b/indra/newview/llagentbenefits.cpp @@ -195,6 +195,19 @@ S32 LLAgentBenefits::getTextureUploadCost(const LLImageBase* tex) const return getTextureUploadCost(); } +S32 LLAgentBenefits::getTextureUploadCost(S32 w, S32 h) const +{ + if (w > 0 && h > 0) + { + S32 area = w * h; + if (area >= MIN_2K_TEXTURE_AREA) + { + return get2KTextureUploadCost(area); + } + } + return getTextureUploadCost(); +} + S32 LLAgentBenefits::get2KTextureUploadCost(S32 area) const { if (m_2k_texture_upload_cost.empty()) |