mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-29 19:20:09 +00:00
Fix EventQueue::instance() for Skia port
This commit is contained in:
parent
5033713430
commit
e8fde930bd
@ -17,7 +17,7 @@
|
||||
|
||||
namespace she {
|
||||
|
||||
SkiaDisplay::SkiaDisplay(EventQueue* queue, int width, int height, int scale)
|
||||
SkiaDisplay::SkiaDisplay(int width, int height, int scale)
|
||||
: m_window(instance()->eventQueue(), this)
|
||||
, m_surface(new SkiaSurface)
|
||||
, m_customSurface(false)
|
||||
|
@ -18,7 +18,7 @@ class SkiaSurface;
|
||||
|
||||
class SkiaDisplay : public Display {
|
||||
public:
|
||||
SkiaDisplay(EventQueue* queue, int width, int height, int scale);
|
||||
SkiaDisplay(int width, int height, int scale);
|
||||
|
||||
void setSkiaSurface(SkiaSurface* surface);
|
||||
|
||||
|
@ -28,6 +28,8 @@
|
||||
|
||||
namespace she {
|
||||
|
||||
EventQueueImpl g_queue;
|
||||
|
||||
class SkiaSystem : public CommonSystem {
|
||||
public:
|
||||
SkiaSystem()
|
||||
@ -52,7 +54,7 @@ public:
|
||||
}
|
||||
|
||||
EventQueue* eventQueue() override {
|
||||
return &m_queue;
|
||||
return &g_queue;
|
||||
}
|
||||
|
||||
Display* defaultDisplay() override {
|
||||
@ -60,7 +62,7 @@ public:
|
||||
}
|
||||
|
||||
Display* createDisplay(int width, int height, int scale) override {
|
||||
SkiaDisplay* display = new SkiaDisplay(&m_queue, width, height, scale);
|
||||
SkiaDisplay* display = new SkiaDisplay(width, height, scale);
|
||||
if (!m_defaultDisplay)
|
||||
m_defaultDisplay = display;
|
||||
return display;
|
||||
@ -107,9 +109,12 @@ public:
|
||||
|
||||
private:
|
||||
SkiaDisplay* m_defaultDisplay;
|
||||
EventQueueImpl m_queue;
|
||||
};
|
||||
|
||||
EventQueue* EventQueue::instance() {
|
||||
return &g_queue;
|
||||
}
|
||||
|
||||
} // namespace she
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user