Sync llcommon with Alchemy a bit.

llmath::llround->ll_round
LL_ICC->LL_INTELC
Add llpredicate
Add LL_CPP11 macro
Remove llhash
Update llinitparam, llsd and all relatives of it.
This commit is contained in:
Inusaito Sayori
2015-03-20 22:04:04 -04:00
parent 16a2b28c1b
commit 72080e79e9
135 changed files with 1940 additions and 1282 deletions

View File

@@ -120,8 +120,8 @@ LLMediaCtrl::LLMediaCtrl( const Params& p) :
if(!getDecoupleTextureSize())
{
S32 screen_width = llmath::llround((F32)getRect().getWidth() * LLUI::getScaleFactor().mV[VX]);
S32 screen_height = llmath::llround((F32)getRect().getHeight() * LLUI::getScaleFactor().mV[VY]);
S32 screen_width = ll_round((F32)getRect().getWidth() * LLUI::getScaleFactor().mV[VX]);
S32 screen_height = ll_round((F32)getRect().getHeight() * LLUI::getScaleFactor().mV[VY]);
setTextureSize(screen_width, screen_height);
}
@@ -464,8 +464,8 @@ void LLMediaCtrl::reshape( S32 width, S32 height, BOOL called_from_parent )
{
if(!getDecoupleTextureSize())
{
S32 screen_width = llmath::llround((F32)width * LLUI::getScaleFactor().mV[VX]);
S32 screen_height = llmath::llround((F32)height * LLUI::getScaleFactor().mV[VY]);
S32 screen_width = ll_round((F32)width * LLUI::getScaleFactor().mV[VX]);
S32 screen_height = ll_round((F32)height * LLUI::getScaleFactor().mV[VY]);
// when floater is minimized, these sizes are negative
if ( screen_height > 0 && screen_width > 0 )
@@ -797,13 +797,13 @@ void LLMediaCtrl::draw()
{
// max width, adjusted height
width = r.getWidth();
height = llmin(llmax(llmath::llround(width / media_aspect), 0), r.getHeight());
height = llmin(llmax(ll_round(width / media_aspect), 0), r.getHeight());
}
else
{
// max height, adjusted width
height = r.getHeight();
width = llmin(llmax(llmath::llround(height * media_aspect), 0), r.getWidth());
width = llmin(llmax(ll_round(height * media_aspect), 0), r.getWidth());
}
}
else
@@ -823,10 +823,10 @@ void LLMediaCtrl::draw()
/*if (mIgnoreUIScale)
{
x_offset = llmath::llround((F32)x_offset * LLUI::getScaleFactor().mV[VX]);
y_offset = llmath::llround((F32)y_offset * LLUI::getScaleFactor().mV[VY]);
width = llmath::llround((F32)width * LLUI::getScaleFactor().mV[VX]);
height = llmath::llround((F32)height * LLUI::getScaleFactor().mV[VY]);
x_offset = ll_round((F32)x_offset * LLUI::getScaleFactor().mV[VX]);
y_offset = ll_round((F32)y_offset * LLUI::getScaleFactor().mV[VY]);
width = ll_round((F32)width * LLUI::getScaleFactor().mV[VX]);
height = ll_round((F32)height * LLUI::getScaleFactor().mV[VY]);
}*/
// draw the browser
@@ -897,14 +897,14 @@ void LLMediaCtrl::convertInputCoords(S32& x, S32& y)
coords_opengl = mMediaSource->getMediaPlugin()->getTextureCoordsOpenGL();
}
x = llmath::llround((F32)x * LLUI::getScaleFactor().mV[VX]);
x = ll_round((F32)x * LLUI::getScaleFactor().mV[VX]);
if ( ! coords_opengl )
{
y = llmath::llround((F32)(y) * LLUI::getScaleFactor().mV[VY]);
y = ll_round((F32)(y) * LLUI::getScaleFactor().mV[VY]);
}
else
{
y = llmath::llround((F32)(getRect().getHeight() - y) * LLUI::getScaleFactor().mV[VY]);
y = ll_round((F32)(getRect().getHeight() - y) * LLUI::getScaleFactor().mV[VY]);
};
}