Thickbrick's fixes

This commit is contained in:
Siana Gearz
2010-11-18 20:22:11 +01:00
parent c1c2f65b12
commit d5fee73c42
4 changed files with 16 additions and 16 deletions

View File

@@ -1052,9 +1052,7 @@ bool LLAppViewer::mainLoop()
}
const F64 min_frame_time = 0.0; //(.0333 - .0010); // max video frame rate = 30 fps
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
const F64 max_idle_time = run_multiple_threads ? 0.0 : llmin(.005*10.0*gFrameIntervalSeconds, 0.005); // 50ms/second, no more than 5ms/frame
idleTimer.reset();
while(1)
{
@@ -1070,11 +1068,8 @@ bool LLAppViewer::mainLoop()
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();
if (frame_time >= min_frame_time &&
idle_time >= min_idle_time &&
(!work_pending || idle_time >= max_idle_time))
if (!work_pending || idle_time >= max_idle_time)
{
break;
}

View File

@@ -372,9 +372,10 @@ bool LLTextureCacheRemoteWorker::doRead()
if (!done && (mState == LOCAL))
{
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
mReadData = new U8[mDataSize];

View File

@@ -322,6 +322,10 @@ LLViewerImage::LLViewerImage(const LLUUID& id, const LLHost& host, BOOL usemipma
{
init(true);
sImageCount++;
if (host != LLHost::invalid)
{
mCanUseHTTP = false; // this is a baked texture
}
}
LLViewerImage::LLViewerImage(const std::string& url, const LLUUID& id, BOOL usemipmaps)

View File

@@ -5184,12 +5184,6 @@ void LLVOAvatar::updateTextures()
if (texture_dict->mIsLocalTexture)
{
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)
{
@@ -5226,8 +5220,14 @@ void LLVOAvatar::addLocalTextureStats( ETextureIndex idx, LLViewerImage* imagep,
F32 desired_pixels;
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);
// 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
{