Viewport: Reduce unnecessary region redraws when scrolling viewports
This commit is contained in:
@@ -509,7 +509,7 @@ void Blitter_32bppAnim::CopyToBuffer(const void *video, void *dst, int width, in
|
||||
}
|
||||
}
|
||||
|
||||
void Blitter_32bppAnim::ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y)
|
||||
void Blitter_32bppAnim::ScrollBuffer(void *video, int left, int top, int width, int height, int scroll_x, int scroll_y)
|
||||
{
|
||||
assert(!_screen_disable_anim);
|
||||
assert(video >= _screen.dst_ptr && video <= (uint32 *)_screen.dst_ptr + _screen.width + _screen.height * _screen.pitch);
|
||||
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
void DrawRect(void *video, int width, int height, uint8 colour) override;
|
||||
void CopyFromBuffer(void *video, const void *src, int width, int height) override;
|
||||
void CopyToBuffer(const void *video, void *dst, int width, int height) override;
|
||||
void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y) override;
|
||||
void ScrollBuffer(void *video, int left, int top, int width, int height, int scroll_x, int scroll_y) override;
|
||||
int BufferSize(int width, int height) override;
|
||||
void PaletteAnimate(const Palette &palette) override;
|
||||
Blitter::PaletteAnimation UsePaletteAnimation() override;
|
||||
|
||||
@@ -101,7 +101,7 @@ void Blitter_32bppBase::CopyImageToBuffer(const void *video, void *dst, int widt
|
||||
}
|
||||
}
|
||||
|
||||
void Blitter_32bppBase::ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y)
|
||||
void Blitter_32bppBase::ScrollBuffer(void *video, int left, int top, int width, int height, int scroll_x, int scroll_y)
|
||||
{
|
||||
const uint32 *src;
|
||||
uint32 *dst;
|
||||
|
||||
@@ -28,7 +28,7 @@ public:
|
||||
void CopyFromBuffer(void *video, const void *src, int width, int height) override;
|
||||
void CopyToBuffer(const void *video, void *dst, int width, int height) override;
|
||||
void CopyImageToBuffer(const void *video, void *dst, int width, int height, int dst_pitch) override;
|
||||
void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y) override;
|
||||
void ScrollBuffer(void *video, int left, int top, int width, int height, int scroll_x, int scroll_y) override;
|
||||
int BufferSize(int width, int height) override;
|
||||
void PaletteAnimate(const Palette &palette) override;
|
||||
Blitter::PaletteAnimation UsePaletteAnimation() override;
|
||||
|
||||
@@ -90,7 +90,7 @@ void Blitter_8bppBase::CopyImageToBuffer(const void *video, void *dst, int width
|
||||
}
|
||||
}
|
||||
|
||||
void Blitter_8bppBase::ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y)
|
||||
void Blitter_8bppBase::ScrollBuffer(void *video, int left, int top, int width, int height, int scroll_x, int scroll_y)
|
||||
{
|
||||
const uint8 *src;
|
||||
uint8 *dst;
|
||||
|
||||
@@ -25,7 +25,7 @@ public:
|
||||
void CopyFromBuffer(void *video, const void *src, int width, int height) override;
|
||||
void CopyToBuffer(const void *video, void *dst, int width, int height) override;
|
||||
void CopyImageToBuffer(const void *video, void *dst, int width, int height, int dst_pitch) override;
|
||||
void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y) override;
|
||||
void ScrollBuffer(void *video, int left, int top, int width, int height, int scroll_x, int scroll_y) override;
|
||||
int BufferSize(int width, int height) override;
|
||||
void PaletteAnimate(const Palette &palette) override;
|
||||
Blitter::PaletteAnimation UsePaletteAnimation() override;
|
||||
|
||||
@@ -198,7 +198,7 @@ public:
|
||||
* @param scroll_x How much to scroll in X.
|
||||
* @param scroll_y How much to scroll in Y.
|
||||
*/
|
||||
virtual void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y) = 0;
|
||||
virtual void ScrollBuffer(void *video, int left, int top, int width, int height, int scroll_x, int scroll_y) = 0;
|
||||
|
||||
/**
|
||||
* Calculate how much memory there is needed for an image of this size in the video-buffer.
|
||||
|
||||
@@ -28,7 +28,7 @@ public:
|
||||
void CopyFromBuffer(void *video, const void *src, int width, int height) override {};
|
||||
void CopyToBuffer(const void *video, void *dst, int width, int height) override {};
|
||||
void CopyImageToBuffer(const void *video, void *dst, int width, int height, int dst_pitch) override {};
|
||||
void ScrollBuffer(void *video, int &left, int &top, int &width, int &height, int scroll_x, int scroll_y) override {};
|
||||
void ScrollBuffer(void *video, int left, int top, int width, int height, int scroll_x, int scroll_y) override {};
|
||||
int BufferSize(int width, int height) override { return 0; };
|
||||
void PaletteAnimate(const Palette &palette) override { };
|
||||
Blitter::PaletteAnimation UsePaletteAnimation() override { return Blitter::PALETTE_ANIMATION_NONE; };
|
||||
|
||||
Reference in New Issue
Block a user