1 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef WEBGL_CONTEXT_LOSS_HANDLER_H_
7 #define WEBGL_CONTEXT_LOSS_HANDLER_H_
9 #include "mozilla/Atomics.h"
10 #include "mozilla/WeakPtr.h"
11 #include "mozilla/RefPtr.h"
12 #include "nsThreadUtils.h"
17 class WebGLContextLossHandler final
: public SupportsWeakPtr
{
18 RefPtr
<Runnable
> mRunnable
;
19 Atomic
<bool> mTimerIsScheduled
;
22 explicit WebGLContextLossHandler(WebGLContext
* webgl
);
23 ~WebGLContextLossHandler();
26 // Allow future queueing of context loss timer.
30 } // namespace mozilla
32 #endif // WEBGL_CONTEXT_LOSS_HANDLER_H_