Polymorphic Map and threadpool

This commit is contained in:
2021-11-01 20:25:16 +01:00
parent 9c48c48f8c
commit 1b7ab9b1f1
20 changed files with 1442 additions and 1280 deletions
+5 -4
View File
@@ -9,26 +9,27 @@ struct WindowView
{
PView view;
Event updateFinished;
std::thread worker;
std::mutex workerMutex;
};
DEFINE_REF(WindowView)
DECLARE_REF(WindowManager)
// The logical window, with the graphics proxy
class Window
{
public:
Window(Gfx::PWindow handle);
Window(PWindowManager owner, Gfx::PWindow handle);
~Window();
void addView(PView view);
void render();
MainJob render();
Gfx::PWindow getGfxHandle();
void setFocused(PView view);
protected:
PWindowManager owner;
Array<WindowView*> views;
Gfx::PWindow gfxHandle;
void viewWorker(WindowView* view);
Job viewWorker(WindowView* view);
};
DEFINE_REF(Window)
} // namespace Seele