diff options
author | Monty Brandenberg <monty@lindenlab.com> | 2014-09-08 15:46:29 -0400 |
---|---|---|
committer | Monty Brandenberg <monty@lindenlab.com> | 2014-09-08 15:46:29 -0400 |
commit | ac62e322ce0060758afca2007469dd25a3d64d48 (patch) | |
tree | c86f24d832bb5c5006c5dc95a28e59d1dbdc4c1f /indra/newview/llsnapshotlivepreview.cpp | |
parent | ee4cd594623eff6f04cfc2bafb937f0cfd631080 (diff) | |
parent | bff5a4e7940d40576f52105ab9877f5a6b7d85c8 (diff) |
Merge. Refresh from viewer-drano-http-4 after 3.7.15 release.
Diffstat (limited to 'indra/newview/llsnapshotlivepreview.cpp')
-rw-r--r-- | indra/newview/llsnapshotlivepreview.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp index 942360b650..600ebf5914 100644 --- a/indra/newview/llsnapshotlivepreview.cpp +++ b/indra/newview/llsnapshotlivepreview.cpp @@ -195,6 +195,8 @@ void LLSnapshotLivePreview::updateSnapshot(BOOL new_snapshot, BOOL new_thumbnail mSnapshotDelayTimer.start(); mSnapshotDelayTimer.setTimerExpirySec(delay); + mPosTakenGlobal = gAgentCamera.getCameraPositionGlobal(); + // Tell the floater container that the snapshot is in the process of updating itself if (mViewContainer) { @@ -760,7 +762,6 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview ) curr_preview_image->setFilteringOption(previewp->getSnapshotType() == SNAPSHOT_TEXTURE ? LLTexUnit::TFO_ANISOTROPIC : LLTexUnit::TFO_POINT); curr_preview_image->setAddressMode(LLTexUnit::TAM_CLAMP); - previewp->mPosTakenGlobal = gAgentCamera.getCameraPositionGlobal(); previewp->mShineCountdown = 4; // wait a few frames to avoid animation glitch due to readback this frame } } @@ -975,6 +976,21 @@ void LLSnapshotLivePreview::saveTexture() mPreviewImage->getHeight(), mPreviewImage->getComponents()); + // Apply the filter to mPreviewImage + if (getFilter() != "") + { + std::string filter_path = LLImageFiltersManager::getInstance()->getFilterPath(getFilter()); + if (filter_path != "") + { + LLImageFilter filter(filter_path); + filter.executeFilter(scaled); + } + else + { + LL_WARNS() << "Couldn't find a path to the following filter : " << getFilter() << LL_ENDL; + } + } + scaled->biasedScaleToPowerOfTwo(MAX_TEXTURE_SIZE); LL_DEBUGS() << "scaled texture to " << scaled->getWidth() << "x" << scaled->getHeight() << LL_ENDL; |