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.2.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/llviewerwindow.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llviewerwindow.cpp') 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(); } -- cgit v1.2.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/llviewerwindow.cpp | 60 +++++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 23 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') 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; } -- cgit v1.2.3