mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-28 22:23:43 +00:00
GRAPHICS: Unify VectorRenderer blitting routines
This commit is contained in:
parent
dbf192fd13
commit
d3f5d34b62
@ -457,7 +457,7 @@ public:
|
||||
void drawCallback_BITMAP(const Common::Rect &area, const DrawStep &step) {
|
||||
uint16 x, y, w, h;
|
||||
stepGetPositions(step, area, x, y, w, h);
|
||||
blitKeyBitmap(step.blitSrc, Common::Point(x, y));
|
||||
blitKeyBitmap(step.blitSrc, Common::Point(x, y), true);
|
||||
}
|
||||
|
||||
void drawCallback_CROSS(const Common::Rect &area, const DrawStep &step) {
|
||||
@ -508,9 +508,7 @@ public:
|
||||
*/
|
||||
virtual void blitSurface(const Graphics::ManagedSurface *source, const Common::Rect &r) = 0;
|
||||
|
||||
virtual void blitKeyBitmap(const Graphics::ManagedSurface *source, const Common::Point &p) = 0;
|
||||
|
||||
virtual void blitManagedSurface(const Graphics::ManagedSurface *source, const Common::Point &p, bool themeTrans) = 0;
|
||||
virtual void blitKeyBitmap(const Graphics::ManagedSurface *source, const Common::Point &p, bool themeTrans) = 0;
|
||||
|
||||
/**
|
||||
* Draws a string into the screen. Wrapper for the Graphics::Font string drawing
|
||||
|
@ -746,7 +746,7 @@ blitSurface(const Graphics::ManagedSurface *source, const Common::Rect &r) {
|
||||
|
||||
template<typename PixelType>
|
||||
void VectorRendererSpec<PixelType>::
|
||||
blitManagedSurface(const Graphics::ManagedSurface *source, const Common::Point &p, bool themeTrans) {
|
||||
blitKeyBitmap(const Graphics::ManagedSurface *source, const Common::Point &p, bool themeTrans) {
|
||||
Common::Rect drawRect(p.x, p.y, p.x + source->w, p.y + source->h);
|
||||
drawRect.clip(_clippingArea);
|
||||
drawRect.moveTo(0, 0);
|
||||
@ -761,20 +761,6 @@ blitManagedSurface(const Graphics::ManagedSurface *source, const Common::Point &
|
||||
_activeSurface->blitFrom(*source, drawRect, p);
|
||||
}
|
||||
|
||||
template<typename PixelType>
|
||||
void VectorRendererSpec<PixelType>::
|
||||
blitKeyBitmap(const Graphics::ManagedSurface *source, const Common::Point &p) {
|
||||
Common::Rect drawRect(p.x, p.y, p.x + source->w, p.y + source->h);
|
||||
drawRect.clip(_clippingArea);
|
||||
drawRect.moveTo(0, 0);
|
||||
|
||||
if (drawRect.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
_activeSurface->transBlitFrom(*source, drawRect, p, _bitmapAlphaColor);
|
||||
}
|
||||
|
||||
template<typename PixelType>
|
||||
void VectorRendererSpec<PixelType>::
|
||||
applyScreenShading(GUI::ThemeEngine::ShadingStyle shadingStyle) {
|
||||
|
@ -89,8 +89,7 @@ public:
|
||||
|
||||
void fillSurface() override;
|
||||
void blitSurface(const Graphics::ManagedSurface *source, const Common::Rect &r) override;
|
||||
void blitManagedSurface(const Graphics::ManagedSurface *source, const Common::Point &p, bool themeTrans) override;
|
||||
void blitKeyBitmap(const Graphics::ManagedSurface *source, const Common::Point &p) override;
|
||||
void blitKeyBitmap(const Graphics::ManagedSurface *source, const Common::Point &p, bool themeTrans) override;
|
||||
|
||||
void applyScreenShading(GUI::ThemeEngine::ShadingStyle shadingStyle) override;
|
||||
|
||||
|
@ -1277,7 +1277,7 @@ void ThemeEngine::drawSurface(const Common::Point &p, const Graphics::ManagedSur
|
||||
return;
|
||||
|
||||
_vectorRenderer->setClippingRect(_clip);
|
||||
_vectorRenderer->blitManagedSurface(&surface, p, themeTrans);
|
||||
_vectorRenderer->blitKeyBitmap(&surface, p, themeTrans);
|
||||
|
||||
Common::Rect dirtyRect = Common::Rect(p.x, p.y, p.x + surface.w, p.y + surface.h);
|
||||
dirtyRect.clip(_clip);
|
||||
|
Loading…
x
Reference in New Issue
Block a user