mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
SharedGraphics: Move PainterStateSaver out of line.
This commit is contained in:
parent
b5759089d8
commit
a082738f04
Notes:
sideshowbarker
2024-07-19 14:41:34 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/a082738f04e
2 changed files with 13 additions and 10 deletions
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue