mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-02 12:07:52 +00:00
197485 r=paper sr=tor Remove [GS]etTransparentColor from gfxIImageFrame
This commit is contained in:
parent
59e5eb0421
commit
af36ee745c
@ -190,9 +190,4 @@ interface gfxIImageFrame : nsISupports
|
||||
* GIF specific, should be in a GIF specific frame
|
||||
*/
|
||||
attribute gfx_color backgroundColor;
|
||||
|
||||
/* frame transparent color
|
||||
* GIF specific, should be in a GIF specific frame
|
||||
*/
|
||||
attribute gfx_color transparentColor;
|
||||
};
|
||||
|
@ -41,10 +41,8 @@ gfxImageFrame::gfxImageFrame() :
|
||||
mInitalized(PR_FALSE),
|
||||
mMutable(PR_TRUE),
|
||||
mHasBackgroundColor(PR_FALSE),
|
||||
mHasTransparentColor(PR_FALSE),
|
||||
mTimeout(100),
|
||||
mBackgroundColor(0),
|
||||
mTransparentColor(0),
|
||||
mDisposalMethod(0)
|
||||
{
|
||||
/* member initializers and constructor code */
|
||||
@ -480,28 +478,6 @@ NS_IMETHODIMP gfxImageFrame::SetBackgroundColor(gfx_color aBackgroundColor)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* attribute gfx_color transparentColor; */
|
||||
NS_IMETHODIMP gfxImageFrame::GetTransparentColor(gfx_color *aTransparentColor)
|
||||
{
|
||||
if (!mInitalized || !mHasTransparentColor)
|
||||
return NS_ERROR_NOT_INITIALIZED;
|
||||
|
||||
*aTransparentColor = mTransparentColor;
|
||||
return NS_OK;
|
||||
}
|
||||
NS_IMETHODIMP gfxImageFrame::SetTransparentColor(gfx_color aTransparentColor)
|
||||
{
|
||||
if (!mInitalized)
|
||||
return NS_ERROR_NOT_INITIALIZED;
|
||||
|
||||
mTransparentColor = aTransparentColor;
|
||||
mHasTransparentColor = PR_TRUE;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
NS_IMETHODIMP gfxImageFrame::GetInterface(const nsIID & aIID, void * *result)
|
||||
{
|
||||
if (!mInitalized)
|
||||
|
@ -61,14 +61,12 @@ private:
|
||||
PRPackedBool mInitalized;
|
||||
PRPackedBool mMutable;
|
||||
PRPackedBool mHasBackgroundColor;
|
||||
PRPackedBool mHasTransparentColor;
|
||||
gfx_format mFormat;
|
||||
|
||||
PRInt32 mTimeout; // -1 means display forever
|
||||
nsPoint mOffset;
|
||||
|
||||
gfx_color mBackgroundColor;
|
||||
gfx_color mTransparentColor;
|
||||
|
||||
PRInt32 mDisposalMethod;
|
||||
};
|
||||
|
@ -484,15 +484,6 @@ int nsGIFDecoder2::HaveDecodedRow(
|
||||
case gfxIFormats::RGB_A1:
|
||||
case gfxIFormats::BGR_A1:
|
||||
{
|
||||
gfx_color transColor = 0;
|
||||
if (cmap && // cmap could have null value if the global color table flag is 0
|
||||
decoder->mGIFStruct->is_transparent &&
|
||||
(decoder->mGIFStruct->tpixel < cmapsize)) {
|
||||
transColor |= cmap[decoder->mGIFStruct->tpixel].red;
|
||||
transColor |= cmap[decoder->mGIFStruct->tpixel].green << 8;
|
||||
transColor |= cmap[decoder->mGIFStruct->tpixel].blue << 16;
|
||||
}
|
||||
decoder->mImageFrame->SetTransparentColor(transColor);
|
||||
memset(decoder->mRGBLine, 0, bpr);
|
||||
memset(decoder->mAlphaLine, 0, abpr);
|
||||
PRUint32 iwidth = (PRUint32)width;
|
||||
|
Loading…
x
Reference in New Issue
Block a user