Thickbrick's fixes
This commit is contained in:
@@ -1052,9 +1052,7 @@ bool LLAppViewer::mainLoop()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const F64 min_frame_time = 0.0; //(.0333 - .0010); // max video frame rate = 30 fps
|
const F64 max_idle_time = run_multiple_threads ? 0.0 : llmin(.005*10.0*gFrameIntervalSeconds, 0.005); // 50ms/second, no more than 5ms/frame
|
||||||
const F64 min_idle_time = 0.0; //(.0010); // min idle time = 1 ms
|
|
||||||
const F64 max_idle_time = run_multiple_threads ? min_idle_time : llmin(.005*10.0*gFrameTimeSeconds, 0.005); // 5 ms a second
|
|
||||||
idleTimer.reset();
|
idleTimer.reset();
|
||||||
while(1)
|
while(1)
|
||||||
{
|
{
|
||||||
@@ -1070,11 +1068,8 @@ bool LLAppViewer::mainLoop()
|
|||||||
ms_sleep(llmin(io_pending/100,100)); // give the vfs some time to catch up
|
ms_sleep(llmin(io_pending/100,100)); // give the vfs some time to catch up
|
||||||
}
|
}
|
||||||
|
|
||||||
F64 frame_time = frameTimer.getElapsedTimeF64();
|
|
||||||
F64 idle_time = idleTimer.getElapsedTimeF64();
|
F64 idle_time = idleTimer.getElapsedTimeF64();
|
||||||
if (frame_time >= min_frame_time &&
|
if (!work_pending || idle_time >= max_idle_time)
|
||||||
idle_time >= min_idle_time &&
|
|
||||||
(!work_pending || idle_time >= max_idle_time))
|
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -372,9 +372,10 @@ bool LLTextureCacheRemoteWorker::doRead()
|
|||||||
if (!done && (mState == LOCAL))
|
if (!done && (mState == LOCAL))
|
||||||
{
|
{
|
||||||
llassert(local_size != 0); // we're assuming there is a non empty local file here...
|
llassert(local_size != 0); // we're assuming there is a non empty local file here...
|
||||||
if (!mDataSize || mDataSize > local_size)
|
llassert(mReadData == NULL);
|
||||||
|
if (!mDataSize || mDataSize > (local_size - mOffset))
|
||||||
{
|
{
|
||||||
mDataSize = local_size;
|
mDataSize = local_size - mOffset;
|
||||||
}
|
}
|
||||||
// Allocate read buffer
|
// Allocate read buffer
|
||||||
mReadData = new U8[mDataSize];
|
mReadData = new U8[mDataSize];
|
||||||
|
|||||||
@@ -322,6 +322,10 @@ LLViewerImage::LLViewerImage(const LLUUID& id, const LLHost& host, BOOL usemipma
|
|||||||
{
|
{
|
||||||
init(true);
|
init(true);
|
||||||
sImageCount++;
|
sImageCount++;
|
||||||
|
if (host != LLHost::invalid)
|
||||||
|
{
|
||||||
|
mCanUseHTTP = false; // this is a baked texture
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LLViewerImage::LLViewerImage(const std::string& url, const LLUUID& id, BOOL usemipmaps)
|
LLViewerImage::LLViewerImage(const std::string& url, const LLUUID& id, BOOL usemipmaps)
|
||||||
|
|||||||
@@ -5184,12 +5184,6 @@ void LLVOAvatar::updateTextures()
|
|||||||
if (texture_dict->mIsLocalTexture)
|
if (texture_dict->mIsLocalTexture)
|
||||||
{
|
{
|
||||||
addLocalTextureStats((ETextureIndex)index, imagep, texel_area_ratio, render_avatar, layer_baked[baked_index]);
|
addLocalTextureStats((ETextureIndex)index, imagep, texel_area_ratio, render_avatar, layer_baked[baked_index]);
|
||||||
// SNOW-8 : temporary snowglobe1.0 fix for baked textures
|
|
||||||
if (render_avatar && !gGLManager.mIsDisabled )
|
|
||||||
{
|
|
||||||
// bind the texture so that its boost level won't be slammed
|
|
||||||
gGL.getTexUnit(0)->bind(imagep);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (texture_dict->mIsBakedTexture)
|
else if (texture_dict->mIsBakedTexture)
|
||||||
{
|
{
|
||||||
@@ -5226,8 +5220,14 @@ void LLVOAvatar::addLocalTextureStats( ETextureIndex idx, LLViewerImage* imagep,
|
|||||||
F32 desired_pixels;
|
F32 desired_pixels;
|
||||||
if( mIsSelf )
|
if( mIsSelf )
|
||||||
{
|
{
|
||||||
desired_pixels = llmin(mPixelArea, (F32)TEX_IMAGE_AREA_SELF );
|
desired_pixels = llmax(mPixelArea, (F32)TEX_IMAGE_AREA_SELF );
|
||||||
imagep->setBoostLevel(LLViewerImageBoostLevel::BOOST_AVATAR_SELF);
|
imagep->setBoostLevel(LLViewerImageBoostLevel::BOOST_AVATAR_SELF);
|
||||||
|
// SNOW-8 : temporary snowglobe1.0 fix for baked textures
|
||||||
|
if (render_avatar && !gGLManager.mIsDisabled )
|
||||||
|
{
|
||||||
|
// bind the texture so that its boost level won't be slammed
|
||||||
|
gGL.getTexUnit(0)->bind(imagep);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user