Merge shyotl, setting include broken (disabled)
This commit is contained in:
@@ -522,7 +522,7 @@ public:
|
||||
ypos += y_inc;
|
||||
}
|
||||
// only display these messages if we are actually rendering beacons at this moment
|
||||
static LLCachedControl<bool> beacon_always_on("BeaconAlwaysOn",false);
|
||||
static const LLCachedControl<bool> beacon_always_on("BeaconAlwaysOn",false);
|
||||
if (LLPipeline::getRenderBeacons(NULL) && beacon_always_on)
|
||||
{
|
||||
if (LLPipeline::getRenderParticleBeacons(NULL))
|
||||
@@ -2289,7 +2289,7 @@ void LLViewerWindow::draw()
|
||||
//S32 screen_x, screen_y;
|
||||
|
||||
// HACK for timecode debugging
|
||||
static LLCachedControl<bool> display_timecode("DisplayTimecode",false);
|
||||
static const LLCachedControl<bool> display_timecode("DisplayTimecode",false);
|
||||
if (display_timecode)
|
||||
{
|
||||
// draw timecode block
|
||||
@@ -2767,7 +2767,7 @@ BOOL LLViewerWindow::handlePerFrameHover()
|
||||
|
||||
LLVector2 mouse_vel;
|
||||
|
||||
static LLCachedControl<bool> mouse_smooth("MouseSmooth",false);
|
||||
static const LLCachedControl<bool> mouse_smooth("MouseSmooth",false);
|
||||
if (mouse_smooth)
|
||||
{
|
||||
static F32 fdx = 0.f;
|
||||
@@ -2923,13 +2923,13 @@ BOOL LLViewerWindow::handlePerFrameHover()
|
||||
// Show a new tool tip (or update one that is alrady shown)
|
||||
BOOL tool_tip_handled = FALSE;
|
||||
std::string tool_tip_msg;
|
||||
static LLCachedControl<F32> tool_tip_delay("ToolTipDelay",.7f);
|
||||
static const LLCachedControl<F32> tool_tip_delay("ToolTipDelay",.7f);
|
||||
F32 tooltip_delay = tool_tip_delay;
|
||||
//HACK: hack for tool-based tooltips which need to pop up more quickly
|
||||
//Also for show xui names as tooltips debug mode
|
||||
if ((mouse_captor && !mouse_captor->isView()) || LLUI::sShowXUINames)
|
||||
{
|
||||
static LLCachedControl<F32> drag_and_drop_tool_tip_delay("DragAndDropToolTipDelay",.1f);
|
||||
static const LLCachedControl<F32> drag_and_drop_tool_tip_delay("DragAndDropToolTipDelay",.1f);
|
||||
tooltip_delay = drag_and_drop_tool_tip_delay;
|
||||
}
|
||||
if( handled &&
|
||||
@@ -2978,7 +2978,7 @@ BOOL LLViewerWindow::handlePerFrameHover()
|
||||
}
|
||||
}
|
||||
|
||||
static LLCachedControl<bool> freeze_time("FreezeTime",0);
|
||||
static const LLCachedControl<bool> freeze_time("FreezeTime",0);
|
||||
if (tool && tool != gToolNull && tool != LLToolCompInspect::getInstance() && tool != LLToolDragAndDrop::getInstance() && !freeze_time)
|
||||
{
|
||||
LLMouseHandler *captor = gFocusMgr.getMouseCapture();
|
||||
@@ -3120,7 +3120,7 @@ BOOL LLViewerWindow::handlePerFrameHover()
|
||||
gFloaterView->syncFloaterTabOrder();
|
||||
}
|
||||
|
||||
static LLCachedControl<bool> chat_bar_steals_focus("ChatBarStealsFocus",true);
|
||||
static const LLCachedControl<bool> chat_bar_steals_focus("ChatBarStealsFocus",true);
|
||||
if (chat_bar_steals_focus
|
||||
&& gChatBar
|
||||
&& gFocusMgr.getKeyboardFocus() == NULL
|
||||
@@ -3160,8 +3160,8 @@ BOOL LLViewerWindow::handlePerFrameHover()
|
||||
if ((previous_x != x) || (previous_y != y))
|
||||
mouse_moved_since_pick = TRUE;
|
||||
|
||||
static LLCachedControl<F32> picks_moving("PicksPerSecondMouseMoving",5.f);
|
||||
static LLCachedControl<F32> picks_stationary("PicksPerSecondMouseStationary",0.f);
|
||||
static const LLCachedControl<F32> picks_moving("PicksPerSecondMouseMoving",5.f);
|
||||
static const LLCachedControl<F32> picks_stationary("PicksPerSecondMouseStationary",0.f);
|
||||
if( !getCursorHidden()
|
||||
// When in-world media is in focus, pick every frame so that browser mouse-overs, dragging scrollbars, etc. work properly.
|
||||
&& (LLViewerMediaFocus::getInstance()->getFocus()
|
||||
@@ -4286,6 +4286,20 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
|
||||
|
||||
LLRenderTarget target;
|
||||
F32 scale_factor = 1.0f ;
|
||||
|
||||
#if SHY_MOD // screenshot improvement
|
||||
F32 internal_scale = 1.f;
|
||||
static const LLCachedControl<bool> force_tile("SHHighResSnapshotForceTile",false);
|
||||
if(force_tile)
|
||||
{
|
||||
static const LLCachedControl<F32> super_sample_scale("SHHighResSnapshotSuperSample",1.f);
|
||||
internal_scale = llmax(super_sample_scale.get(),1.f);
|
||||
}
|
||||
// render at specified internal resolution. >1 results in supersampling.
|
||||
image_height *= internal_scale;
|
||||
image_width *= internal_scale;
|
||||
#endif //shy_mod
|
||||
|
||||
if(!keep_window_aspect) //image cropping
|
||||
{
|
||||
F32 ratio = llmin( (F32)window_width / image_width , (F32)window_height / image_height) ;
|
||||
@@ -4297,6 +4311,9 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
|
||||
{
|
||||
if(image_width > window_width || image_height > window_height) //need to enlarge the scene
|
||||
{
|
||||
#if SHY_MOD // screenshot improvement
|
||||
if(!force_tile)
|
||||
#endif //shy_mod
|
||||
if (gGLManager.mHasFramebufferObject && !show_ui)
|
||||
{
|
||||
GLint max_size = 0;
|
||||
@@ -4333,6 +4350,9 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
|
||||
|
||||
S32 image_buffer_x = llfloor(snapshot_width*scale_factor) ;
|
||||
S32 image_buffer_y = llfloor(snapshot_height *scale_factor) ;
|
||||
#if SHY_MOD // screenshot improvement
|
||||
if(internal_scale > 1.f) //If supersampling... Don't care about max_size.
|
||||
#endif //shy_mod
|
||||
if(image_buffer_x > max_size || image_buffer_y > max_size) //boundary check to avoid memory overflow
|
||||
{
|
||||
scale_factor *= llmin((F32)max_size / image_buffer_x, (F32)max_size / image_buffer_y) ;
|
||||
@@ -4386,11 +4406,32 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
|
||||
else
|
||||
{
|
||||
const U32 subfield = subimage_x+(subimage_y*llceil(scale_factor));
|
||||
#if SHY_MOD // screenshot improvement
|
||||
//tiling requires gPipeline.generateWaterReflection to be called in display(). CANNOT be done if using an fbo.
|
||||
display(do_rebuild, scale_factor, subfield, TRUE, !use_fbo && (scale_factor > 1.0f));
|
||||
#else //shy_mod
|
||||
display(do_rebuild, scale_factor, subfield, TRUE);
|
||||
#endif
|
||||
// Required for showing the GUI in snapshots? See DEV-16350 for details. JC
|
||||
render_ui(scale_factor, subfield);
|
||||
}
|
||||
|
||||
#if SHY_MOD // screenshot improvement
|
||||
if(scale_factor <= 1.f) //faster. bulk copy opposed to line per line
|
||||
{
|
||||
if (type == SNAPSHOT_TYPE_OBJECT_ID || type == SNAPSHOT_TYPE_COLOR)
|
||||
{
|
||||
glReadPixels(0,0,image_width, image_height,GL_RGB, GL_UNSIGNED_BYTE,raw->getData());
|
||||
}
|
||||
else // SNAPSHOT_TYPE_DEPTH
|
||||
{
|
||||
LLPointer<LLImageRaw> depth_line_buffer = new LLImageRaw(image_width, image_height, sizeof(GL_FLOAT));
|
||||
glReadPixels(0, 0,image_width,image_height, GL_DEPTH_COMPONENT, GL_FLOAT,depth_line_buffer->getData());
|
||||
raw->copy(depth_line_buffer);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
#endif //shy_mod
|
||||
S32 subimage_x_offset = llclamp(buffer_x_offset - (subimage_x * window_width), 0, window_width);
|
||||
// handle fractional rows
|
||||
U32 read_width = llmax(0, (window_width - subimage_x_offset) -
|
||||
@@ -4491,6 +4532,14 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
|
||||
ret = raw->scale( image_width, image_height, FALSE );
|
||||
}
|
||||
|
||||
#if SHY_MOD // screenshot improvement
|
||||
if(raw->isBufferInvalid()) //Just checking!
|
||||
return FALSE;
|
||||
if(internal_scale != 1.f) //Scale down our render to the desired dimensions.
|
||||
raw->scale( image_width/internal_scale, image_height/internal_scale );
|
||||
if(raw->isBufferInvalid()) //Just checking!
|
||||
return FALSE;
|
||||
#endif //shy_mod
|
||||
|
||||
setCursor(UI_CURSOR_ARROW);
|
||||
|
||||
@@ -5128,7 +5177,7 @@ LLRect LLViewerWindow::getChatConsoleRect()
|
||||
|
||||
console_rect.mLeft += CONSOLE_PADDING_LEFT;
|
||||
|
||||
static LLCachedControl<bool> chat_full_width("ChatFullWidth",true);
|
||||
static const LLCachedControl<bool> chat_full_width("ChatFullWidth",true);
|
||||
if (chat_full_width)
|
||||
{
|
||||
console_rect.mRight -= CONSOLE_PADDING_RIGHT;
|
||||
|
||||
Reference in New Issue
Block a user