mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-23 20:51:14 +00:00
GRAPHICS: Just copy the buffer when it's the same pixel format.
This commit is contained in:
parent
f927098b1e
commit
cd1eadd190
@ -136,6 +136,10 @@ public:
|
||||
* @param otherPix The index of the source pixel in 'buf'.
|
||||
*/
|
||||
inline void setPixelAt(int thisPix, const PixelBuffer &buf, int otherPix) {
|
||||
if (_format == buf._format) {
|
||||
memcpy(getRawBuffer(thisPix), buf.getRawBuffer(otherPix), _format.bytesPerPixel);
|
||||
return;
|
||||
}
|
||||
uint8 a, r, g, b;
|
||||
buf.getARGBAt(otherPix, a, r, g, b);
|
||||
setPixelAt(thisPix, a, r, g, b);
|
||||
|
Loading…
x
Reference in New Issue
Block a user