Remove more unused code (#87)

This commit is contained in:
sfan5
2021-12-29 13:12:09 +01:00
committed by GitHub
parent 4bdecbc6b7
commit dd09fdcb4e
40 changed files with 2 additions and 5507 deletions

View File

@ -1057,73 +1057,6 @@ static s32 Blit(eBlitter operation,
return 1;
}
#if defined(SOFTWARE_DRIVER_2_2D_AS_2D)
static s32 StretchBlit(eBlitter operation,
video::IImage* dest, const core::rect<s32>* destClipping,const core::rect<s32> *destRect,
video::IImage* const source,const core::rect<s32> *srcRect, const core::dimension2d<u32>* source_org,
u32 argb)
{
tExecuteBlit blitter = getBlitter2( operation, dest, source );
if ( 0 == blitter )
{
return 0;
}
SBlitJob job;
AbsRectangle destClip;
AbsRectangle v;
setClip(destClip, destClipping, dest, 0, 0);
setClip(v, destRect, 0, 1, 0);
if (!intersect(job.Dest, destClip, v))
return 0;
// Clipping
setClip ( job.Source, srcRect, source, 1, source_org);
job.width = job.Dest.x1-job.Dest.x0;
job.height = job.Dest.y1-job.Dest.y0;
job.argb = argb;
// use original dest size, despite any clipping
const int dst_w = v.x1 - v.x0; // destRect->getWidth();
const int dst_h = v.y1 - v.y0; // destRect->getHeight();
const int src_w = job.Source.x1 - job.Source.x0;
const int src_h = job.Source.y1 - job.Source.y0;
job.stretch = dst_w != src_w || dst_h != src_h;
job.x_stretch = dst_w ? (float)src_w / (float)dst_w : 1.f;
job.y_stretch = dst_h ? (float)src_h / (float)dst_h : 1.f;
if ( source )
{
job.srcPitch = source->getPitch();
job.srcPixelMul = source->getBytesPerPixel();
//dest-clippling. advance source. loosing subpixel precision
job.Source.x0 += (s32)floorf(job.x_stretch * (job.Dest.x0 - v.x0));
job.Source.y0 += (s32)floorf(job.y_stretch * (job.Dest.y0 - v.y0));
job.src = (void*) ( (u8*) source->getData() + ( job.Source.y0 * job.srcPitch ) + ( job.Source.x0 * job.srcPixelMul ) );
}
else
{
// use srcPitch for color operation on dest
job.srcPitch = job.width * dest->getBytesPerPixel();
}
job.dstPitch = dest->getPitch();
job.dstPixelMul = dest->getBytesPerPixel();
job.dst = (void*) ( (u8*) dest->getData() + ( job.Dest.y0 * job.dstPitch ) + ( job.Dest.x0 * job.dstPixelMul ) );
blitter( &job );
return 1;
}
#endif
}
#endif