(svn r14080) -Fix (r14052): assert triggered when drawing chat window with 32bpp-anim blitter (backup buffer was too small)

This commit is contained in:
glx
2008-08-15 22:06:58 +00:00
parent 7672cd43d5
commit c10691faff
6 changed files with 12 additions and 3 deletions

View File

@@ -34,6 +34,7 @@ public:
/* virtual */ Blitter::PaletteAnimation UsePaletteAnimation();
/* virtual */ const char *GetName() { return "32bpp-anim"; }
/* virtual */ int GetBytesPerPixel() { return 5; }
template <BlitterMode mode> void Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom);
};

View File

@@ -26,6 +26,7 @@ public:
/* virtual */ int BufferSize(int width, int height);
/* virtual */ void PaletteAnimate(uint start, uint count);
/* virtual */ Blitter::PaletteAnimation UsePaletteAnimation();
/* virtual */ int GetBytesPerPixel() { return 4; }
/**
* Compose a colour based on RGB values.

View File

@@ -25,6 +25,7 @@ public:
/* virtual */ int BufferSize(int width, int height);
/* virtual */ void PaletteAnimate(uint start, uint count);
/* virtual */ Blitter::PaletteAnimation UsePaletteAnimation();
/* virtual */ int GetBytesPerPixel() { return 1; }
};
#endif /* BLITTER_8BPP_BASE_HPP */

View File

@@ -183,10 +183,15 @@ public:
virtual Blitter::PaletteAnimation UsePaletteAnimation() = 0;
/**
* Get the naem of the blitter, the same as the Factory-instance returns.
* Get the name of the blitter, the same as the Factory-instance returns.
*/
virtual const char *GetName() = 0;
/**
* Get how many bytes are needed to store a pixel.
*/
virtual int GetBytesPerPixel() = 0;
virtual ~Blitter() { }
};

View File

@@ -28,6 +28,7 @@ public:
/* virtual */ Blitter::PaletteAnimation UsePaletteAnimation() { return Blitter::PALETTE_ANIMATION_NONE; };
/* virtual */ const char *GetName() { return "null"; }
/* virtual */ int GetBytesPerPixel() { return 0; }
};
class FBlitter_Null: public BlitterFactory<FBlitter_Null> {