summaryrefslogtreecommitdiffstats
path: root/dom/canvas/WebGLContext.h
diff options
context:
space:
mode:
Diffstat (limited to 'dom/canvas/WebGLContext.h')
-rw-r--r--dom/canvas/WebGLContext.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/dom/canvas/WebGLContext.h b/dom/canvas/WebGLContext.h
index 5ab584174c..d144584f4f 100644
--- a/dom/canvas/WebGLContext.h
+++ b/dom/canvas/WebGLContext.h
@@ -303,6 +303,15 @@ class WebGLContext : public VRefCounted, public SupportsWeakPtr {
uint64_t mNextFenceId = 1;
uint64_t mCompletedFenceId = 0;
+ mutable std::list<WeakPtr<WebGLSync>> mPendingSyncs;
+ mutable RefPtr<nsIRunnable> mPollPendingSyncs_Pending;
+ static constexpr uint32_t kPollPendingSyncs_DelayMs =
+ 4; // Four times a frame.
+ public:
+ void EnsurePollPendingSyncs_Pending() const;
+ void PollPendingSyncs() const;
+
+ protected:
std::unique_ptr<gl::Texture> mIncompleteTexOverride;
public:
@@ -756,8 +765,6 @@ class WebGLContext : public VRefCounted, public SupportsWeakPtr {
virtual Maybe<double> GetParameter(GLenum pname);
Maybe<std::string> GetString(GLenum pname) const;
- bool IsEnabled(GLenum cap);
-
private:
static StaticMutex sLruMutex;
static std::list<WebGLContext*> sLru MOZ_GUARDED_BY(sLruMutex);
@@ -780,8 +787,7 @@ class WebGLContext : public VRefCounted, public SupportsWeakPtr {
};
ScissorRect mScissorRect = {};
- bool ValidateCapabilityEnum(GLenum cap);
- bool* GetStateTrackingSlot(GLenum cap, GLuint i);
+ bool* GetStateTrackingSlot(GLenum cap);
// Allocation debugging variables
mutable uint64_t mDataAllocGLCallCount = 0;