diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-01-09 02:06:04 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-01-09 02:06:04 +0100 |
commit | 9963da900583dc54f46c649978aa8a574a0bd508 (patch) | |
tree | f1cf7e9bd17f37cb6bc02d98cd255652c6ab4c64 /Widgets/Widget.cpp | |
parent | 2735b7e50da8c979e413042a1dc8023a5dba28c4 (diff) | |
download | serenity-9963da900583dc54f46c649978aa8a574a0bd508.zip |
Start refactoring graphics system to have per-window backing stores.
It was fun for everyone to share a single framebuffer but it was also
kinda really awful. Let's move towards having a "GraphicsBitmap" as the
backing store for each Window.
This is going to need a lot of refactoring so let's get started.
Diffstat (limited to 'Widgets/Widget.cpp')
-rw-r--r-- | Widgets/Widget.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Widgets/Widget.cpp b/Widgets/Widget.cpp index 97c860a8a8..f55bb0a5c2 100644 --- a/Widgets/Widget.cpp +++ b/Widgets/Widget.cpp @@ -1,6 +1,7 @@ #include "Widget.h" #include "Event.h" #include "EventLoop.h" +#include "GraphicsBitmap.h" #include "WindowManager.h" #include "Window.h" #include "Painter.h" @@ -155,3 +156,10 @@ void Widget::setFont(RetainPtr<Font>&& font) else m_font = std::move(font); } + +GraphicsBitmap* Widget::backing() +{ + if (auto* w = window()) + return w->backing(); + return nullptr; +} |