summaryrefslogtreecommitdiffstats
path: root/gfx/ipc/VsyncIOThreadHolder.h
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/ipc/VsyncIOThreadHolder.h')
-rw-r--r--gfx/ipc/VsyncIOThreadHolder.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gfx/ipc/VsyncIOThreadHolder.h b/gfx/ipc/VsyncIOThreadHolder.h
index ac305c7..b5ea0c2 100644
--- a/gfx/ipc/VsyncIOThreadHolder.h
+++ b/gfx/ipc/VsyncIOThreadHolder.h
@@ -23,6 +23,14 @@ class VsyncIOThreadHolder final {
RefPtr<nsIThread> GetThread() const;
+ bool IsOnCurrentThread() const {
+ return mThread->IsOnCurrentThread();
+ }
+
+ void Dispatch(already_AddRefed<nsIRunnable> task) {
+ mThread->Dispatch(std::move(task), NS_DISPATCH_NORMAL);
+ }
+
private:
~VsyncIOThreadHolder();