summaryrefslogtreecommitdiff
path: root/indra/newview/llsnapshotlivepreview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llsnapshotlivepreview.cpp')
-rw-r--r--indra/newview/llsnapshotlivepreview.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp
index d6a034ba15..dc99dfcb6d 100644
--- a/indra/newview/llsnapshotlivepreview.cpp
+++ b/indra/newview/llsnapshotlivepreview.cpp
@@ -337,7 +337,7 @@ void LLSnapshotLivePreview::draw()
}
else if (mShineAnimTimer.getStarted())
{
- lldebugs << "Drawing shining animation" << llendl;
+ LL_DEBUGS() << "Drawing shining animation" << LL_ENDL;
F32 shine_interp = llmin(1.f, mShineAnimTimer.getElapsedTimeF32() / SHINE_TIME);
// draw "shine" effect
@@ -414,7 +414,7 @@ void LLSnapshotLivePreview::draw()
S32 old_image_index = (mCurImageIndex + 1) % 2;
if (mViewerImage[old_image_index].notNull() && mFallAnimTimer.getElapsedTimeF32() < FALL_TIME)
{
- lldebugs << "Drawing fall animation" << llendl;
+ LL_DEBUGS() << "Drawing fall animation" << LL_ENDL;
F32 fall_interp = mFallAnimTimer.getElapsedTimeF32() / FALL_TIME;
F32 alpha = clamp_rescale(fall_interp, 0.f, 1.f, 0.8f, 0.4f);
LLColor4 image_color(1.f, 1.f, 1.f, alpha);
@@ -458,7 +458,7 @@ void LLSnapshotLivePreview::reshape(S32 width, S32 height, BOOL called_from_pare
LLView::reshape(width, height, called_from_parent);
if (old_rect.getWidth() != width || old_rect.getHeight() != height)
{
- lldebugs << "window reshaped, updating snapshot" << llendl;
+ LL_DEBUGS() << "window reshaped, updating thumbnail" << LL_ENDL;
updateSnapshot(TRUE);
}
}
@@ -663,7 +663,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
LLSnapshotLivePreview* previewp = (LLSnapshotLivePreview*)snapshot_preview;
if (previewp->getWidth() == 0 || previewp->getHeight() == 0)
{
- llwarns << "Incorrect dimensions: " << previewp->getWidth() << "x" << previewp->getHeight() << llendl;
+ LL_WARNS() << "Incorrect dimensions: " << previewp->getWidth() << "x" << previewp->getHeight() << LL_ENDL;
return FALSE;
}
@@ -677,7 +677,7 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
previewp->mCameraRot = new_camera_rot;
// request a new snapshot whenever the camera moves, with a time delay
BOOL autosnap = gSavedSettings.getBOOL("AutoSnapshot");
- lldebugs << "camera moved, updating thumbnail" << llendl;
+ LL_DEBUGS() << "camera moved, updating thumbnail" << LL_ENDL;
previewp->updateSnapshot(
autosnap, // whether a new snapshot is needed or merely invalidate the existing one
FALSE, // or if 1st arg is false, whether to produce a new thumbnail image.
@@ -826,7 +826,7 @@ LLPointer<LLImageRaw> LLSnapshotLivePreview::getEncodedImage()
if (getSnapshotType() == SNAPSHOT_TEXTURE)
{
// We don't store the intermediate formatted image in mFormattedImage in the J2C case
- lldebugs << "Encoding new image of format J2C" << llendl;
+ LL_DEBUGS() << "Encoding new image of format J2C" << LL_ENDL;
LLPointer<LLImageJ2C> formatted = new LLImageJ2C;
// Copy the preview
LLPointer<LLImageRaw> scaled = new LLImageRaw(
@@ -942,7 +942,7 @@ LLPointer<LLImageFormatted> LLSnapshotLivePreview::getFormattedImage()
void LLSnapshotLivePreview::setSize(S32 w, S32 h)
{
- lldebugs << "setSize(" << w << ", " << h << ")" << llendl;
+ LL_DEBUGS() << "setSize(" << w << ", " << h << ")" << LL_ENDL;
setWidth(w);
setHeight(h);
}
@@ -964,7 +964,7 @@ void LLSnapshotLivePreview::getSize(S32& w, S32& h) const
void LLSnapshotLivePreview::saveTexture()
{
- lldebugs << "saving texture: " << mPreviewImage->getWidth() << "x" << mPreviewImage->getHeight() << llendl;
+ LL_DEBUGS() << "saving texture: " << mPreviewImage->getWidth() << "x" << mPreviewImage->getHeight() << LL_ENDL;
// gen a new uuid for this asset
LLTransactionID tid;
tid.generate();
@@ -977,7 +977,7 @@ void LLSnapshotLivePreview::saveTexture()
mPreviewImage->getComponents());
scaled->biasedScaleToPowerOfTwo(MAX_TEXTURE_SIZE);
- lldebugs << "scaled texture to " << scaled->getWidth() << "x" << scaled->getHeight() << llendl;
+ LL_DEBUGS() << "scaled texture to " << scaled->getWidth() << "x" << scaled->getHeight() << LL_ENDL;
if (formatted->encode(scaled, 0.0f))
{
@@ -1006,10 +1006,12 @@ void LLSnapshotLivePreview::saveTexture()
else
{
LLNotificationsUtil::add("ErrorEncodingSnapshot");
- llwarns << "Error encoding snapshot" << llendl;
+ LL_WARNS() << "Error encoding snapshot" << LL_ENDL;
}
- LLViewerStats::getInstance()->incStat(LLViewerStats::ST_SNAPSHOT_COUNT );
+ add(LLStatViewer::SNAPSHOT, 1);
+
+ mDataSize = 0;
}
BOOL LLSnapshotLivePreview::saveLocal()
@@ -1037,7 +1039,7 @@ void LLSnapshotLivePreview::saveWeb()
LLImageJPEG* jpg = dynamic_cast<LLImageJPEG*>(mFormattedImage.get());
if(!jpg)
{
- llwarns << "Formatted image not a JPEG" << llendl;
+ LL_WARNS() << "Formatted image not a JPEG" << LL_ENDL;
return;
}