diff options
author | Erik Kundiman <erik@megapahit.org> | 2024-11-10 15:14:20 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2024-11-10 15:14:20 +0800 |
commit | d5d514d07f334953c674ef64d4474b2decef24b3 (patch) | |
tree | edfec588bc211674f53cd7c759eedb77dcf1e4ec /indra/llrender/llimagegl.cpp | |
parent | 8c21d1177314c61c7e555d56ae4994f51003ee64 (diff) | |
parent | 13c0708cc70078e5118dd88de57d4ffd52f85024 (diff) |
Merge remote-tracking branch 'secondlife/release/2024.09-ExtraFPS' into 2024.09-ExtraFPS
Diffstat (limited to 'indra/llrender/llimagegl.cpp')
-rw-r--r-- | indra/llrender/llimagegl.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 1d39786c2a..09a2138b5e 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -2276,15 +2276,15 @@ void LLImageGL::analyzeAlpha(const void* data_in, U32 w, U32 h) // this will mid-skew the data (and thus increase the chances of not // being used as a mask) from high-frequency alpha maps which // suffer the worst from aliasing when used as alpha masks. - if (w >= 4 && h >= 4) + if (w >= 2 && h >= 2) { - llassert(w%4 == 0); - llassert(h%4 == 0); + llassert(w % 2 == 0); + llassert(h % 2 == 0); const GLubyte* rowstart = ((const GLubyte*) data_in) + mAlphaOffset; - for (U32 y = 0; y < h; y+=4) + for (U32 y = 0; y < h; y += 2) { const GLubyte* current = rowstart; - for (U32 x = 0; x < w; x+=4) + for (U32 x = 0; x < w; x += 2) { const U32 s1 = current[0]; alphatotal += s1; @@ -2307,8 +2307,7 @@ void LLImageGL::analyzeAlpha(const void* data_in, U32 w, U32 h) sample[asum/(16*4)] += 4; } - - rowstart += 4 * w * mAlphaStride; + rowstart += 2 * w * mAlphaStride; } length *= 2; // we sampled everything twice, essentially } |