diff options
author | Merov Linden <merov@lindenlab.com> | 2014-01-28 13:38:12 -0800 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2014-01-28 13:38:12 -0800 |
commit | 6dfba5829e3f9cf5986c627b537da55cf84c84c7 (patch) | |
tree | 11b6bb15aa713f29742680d66f7cfb4ec003ff1c /indra/newview | |
parent | 6bf3cb875cef4da7c35850ebbea5100dc5244601 (diff) |
ACME-1195 : Make SL Share snapshot use faster thumbnail computation and display
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llsnapshotlivepreview.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index 4463dfdc38..04dd86a77d 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -458,7 +458,7 @@ void LLSnapshotLivePreview::reshape(S32 width, S32 height, BOOL called_from_pare BOOL LLSnapshotLivePreview::setThumbnailImageSize() { - if(getWidth() < 10 || getHeight() < 10) + if (getWidth() < 10 || getHeight() < 10) { return FALSE ; } @@ -468,8 +468,6 @@ BOOL LLSnapshotLivePreview::setThumbnailImageSize() F32 aspect_ratio = ((F32)width) / ((F32)height); // UI size for thumbnail - // *FIXME: the rect does not change, so maybe there's no need to recalculate max w/h. - //const LLRect& thumbnail_rect = mThumbnailPlaceholderRect; S32 max_width = mThumbnailPlaceholderRect.getWidth(); S32 max_height = mThumbnailPlaceholderRect.getHeight(); @@ -485,14 +483,14 @@ BOOL LLSnapshotLivePreview::setThumbnailImageSize() mThumbnailHeight = max_height; mThumbnailWidth = llround((F32)max_height * aspect_ratio); } - + if (mThumbnailWidth > width || mThumbnailHeight > height) { return FALSE ;//if the window is too small, ignore thumbnail updating. } S32 left = 0 , top = mThumbnailHeight, right = mThumbnailWidth, bottom = 0 ; - if(!mKeepAspectRatio && !mThumbnailSubsampled) + if (!mKeepAspectRatio) { F32 ratio_x = (F32)getWidth() / width ; F32 ratio_y = (F32)getHeight() / height ; @@ -643,10 +641,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) } // time to produce a snapshot - //previewp->setThumbnailImageSize(); - lldebugs << "producing snapshot" << llendl; - llinfos << "Merov : producing snapshot" << llendl; if (!previewp->mPreviewImage) { previewp->mPreviewImage = new LLImageRaw; @@ -732,7 +727,6 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) previewp->generateThumbnailImage() ; } lldebugs << "done creating snapshot" << llendl; - llinfos << "Merov : Done creating snapshot" << llendl; LLFloaterSnapshot::postUpdate(); LLFloaterFacebook::postUpdate(); LLFloaterFlickr::postUpdate(); |