diff options
| author | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2026-05-29 05:29:27 -0400 |
|---|---|---|
| committer | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2026-05-29 05:29:27 -0400 |
| commit | c299c8038e73e541cafe3c8df135752cb48b903c (patch) | |
| tree | 288c2848f2f4da4bbf2c3acc500e5a29818700f9 /indra/llprimitive/lltextureentry.h | |
| parent | 375ade3df2930cdc6087e1b4e4c31851ed5be762 (diff) | |
Add watermark driven discards.
Does a much better job of staying within the memory budget.
Diffstat (limited to 'indra/llprimitive/lltextureentry.h')
| -rw-r--r-- | indra/llprimitive/lltextureentry.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/llprimitive/lltextureentry.h b/indra/llprimitive/lltextureentry.h index 78c61b4d65..765a5f5fdc 100644 --- a/indra/llprimitive/lltextureentry.h +++ b/indra/llprimitive/lltextureentry.h @@ -143,6 +143,13 @@ public: F32 getScaleS() const { return mScaleS; } F32 getScaleT() const { return mScaleT; } + // Cached min(|mScaleS|, |mScaleT|)^2, lazily computed and invalidated + // in setScale/setScaleS/setScaleT. Used by the texture streaming face + // loop (updateImageDecodePriority) to avoid the per-face per-frame + // sqrt/abs/min/multiply chain. Returns the raw (unclamped) value; + // callers still apply TextureScaleMin/MaxAreaFactor clamps. + F32 getMinScaleSq() const; + void getOffset(F32 *s, F32 *t) const { *s = mOffsetS; *t = mOffsetT; } F32 getOffsetS() const { return mOffsetS; } F32 getOffsetT() const { return mOffsetT; } @@ -218,6 +225,13 @@ public: F32 mOffsetT; // S, T offset F32 mRotation; // anti-clockwise rotation in rad about the bottom left corner +private: + // Cache for getMinScaleSq(). -1.f sentinel = stale. Invalidated by + // setScale/setScaleS/setScaleT. Mutable so getMinScaleSq() can fill it + // on first read without breaking const correctness for read-only callers. + mutable F32 mMinScaleSq = -1.f; +public: + static const LLTextureEntry null; // LLSD key defines |
