summaryrefslogtreecommitdiff
path: root/indra/newview/llsnapshotlivepreview.cpp
diff options
context:
space:
mode:
authorGraham Linden <none@none>2014-09-25 09:20:01 -0700
committerGraham Linden <none@none>2014-09-25 09:20:01 -0700
commit9f4788d7a8a924de654d55bfb102a81f797a9cf9 (patch)
tree742fb8127dc84052265647ed110e8a6446253103 /indra/newview/llsnapshotlivepreview.cpp
parent6004ad167458914c3b85438b96e81ea8796e368b (diff)
parent499f5aa9a4b46d61ee94b26d5c86bc032766af70 (diff)
Merge viewer-release 3.7.17
Diffstat (limited to 'indra/newview/llsnapshotlivepreview.cpp')
-rw-r--r--indra/newview/llsnapshotlivepreview.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp
index bc5993ec76..1aa7041175 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;