summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRichard Linden <none@none>2011-11-15 12:51:07 -0800
committerRichard Linden <none@none>2011-11-15 12:51:07 -0800
commitaa909a86cbc613f39cbc6eb395b01b7886171496 (patch)
tree2e7626a7ad691f47a2d01ff849c8faa99ec787cf /indra/newview
parent59a7cc2e0fdba593c6bd444d01ff5ac0bd2fc9cd (diff)
EXP-1561 FIX Preview image looks stretched
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloatersnapshot.cpp24
1 files changed, 9 insertions, 15 deletions
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index d0d681132b..63fa93b1a1 100644
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -380,7 +380,6 @@ void LLSnapshotLivePreview::updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail
{
mThumbnailUpToDate = FALSE ;
}
- setThumbnailImageSize();
}
void LLSnapshotLivePreview::setSnapshotQuality(S32 quality)
@@ -723,25 +722,19 @@ void LLSnapshotLivePreview::generateThumbnailImage(BOOL force_update)
resetThumbnailImage() ;
}
- LLPointer<LLImageRaw> raw = NULL ;
- S32 w , h ;
- w = get_lower_power_two(mThumbnailWidth, 512) * 2 ;
- h = get_lower_power_two(mThumbnailHeight, 512) * 2 ;
-
+ LLPointer<LLImageRaw> raw = new LLImageRaw;
+ if(!gViewerWindow->thumbnailSnapshot(raw,
+ mThumbnailWidth, mThumbnailHeight,
+ gSavedSettings.getBOOL("RenderUIInSnapshot"),
+ FALSE,
+ mSnapshotBufferType) )
{
- raw = new LLImageRaw ;
- if(!gViewerWindow->thumbnailSnapshot(raw,
- w, h,
- gSavedSettings.getBOOL("RenderUIInSnapshot"),
- FALSE,
- mSnapshotBufferType) )
- {
- raw = NULL ;
- }
+ raw = NULL ;
}
if(raw)
{
+ raw->expandToPowerOfTwo();
mThumbnailImage = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE);
mThumbnailUpToDate = TRUE ;
}
@@ -791,6 +784,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
}
// time to produce a snapshot
+ previewp->setThumbnailImageSize();
lldebugs << "producing snapshot" << llendl;
if (!previewp->mPreviewImage)