RequestSwap to force a swap from the GL thread.
This commit is contained in:
@@ -43,6 +43,11 @@ struct SwapParameters {
|
||||
GLenum attachment;
|
||||
};
|
||||
|
||||
enum class SwapMode {
|
||||
kNormal,
|
||||
kIgnored,
|
||||
};
|
||||
|
||||
class CommandProcessor {
|
||||
public:
|
||||
CommandProcessor(GL4GraphicsSystem* graphics_system);
|
||||
@@ -59,6 +64,9 @@ class CommandProcessor {
|
||||
void Shutdown();
|
||||
void CallInThread(std::function<void()> fn);
|
||||
|
||||
void set_swap_mode(SwapMode swap_mode) { swap_mode_ = swap_mode; }
|
||||
void IssueSwap();
|
||||
|
||||
void BeginTracing(const std::wstring& root_path);
|
||||
void EndTracing();
|
||||
|
||||
@@ -207,6 +215,8 @@ class CommandProcessor {
|
||||
std::function<void()> pending_fn_;
|
||||
HANDLE pending_fn_event_;
|
||||
|
||||
SwapMode swap_mode_;
|
||||
|
||||
uint64_t time_base_;
|
||||
uint32_t counter_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user