From 9719841f63d9e9846bbe954d2bf182428129eb20 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Mon, 25 Feb 2019 11:36:28 +0200 Subject: SL-10326 Restore ability to select own avatar and move it via manipulation arrows --- indra/newview/llviewerwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index e53ccd7b8d..3b12816c99 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -3845,7 +3845,7 @@ void LLViewerWindow::renderSelections( BOOL for_gl_pick, BOOL pick_parcel_walls, BOOL draw_handles = TRUE; - if (tool == LLToolCompTranslate::getInstance() && !all_selected_objects_move) + if (tool == LLToolCompTranslate::getInstance() && !all_selected_objects_move && !LLSelectMgr::getInstance()->isSelfAvatarSelected()) { draw_handles = FALSE; } -- cgit v1.3 From cc464be2a75a868ff7292f4e7f5b098f1b4dac76 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 22 Apr 2019 16:05:06 +0300 Subject: SL-10828 [Dev tools] Scroll for fast timer --- indra/newview/llfasttimerview.cpp | 18 +++++++++++++----- indra/newview/llviewerdisplay.cpp | 7 ++++--- indra/newview/llviewerwindow.cpp | 1 + indra/newview/pipeline.cpp | 1 - 4 files changed, 18 insertions(+), 9 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llfasttimerview.cpp b/indra/newview/llfasttimerview.cpp index 98687282ed..d90f03b403 100644 --- a/indra/newview/llfasttimerview.cpp +++ b/indra/newview/llfasttimerview.cpp @@ -354,11 +354,19 @@ BOOL LLFastTimerView::handleToolTip(S32 x, S32 y, MASK mask) BOOL LLFastTimerView::handleScrollWheel(S32 x, S32 y, S32 clicks) { - setPauseState(true); - mScrollIndex = llclamp( mScrollIndex + clicks, - 0, - llmin((S32)mRecording.getNumRecordedPeriods(), (S32)mRecording.getNumRecordedPeriods() - MAX_VISIBLE_HISTORY)); - return TRUE; + if (x < mBarRect.mLeft) + { + // Inside mScrollBar and list of timers + mScrollBar->handleScrollWheel(x,y,clicks); + } + else + { + setPauseState(true); + mScrollIndex = llclamp(mScrollIndex + clicks, + 0, + llmin((S32)mRecording.getNumRecordedPeriods(), (S32)mRecording.getNumRecordedPeriods() - MAX_VISIBLE_HISTORY)); + } + return TRUE; } static BlockTimerStatHandle FTM_RENDER_TIMER("Timers"); diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 64f6123f5d..e2554bc9bc 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -237,6 +237,7 @@ void display_stats() static LLTrace::BlockTimerStatHandle FTM_PICK("Picking"); static LLTrace::BlockTimerStatHandle FTM_RENDER("Render"); +static LLTrace::BlockTimerStatHandle FTM_RENDER_HUD("Render HUD"); static LLTrace::BlockTimerStatHandle FTM_UPDATE_SKY("Update Sky"); static LLTrace::BlockTimerStatHandle FTM_UPDATE_DYNAMIC_TEXTURES("Update Dynamic Textures"); static LLTrace::BlockTimerStatHandle FTM_IMAGE_UPDATE("Update Images"); @@ -568,6 +569,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) if (gDisconnected) { LLAppViewer::instance()->pingMainloopTimeout("Display:Disconnected"); + LL_RECORD_BLOCK_TIME(FTM_RENDER_UI); render_ui(); swap(); } @@ -1293,7 +1295,8 @@ void render_ui(F32 zoom_factor, int subfield) { gPipeline.renderBloom(gSnapshot, zoom_factor, subfield); } - + + LL_RECORD_BLOCK_TIME(FTM_RENDER_HUD); render_hud_elements(); render_hud_attachments(); } @@ -1308,8 +1311,6 @@ void render_ui(F32 zoom_factor, int subfield) gGL.color4f(1,1,1,1); if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) { - LL_RECORD_BLOCK_TIME(FTM_RENDER_UI); - if (!gDisconnected) { render_ui_3d(); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 6d351f0639..8e6df22171 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -4734,6 +4734,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei { // Required for showing the GUI in snapshots and performing bloom composite overlay // Call even if show_ui is FALSE + LL_RECORD_BLOCK_TIME(FTM_RENDER_UI); render_ui(scale_factor, subfield); swap(); } diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index e8c9909f8c..d49c009743 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -4062,7 +4062,6 @@ void LLPipeline::postSort(LLCamera& camera) void render_hud_elements() { - LL_RECORD_BLOCK_TIME(FTM_RENDER_UI); gPipeline.disableLights(); LLGLDisable fog(GL_FOG); -- cgit v1.3 From 04e67fa12d1dac368e2f88a04af4cd266b8b2063 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 12 Jun 2019 19:12:09 +0300 Subject: SL-11402 Last session image should be saved as png --- indra/newview/llappviewer.cpp | 2 +- indra/newview/llstartup.cpp | 16 +++++------ indra/newview/llviewerdisplay.cpp | 10 +++---- indra/newview/llviewermessage.cpp | 4 +-- indra/newview/llviewerwindow.cpp | 60 ++++++++++++++++++++++++--------------- indra/newview/llviewerwindow.h | 2 +- 6 files changed, 54 insertions(+), 40 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 24886b01fb..f3915b9210 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -4507,7 +4507,7 @@ void LLAppViewer::saveFinalSnapshot() snap_filename += gDirUtilp->getDirDelimiter(); snap_filename += LLStartUp::getScreenLastFilename(); // use full pixel dimensions of viewer window (not post-scale dimensions) - gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw(), FALSE, TRUE); + gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw(), FALSE, TRUE, LLSnapshotModel::SNAPSHOT_TYPE_COLOR, LLSnapshotModel::SNAPSHOT_FORMAT_PNG); mSavedFinalSnapshot = TRUE; } } diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index e34a9beb49..256ece594c 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -113,7 +113,7 @@ #include "llgroupmgr.h" #include "llhudeffecttrail.h" #include "llhudmanager.h" -#include "llimagebmp.h" +#include "llimagepng.h" #include "llinventorybridge.h" #include "llinventorymodel.h" #include "llinventorymodelbackgroundfetch.h" @@ -210,8 +210,8 @@ bool gAgentMovementCompleted = false; S32 gMaxAgentGroups; -const std::string SCREEN_HOME_FILENAME = "screen_home%s.bmp"; -const std::string SCREEN_LAST_FILENAME = "screen_last%s.bmp"; +const std::string SCREEN_HOME_FILENAME = "screen_home%s.png"; +const std::string SCREEN_LAST_FILENAME = "screen_last%s.png"; LLPointer gStartTexture; @@ -2709,7 +2709,7 @@ void init_start_screen(S32 location_id) temp_str += LLStartUp::getScreenHomeFilename(); } - LLPointer start_image_bmp = new LLImageBMP; + LLPointer start_image_png = new LLImagePNG; // Turn off start screen to get around the occasional readback // driver bug @@ -2718,18 +2718,18 @@ void init_start_screen(S32 location_id) LL_INFOS("AppInit") << "Bitmap load disabled" << LL_ENDL; return; } - else if(!start_image_bmp->load(temp_str) ) + else if(!start_image_png->load(temp_str) ) { LL_WARNS("AppInit") << "Bitmap load failed" << LL_ENDL; gStartTexture = NULL; } else { - gStartImageWidth = start_image_bmp->getWidth(); - gStartImageHeight = start_image_bmp->getHeight(); + gStartImageWidth = start_image_png->getWidth(); + gStartImageHeight = start_image_png->getHeight(); LLPointer raw = new LLImageRaw; - if (!start_image_bmp->decode(raw, 0.0f)) + if (!start_image_png->decode(raw, 0.0f)) { LL_WARNS("AppInit") << "Bitmap decode failed" << LL_ENDL; gStartTexture = NULL; diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index fd49d3b3d3..5924dbc260 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -42,7 +42,7 @@ #include "llfeaturemanager.h" //#include "llfirstuse.h" #include "llhudmanager.h" -#include "llimagebmp.h" +#include "llimagepng.h" #include "llmemory.h" #include "llselectmgr.h" #include "llsky.h" @@ -1590,15 +1590,15 @@ void render_disconnected_background() std::string temp_str; temp_str = gDirUtilp->getLindenUserDir() + gDirUtilp->getDirDelimiter() + LLStartUp::getScreenLastFilename(); - LLPointer image_bmp = new LLImageBMP; - if( !image_bmp->load(temp_str) ) + LLPointer image_png = new LLImagePNG; + if( !image_png->load(temp_str) ) { //LL_INFOS() << "Bitmap load failed" << LL_ENDL; return; } LLPointer raw = new LLImageRaw; - if (!image_bmp->decode(raw, 0.0f)) + if (!image_png->decode(raw, 0.0f)) { LL_INFOS() << "Bitmap decode failed" << LL_ENDL; gDisconnectedImagep = NULL; @@ -1606,7 +1606,7 @@ void render_disconnected_background() } U8 *rawp = raw->getData(); - S32 npixels = (S32)image_bmp->getWidth()*(S32)image_bmp->getHeight(); + S32 npixels = (S32)image_png->getWidth()*(S32)image_png->getHeight(); for (S32 i = 0; i < npixels; i++) { S32 sum = 0; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index b70b077618..6e5c77e4a9 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -5108,7 +5108,7 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem) std::string snap_filename = gDirUtilp->getLindenUserDir(); snap_filename += gDirUtilp->getDirDelimiter(); snap_filename += LLStartUp::getScreenHomeFilename(); - gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw(), FALSE, FALSE); + gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw(), FALSE, FALSE, LLSnapshotModel::SNAPSHOT_TYPE_COLOR, LLSnapshotModel::SNAPSHOT_FORMAT_PNG); } if (notificationID == "RegionRestartMinutes" || @@ -5191,7 +5191,7 @@ static void process_special_alert_messages(const std::string & message) std::string snap_filename = gDirUtilp->getLindenUserDir(); snap_filename += gDirUtilp->getDirDelimiter(); snap_filename += LLStartUp::getScreenHomeFilename(); - gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw(), FALSE, FALSE); + gViewerWindow->saveSnapshot(snap_filename, gViewerWindow->getWindowWidthRaw(), gViewerWindow->getWindowHeightRaw(), FALSE, FALSE, LLSnapshotModel::SNAPSHOT_TYPE_COLOR, LLSnapshotModel::SNAPSHOT_FORMAT_PNG); } } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 8e6df22171..74770dc483 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -122,7 +122,7 @@ #include "llhudmanager.h" #include "llhudobject.h" #include "llhudview.h" -#include "llimagebmp.h" +#include "llimage.h" #include "llimagej2c.h" #include "llimageworker.h" #include "llkeyboard.h" @@ -4487,32 +4487,46 @@ void LLViewerWindow::movieSize(S32 new_width, S32 new_height) } } -BOOL LLViewerWindow::saveSnapshot(const std::string& filepath, S32 image_width, S32 image_height, BOOL show_ui, BOOL do_rebuild, LLSnapshotModel::ESnapshotLayerType type) +BOOL LLViewerWindow::saveSnapshot(const std::string& filepath, S32 image_width, S32 image_height, BOOL show_ui, BOOL do_rebuild, LLSnapshotModel::ESnapshotLayerType type, LLSnapshotModel::ESnapshotFormat format) { - LL_INFOS() << "Saving snapshot to: " << filepath << LL_ENDL; + LL_INFOS() << "Saving snapshot to: " << filepath << LL_ENDL; - LLPointer raw = new LLImageRaw; - BOOL success = rawSnapshot(raw, image_width, image_height, TRUE, FALSE, show_ui, do_rebuild); + LLPointer raw = new LLImageRaw; + BOOL success = rawSnapshot(raw, image_width, image_height, TRUE, FALSE, show_ui, do_rebuild); - if (success) - { - LLPointer bmp_image = new LLImageBMP; - success = bmp_image->encode(raw, 0.0f); - if( success ) - { - success = bmp_image->save(filepath); - } - else - { - LL_WARNS() << "Unable to encode bmp snapshot" << LL_ENDL; - } - } - else - { - LL_WARNS() << "Unable to capture raw snapshot" << LL_ENDL; - } + if (success) + { + U8 image_codec = IMG_CODEC_BMP; + switch (format) + { + case LLSnapshotModel::SNAPSHOT_FORMAT_PNG: + image_codec = IMG_CODEC_PNG; + break; + case LLSnapshotModel::SNAPSHOT_FORMAT_JPEG: + image_codec = IMG_CODEC_JPEG; + break; + default: + image_codec = IMG_CODEC_BMP; + break; + } - return success; + LLPointer formated_image = LLImageFormatted::createFromType(image_codec); + success = formated_image->encode(raw, 0.0f); + if (success) + { + success = formated_image->save(filepath); + } + else + { + LL_WARNS() << "Unable to encode snapshot of format " << format << LL_ENDL; + } + } + else + { + LL_WARNS() << "Unable to capture raw snapshot" << LL_ENDL; + } + + return success; } diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index d41a606f11..071a3632dd 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -347,7 +347,7 @@ public: // snapshot functionality. // perhaps some of this should move to llfloatershapshot? -MG - BOOL saveSnapshot(const std::string& filename, S32 image_width, S32 image_height, BOOL show_ui = TRUE, BOOL do_rebuild = FALSE, LLSnapshotModel::ESnapshotLayerType type = LLSnapshotModel::SNAPSHOT_TYPE_COLOR); + BOOL saveSnapshot(const std::string& filename, S32 image_width, S32 image_height, BOOL show_ui = TRUE, BOOL do_rebuild = FALSE, LLSnapshotModel::ESnapshotLayerType type = LLSnapshotModel::SNAPSHOT_TYPE_COLOR, LLSnapshotModel::ESnapshotFormat format = LLSnapshotModel::SNAPSHOT_FORMAT_BMP); BOOL rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_height, BOOL keep_window_aspect = TRUE, BOOL is_texture = FALSE, BOOL show_ui = TRUE, BOOL do_rebuild = FALSE, LLSnapshotModel::ESnapshotLayerType type = LLSnapshotModel::SNAPSHOT_TYPE_COLOR, S32 max_size = MAX_SNAPSHOT_IMAGE_SIZE); BOOL thumbnailSnapshot(LLImageRaw *raw, S32 preview_width, S32 preview_height, BOOL show_ui, BOOL do_rebuild, LLSnapshotModel::ESnapshotLayerType type); -- cgit v1.3