Proper clipping in CommonLockedSurface::drawColoredRgbaSurface() impl

This commit is contained in:
David Capello 2015-04-16 20:26:05 -03:00
parent cbed44e627
commit 55cafac735

View File

@ -59,7 +59,11 @@ gfx::Color blend(const gfx::Color back, gfx::Color front)
class CommonLockedSurface : public LockedSurface {
public:
void drawColoredRgbaSurface(const LockedSurface* src, gfx::Color fg, gfx::Color bg, const gfx::Clip& clip) override {
void drawColoredRgbaSurface(const LockedSurface* src, gfx::Color fg, gfx::Color bg, const gfx::Clip& clipbase) override {
gfx::Clip clip(clipbase);
if (!clip.clip(lockedWidth(), lockedHeight(), src->lockedWidth(), src->lockedHeight()))
return;
SurfaceFormatData format;
src->getFormat(&format);