summaryrefslogtreecommitdiff
path: root/indra/newview/llsnapshotlivepreview.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2013-12-18 15:55:13 -0800
committerMerov Linden <merov@lindenlab.com>2013-12-18 15:55:13 -0800
commit6578144b7eda1dae885e5cc172751203b1d16c2d (patch)
treecba111f9651c1a96f03196016bd7e2081619ab9b /indra/newview/llsnapshotlivepreview.cpp
parentbe80b11d3063cc1b394ed604901418ba421cd86c (diff)
ACME-1236 : WIP : Added Gray Scale as an experimental filter in Flickr. Lots of ugly hacks for now
Diffstat (limited to 'indra/newview/llsnapshotlivepreview.cpp')
-rw-r--r--indra/newview/llsnapshotlivepreview.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp
index 7f578975db..ab9788a88b 100644
--- a/indra/newview/llsnapshotlivepreview.cpp
+++ b/indra/newview/llsnapshotlivepreview.cpp
@@ -89,7 +89,8 @@ LLSnapshotLivePreview::LLSnapshotLivePreview (const LLSnapshotLivePreview::Param
mCameraPos(LLViewerCamera::getInstance()->getOrigin()),
mCameraRot(LLViewerCamera::getInstance()->getQuaternion()),
mSnapshotActive(FALSE),
- mSnapshotBufferType(LLViewerWindow::SNAPSHOT_TYPE_COLOR)
+ mSnapshotBufferType(LLViewerWindow::SNAPSHOT_TYPE_COLOR),
+ mFilterType(0)
{
setSnapshotQuality(gSavedSettings.getS32("SnapshotQuality"));
mSnapshotDelayTimer.setTimerExpirySec(0.0f);
@@ -585,7 +586,12 @@ void LLSnapshotLivePreview::generateThumbnailImage(BOOL force_update)
if(raw)
{
raw->expandToPowerOfTwo();
- mThumbnailImage = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE);
+ // Merov : Filter also the thumbnail?
+ if (getFilter() == 1)
+ {
+ raw->colorTransform();
+ }
+ mThumbnailImage = LLViewerTextureManager::getLocalTexture(raw.get(), FALSE);
mThumbnailUpToDate = TRUE ;
}
@@ -689,6 +695,12 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
}
else
{
+ // Merov : Time to apply the filter to mPreviewImage!!!
+ if (previewp->getFilter() == 1)
+ {
+ previewp->mPreviewImage->colorTransform();
+ }
+
// delete any existing image
previewp->mFormattedImage = NULL;
// now create the new one of the appropriate format.