diff options
Diffstat (limited to 'indra/newview/llfloater360capture.cpp')
-rw-r--r-- | indra/newview/llfloater360capture.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/indra/newview/llfloater360capture.cpp b/indra/newview/llfloater360capture.cpp index f3b924a306..115374f94e 100644 --- a/indra/newview/llfloater360capture.cpp +++ b/indra/newview/llfloater360capture.cpp @@ -1,4 +1,4 @@ -/** +/** * @file llfloater360capture.cpp * @author Callum Prentice (callum@lindenlab.com) * @brief Floater code for the 360 Capture feature @@ -67,7 +67,7 @@ LLFloater360Capture::LLFloater360Capture(const LLSD& key) mStartILMode = gAgent.getInterestListMode(); // send everything to us for as long as this floater is open - gAgent.changeInterestListMode(LLViewerRegion::IL_MODE_360); + gAgent.changeInterestListMode(IL_MODE_360); } LLFloater360Capture::~LLFloater360Capture() @@ -83,7 +83,7 @@ LLFloater360Capture::~LLFloater360Capture() // Normally LLFloater360Capture tells the Simulator send everything // and now reverts to the regular "keyhole" frustum of interest // list updates. - if (!LLApp::isExiting() && + if (!LLApp::isExiting() && gSavedSettings.getBOOL("360CaptureUseInterestListCap") && mStartILMode != gAgent.getInterestListMode()) { @@ -91,7 +91,7 @@ LLFloater360Capture::~LLFloater360Capture() } } -BOOL LLFloater360Capture::postBuild() +bool LLFloater360Capture::postBuild() { mCaptureBtn = getChild<LLUICtrl>("capture_button"); mCaptureBtn->setCommitCallback(boost::bind(&LLFloater360Capture::onCapture360ImagesBtn, this)); @@ -360,6 +360,8 @@ void LLFloater360Capture::encodeAndSave(LLPointer<LLImageRaw> raw_image, const s int jpeg_encode_quality = gSavedSettings.getU32("360CaptureJPEGEncodeQuality"); LLPointer<LLImageJPEG> jpeg_image = new LLImageJPEG(jpeg_encode_quality); + LLImageDataSharedLock lock(raw_image); + // Actually encode the JPEG image. This is where a lot of time // is spent now that the snapshot capture process has been // optimized. The encode_time parameter doesn't appear to be @@ -410,6 +412,8 @@ void LLFloater360Capture::suspendForAFrame() // Probably not needed anymore but saving here just in case. void LLFloater360Capture::mockSnapShot(LLImageRaw* raw) { + LLImageDataLock lock(raw); + unsigned int width = raw->getWidth(); unsigned int height = raw->getHeight(); unsigned int depth = raw->getComponents(); @@ -449,7 +453,7 @@ void LLFloater360Capture::capture360Images() if (gSavedSettings.getBOOL("360CaptureHideAvatars")) { // Turn off the avatar if UI tells us to hide it. - // Note: the original call to gAvatar.hide(FALSE) did *not* hide + // Note: the original call to gAvatar.hide(false) did *not* hide // attachments and so for most residents, there would be some debris // left behind in the snapshot. // Note: this toggles so if it set to on, this will turn it off and @@ -458,7 +462,7 @@ void LLFloater360Capture::capture360Images() // was set to off - I think this is what we need LLPipeline::toggleRenderTypeControl(LLPipeline::RENDER_TYPE_AVATAR); LLPipeline::toggleRenderTypeControl(LLPipeline::RENDER_TYPE_PARTICLES); - LLPipeline::sRenderAttachedLights = FALSE; + LLPipeline::sRenderAttachedLights = false; } // these are the 6 directions we will point the camera - essentially, @@ -578,7 +582,7 @@ void LLFloater360Capture::capture360Images() LLViewerStats::instance().getRecording().resume(); LLAppViewer::instance()->resumeMainloopTimeout(); - + // update main loop timeout state LLAppViewer::instance()->pingMainloopTimeout("LLFloater360Capture::capture360Images"); } @@ -807,7 +811,7 @@ void LLFloater360Capture::freezeWorld(bool enable) { // restart the clouds moving if they were not paused before // we starting using the 360 capture floater - if (clouds_scroll_paused == false) + if (!clouds_scroll_paused) { LLEnvironment::instance().resumeCloudScroll(); } |