diff options
author | Merov Linden <merov@lindenlab.com> | 2014-01-28 17:45:48 -0800 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2014-01-28 17:45:48 -0800 |
commit | b35889a6510440692be4b7f1aa590cf645fbba90 (patch) | |
tree | c570c084a7c154883d043b93b80ef7c4d64b448d /indra/newview/llfloaterflickr.cpp | |
parent | 6dfba5829e3f9cf5986c627b537da55cf84c84c7 (diff) |
ACME-1195 : Complete perf improvements. Also we do not regrab/refresh when we don't have to (e.g. change format) in particular when changing filter. Better control that way and faster UI.
Diffstat (limited to 'indra/newview/llfloaterflickr.cpp')
-rw-r--r-- | indra/newview/llfloaterflickr.cpp | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/indra/newview/llfloaterflickr.cpp b/indra/newview/llfloaterflickr.cpp index fbf4d758be..2dc62dcda8 100644 --- a/indra/newview/llfloaterflickr.cpp +++ b/indra/newview/llfloaterflickr.cpp @@ -215,8 +215,6 @@ void LLFlickrPhotoPanel::onClickNewSnapshot() LLSnapshotLivePreview* previewp = getPreviewView(); if (previewp) { - //setStatus(Impl::STATUS_READY); - lldebugs << "updating snapshot" << llendl; previewp->updateSnapshot(TRUE); } } @@ -355,27 +353,26 @@ void LLFlickrPhotoPanel::updateResolution(BOOL do_update) checkAspectRatio(width); previewp->getSize(width, height); + if ((original_width != width) || (original_height != height)) + { + previewp->setSize(width, height); + if (do_update) + { + previewp->updateSnapshot(TRUE); + updateControls(); + } + } // Get the old filter, compare to the current one "filter_name" and set if changed - // If changed, also force the updateSnapshot() here under std::string original_filter = previewp->getFilter(); - - if ((original_width != width) || (original_height != height) || (original_filter != filter_name)) + if (original_filter != filter_name) { - previewp->setSize(width, height); previewp->setFilter(filter_name); - - // hide old preview as the aspect ratio could be wrong - lldebugs << "updating thumbnail" << llendl; - - previewp->updateSnapshot(FALSE, TRUE); - if(do_update) + if (do_update) { - lldebugs << "Will update controls" << llendl; + previewp->updateSnapshot(FALSE, TRUE); updateControls(); - LLFlickrPhotoPanel::onClickNewSnapshot(); } } - } } |