More threadpool bs
This commit is contained in:
@@ -13,18 +13,19 @@ public:
|
||||
virtual ~View();
|
||||
|
||||
// These are called from the view thread, and handle updating game data
|
||||
virtual void beginUpdate() {}
|
||||
virtual void update() {}
|
||||
virtual void beginUpdate() = 0;
|
||||
virtual void update() = 0;
|
||||
// End frame is called with a lock, so it is safe to write to shared memory
|
||||
virtual void commitUpdate() {}
|
||||
virtual void commitUpdate() = 0;
|
||||
|
||||
// These are called from the render thread
|
||||
// prepare render is also locked, so reading from shared memory is also safe
|
||||
virtual void prepareRender() {}
|
||||
virtual Job render() { co_return; }
|
||||
virtual void prepareRender() = 0;
|
||||
virtual MainJob render() = 0;
|
||||
void applyArea(URect area);
|
||||
void setFocused();
|
||||
Event renderFinished() { return renderFinishedEvent; }
|
||||
void resetRender() { renderFinishedEvent.reset(); }
|
||||
|
||||
protected:
|
||||
Gfx::PGraphics graphics;
|
||||
|
||||
Reference in New Issue
Block a user