IosSalInstance::BlitFrameToBuffer() and RedrawWindows() are unneeded now
Change-Id: I6873461aed7db7b7f06e45556eacb82bcf118aea
This commit is contained in:
@@ -26,12 +26,6 @@
|
|||||||
class IosSalFrame;
|
class IosSalFrame;
|
||||||
class IosSalInstance : public SvpSalInstance
|
class IosSalInstance : public SvpSalInstance
|
||||||
{
|
{
|
||||||
void BlitFrameToBuffer(char *pPixelBuffer,
|
|
||||||
int nPBWidth, int nPBHeight,
|
|
||||||
int destX, int nDestY,
|
|
||||||
int nDestWidth, int nDestHeight,
|
|
||||||
const basebmp::BitmapDeviceSharedPtr& aDev);
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
IosSalInstance( SalYieldMutex *pMutex );
|
IosSalInstance( SalYieldMutex *pMutex );
|
||||||
virtual ~IosSalInstance();
|
virtual ~IosSalInstance();
|
||||||
@@ -47,11 +41,6 @@ public:
|
|||||||
|
|
||||||
SalFrame *getFocusFrame() const;
|
SalFrame *getFocusFrame() const;
|
||||||
|
|
||||||
void RedrawWindows( char *pPixelBuffer,
|
|
||||||
int nPBWidth, int nPBHeight,
|
|
||||||
int destX, int nDestY,
|
|
||||||
int nDestWidth, int nDestHeight);
|
|
||||||
|
|
||||||
void damaged( IosSalFrame *frame,
|
void damaged( IosSalFrame *frame,
|
||||||
const basegfx::B2IBox& rDamageRect);
|
const basegfx::B2IBox& rDamageRect);
|
||||||
};
|
};
|
||||||
|
@@ -40,55 +40,6 @@ public:
|
|||||||
virtual bool ErrorTrapPop( bool ) { return false; }
|
virtual bool ErrorTrapPop( bool ) { return false; }
|
||||||
};
|
};
|
||||||
|
|
||||||
void IosSalInstance::BlitFrameToBuffer(char *pPixelBuffer,
|
|
||||||
int nPBWidth, int nPBHeight,
|
|
||||||
int nDestX, int nDestY,
|
|
||||||
int nDestWidth, int nDestHeight,
|
|
||||||
const basebmp::BitmapDeviceSharedPtr& aDev)
|
|
||||||
{
|
|
||||||
// TODO: Cropping (taking all the parameters into account)
|
|
||||||
(void) nPBHeight;
|
|
||||||
(void) nDestWidth;
|
|
||||||
(void) nDestHeight;
|
|
||||||
|
|
||||||
basebmp::RawMemorySharedArray aSrcData = aDev->getBuffer();
|
|
||||||
const basegfx::B2IVector aDevSize = aDev->getSize();
|
|
||||||
const sal_Int32 nStride = aDev->getScanlineStride();
|
|
||||||
const unsigned char *pSrc = aSrcData.get();
|
|
||||||
|
|
||||||
if (aDev->getScanlineFormat() != basebmp::Format::THIRTYTWO_BIT_TC_MASK_RGBA)
|
|
||||||
{
|
|
||||||
SAL_INFO( "vcl.ios", "BlitFrameToBuffer: format is not 32bpp RGBA but " << aDev->getScanlineFormat() );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (unsigned int y = 0; y < (unsigned int)aDevSize.getY(); y++)
|
|
||||||
{
|
|
||||||
const unsigned char *sp( pSrc + nStride * (aDevSize.getY() - 1 - y) );
|
|
||||||
|
|
||||||
unsigned char *dp( (unsigned char *)pPixelBuffer +
|
|
||||||
nPBWidth * 4 * (y + nDestY) +
|
|
||||||
nDestX * 4 );
|
|
||||||
memcpy(dp, sp, aDevSize.getX()*4);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void IosSalInstance::RedrawWindows(char *pPixelBuffer,
|
|
||||||
int nPBWidth, int nPBHeight,
|
|
||||||
int nDestX, int nDestY,
|
|
||||||
int nDestWidth, int nDestHeight)
|
|
||||||
{
|
|
||||||
int i = 0;
|
|
||||||
std::list< SalFrame* >::const_iterator it;
|
|
||||||
for ( it = getFrames().begin(); it != getFrames().end(); i++, it++ )
|
|
||||||
{
|
|
||||||
SvpSalFrame *pFrame = static_cast<SvpSalFrame *>(*it);
|
|
||||||
|
|
||||||
if (pFrame->IsVisible())
|
|
||||||
BlitFrameToBuffer( pPixelBuffer, nPBWidth, nPBHeight, nDestX, nDestY, nDestWidth, nDestHeight, pFrame->getDevice() );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void IosSalInstance::damaged( IosSalFrame */* frame */,
|
void IosSalInstance::damaged( IosSalFrame */* frame */,
|
||||||
const basegfx::B2IBox& rDamageRect )
|
const basegfx::B2IBox& rDamageRect )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user