SharedGraphics: Move PainterStateSaver out of line.

This commit is contained in:
Andreas Kling 2019-04-16 01:01:03 +02:00
parent b5759089d8
commit a082738f04
Notes: sideshowbarker 2024-07-19 14:41:34 +09:00
2 changed files with 13 additions and 10 deletions

View file

@ -565,3 +565,14 @@ void Painter::clear_clip_rect()
{
state().clip_rect = m_clip_origin;
}
PainterStateSaver::PainterStateSaver(Painter& painter)
: m_painter(painter)
{
m_painter.save();
}
PainterStateSaver::~PainterStateSaver()
{
m_painter.restore();
}

View file

@ -80,16 +80,8 @@ protected:
class PainterStateSaver {
public:
PainterStateSaver(Painter& painter)
: m_painter(painter)
{
m_painter.save();
}
~PainterStateSaver()
{
m_painter.restore();
}
explicit PainterStateSaver(Painter&);
~PainterStateSaver();
private:
Painter& m_painter;