Massive sunshine/viewer-dev catchup. Further implemented serverside baking and added/updated metrics feedback.
This commit is contained in:
@@ -725,6 +725,29 @@ void LLImageRaw::compositeUnscaled4onto3( LLImageRaw* src )
|
||||
}
|
||||
}
|
||||
|
||||
void LLImageRaw::copyUnscaledAlphaMask( LLImageRaw* src, const LLColor4U& fill)
|
||||
{
|
||||
LLImageRaw* dst = this; // Just for clarity.
|
||||
|
||||
llassert( 1 == src->getComponents() );
|
||||
llassert( 4 == dst->getComponents() );
|
||||
llassert( (src->getWidth() == dst->getWidth()) && (src->getHeight() == dst->getHeight()) );
|
||||
|
||||
S32 pixels = getWidth() * getHeight();
|
||||
U8* src_data = src->getData();
|
||||
U8* dst_data = dst->getData();
|
||||
for ( S32 i = 0; i < pixels; i++ )
|
||||
{
|
||||
dst_data[0] = fill.mV[0];
|
||||
dst_data[1] = fill.mV[1];
|
||||
dst_data[2] = fill.mV[2];
|
||||
dst_data[3] = src_data[0];
|
||||
src_data += 1;
|
||||
dst_data += 4;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Fill the buffer with a constant color
|
||||
void LLImageRaw::fill( const LLColor4U& color )
|
||||
{
|
||||
|
||||
@@ -219,6 +219,11 @@ public:
|
||||
// Src and dst are same size. Src has 3 components. Dst has 4 components.
|
||||
void copyUnscaled3onto4( LLImageRaw* src );
|
||||
|
||||
// Src and dst are same size. Src has 1 component. Dst has 4 components.
|
||||
// Alpha component is set to source alpha mask component.
|
||||
// RGB components are set to fill color.
|
||||
void copyUnscaledAlphaMask( LLImageRaw* src, const LLColor4U& fill);
|
||||
|
||||
// Src and dst can be any size. Src and dst have same number of components.
|
||||
void copyScaled( LLImageRaw* src );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user