From 74c8b028d42a8c5b080bb861e427f38cedd4ad7c Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Fri, 15 Dec 2023 18:26:14 +0100 Subject: SL-20743 Use LLMutex in LLImageBase for internal data thread-safety --- indra/newview/llfloater360capture.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llfloater360capture.cpp') diff --git a/indra/newview/llfloater360capture.cpp b/indra/newview/llfloater360capture.cpp index 2c638fa959..a0890b7f9d 100644 --- a/indra/newview/llfloater360capture.cpp +++ b/indra/newview/llfloater360capture.cpp @@ -360,6 +360,8 @@ void LLFloater360Capture::encodeAndSave(LLPointer raw_image, const s int jpeg_encode_quality = gSavedSettings.getU32("360CaptureJPEGEncodeQuality"); LLPointer 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(); -- cgit v1.2.3 From a5261a5fa8fad810ecb5c260d92c3e771822bf58 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Tue, 20 Feb 2024 23:46:23 +0100 Subject: Convert BOOL to bool in llui --- indra/newview/llfloater360capture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llfloater360capture.cpp') diff --git a/indra/newview/llfloater360capture.cpp b/indra/newview/llfloater360capture.cpp index a0890b7f9d..c1f6af9816 100644 --- a/indra/newview/llfloater360capture.cpp +++ b/indra/newview/llfloater360capture.cpp @@ -91,7 +91,7 @@ LLFloater360Capture::~LLFloater360Capture() } } -BOOL LLFloater360Capture::postBuild() +bool LLFloater360Capture::postBuild() { mCaptureBtn = getChild("capture_button"); mCaptureBtn->setCommitCallback(boost::bind(&LLFloater360Capture::onCapture360ImagesBtn, this)); -- cgit v1.2.3 From 60d3dd98a44230c21803c1606552ee098ed9fa7c Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 21 Feb 2024 21:05:14 +0100 Subject: Convert remaining BOOL to bool --- indra/newview/llfloater360capture.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llfloater360capture.cpp') diff --git a/indra/newview/llfloater360capture.cpp b/indra/newview/llfloater360capture.cpp index c1f6af9816..ce8e4b4452 100644 --- a/indra/newview/llfloater360capture.cpp +++ b/indra/newview/llfloater360capture.cpp @@ -453,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 @@ -462,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, -- cgit v1.2.3 From 3d1445013337068960b31b4a648bf5df17d01341 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 22 Feb 2024 00:02:25 +0200 Subject: triage#100 Fix invalid interest mode Agent needs these strings before values were initialized so made values a bit more global. --- indra/newview/llfloater360capture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llfloater360capture.cpp') diff --git a/indra/newview/llfloater360capture.cpp b/indra/newview/llfloater360capture.cpp index ce8e4b4452..d5efc15e35 100644 --- a/indra/newview/llfloater360capture.cpp +++ b/indra/newview/llfloater360capture.cpp @@ -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() -- cgit v1.2.3 From f9473e8afcb624cc1b101195bf15943ec372b56f Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Mon, 6 May 2024 16:52:34 +0200 Subject: secondlife/viewer#1333 BOOL to bool conversion leftovers: ternaries --- indra/newview/llfloater360capture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llfloater360capture.cpp') diff --git a/indra/newview/llfloater360capture.cpp b/indra/newview/llfloater360capture.cpp index d5efc15e35..527ed62fc7 100644 --- a/indra/newview/llfloater360capture.cpp +++ b/indra/newview/llfloater360capture.cpp @@ -811,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(); } -- cgit v1.2.3 From e2e37cced861b98de8c1a7c9c0d3a50d2d90e433 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Wed, 22 May 2024 21:25:21 +0200 Subject: Fix line endlings --- indra/newview/llfloater360capture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llfloater360capture.cpp') diff --git a/indra/newview/llfloater360capture.cpp b/indra/newview/llfloater360capture.cpp index 527ed62fc7..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 -- cgit v1.2.3 From c0fad3028fd55c2067ce6a0ae4382cffe1014284 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Mon, 10 Jun 2024 16:42:43 +0200 Subject: Re-enable compiler warnings C4018, C4100, C4231 and C4506 --- indra/newview/llfloater360capture.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llfloater360capture.cpp') diff --git a/indra/newview/llfloater360capture.cpp b/indra/newview/llfloater360capture.cpp index 115374f94e..2929878211 100644 --- a/indra/newview/llfloater360capture.cpp +++ b/indra/newview/llfloater360capture.cpp @@ -419,9 +419,9 @@ void LLFloater360Capture::mockSnapShot(LLImageRaw* raw) unsigned int depth = raw->getComponents(); unsigned char* pixels = raw->getData(); - for (int y = 0; y < height; y++) + for (unsigned int y = 0; y < height; y++) { - for (int x = 0; x < width; x++) + for (unsigned int x = 0; x < width; x++) { unsigned long offset = y * width * depth + x * depth; unsigned char red = x * 256 / width; -- cgit v1.2.3 From c95b4bf3ea2b681d6d05468b07e60fedb71fa2cf Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Mon, 10 Jun 2024 20:42:42 +0300 Subject: Post-merge - trim trailing whitespace --- indra/newview/llfloater360capture.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llfloater360capture.cpp') diff --git a/indra/newview/llfloater360capture.cpp b/indra/newview/llfloater360capture.cpp index 2929878211..66796276a9 100644 --- a/indra/newview/llfloater360capture.cpp +++ b/indra/newview/llfloater360capture.cpp @@ -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()) { @@ -582,7 +582,7 @@ void LLFloater360Capture::capture360Images() LLViewerStats::instance().getRecording().resume(); LLAppViewer::instance()->resumeMainloopTimeout(); - + // update main loop timeout state LLAppViewer::instance()->pingMainloopTimeout("LLFloater360Capture::capture360Images"); } -- cgit v1.2.3