Move Painter into EventDispatcher.

This commit is contained in:
Jared Boone 2016-05-12 15:52:18 -07:00
parent d64344a84f
commit 479a96fc22
3 changed files with 3 additions and 6 deletions

View File

@ -62,10 +62,9 @@ Thread* EventDispatcher::thread_event_loop = nullptr;
EventDispatcher::EventDispatcher(
ui::Widget* const top_widget,
ui::Painter& painter,
ui::Context& context
) : top_widget { top_widget },
painter(painter),
painter { },
context(context)
{
init_message_queues();

View File

@ -50,7 +50,6 @@ class EventDispatcher {
public:
EventDispatcher(
ui::Widget* const top_widget,
ui::Painter& painter,
ui::Context& context
);
@ -87,7 +86,7 @@ private:
touch::Manager touch_manager;
ui::Widget* const top_widget;
ui::Painter& painter;
ui::Painter painter;
ui::Context& context;
uint32_t encoder_last = 0;
bool is_running = true;

View File

@ -57,9 +57,8 @@ static void event_loop() {
context,
portapack::display.screen_rect()
};
ui::Painter painter;
EventDispatcher event_dispatcher { &system_view, painter, context };
EventDispatcher event_dispatcher { &system_view, context };
MessageHandlerRegistration message_handler_shutdown {
Message::ID::Shutdown,