1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/. */
9 #include "WebGLObjectModel.h"
11 #include "nsWrapperCache.h"
13 #include "mozilla/LinkedList.h"
17 class WebGLQuery MOZ_FINAL
18 : public nsWrapperCache
19 , public WebGLRefCountedObject
<WebGLQuery
>
20 , public LinkedListElement
<WebGLQuery
>
21 , public WebGLContextBoundObject
23 // -----------------------------------------------------------------------------
27 // -------------------------------------------------------------------------
30 WebGLQuery(WebGLContext
*context
);
32 // -------------------------------------------------------------------------
35 bool IsActive() const;
37 bool HasEverBeenActive()
43 // -------------------------------------------------------------------------
44 // IMPLEMENT WebGLRefCountedObject and WebGLContextBoundObject
48 WebGLContext
* GetParentObject() const
54 // -------------------------------------------------------------------------
56 virtual JSObject
* WrapObject(JSContext
*cx
) MOZ_OVERRIDE
;
58 NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(WebGLQuery
)
59 NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(WebGLQuery
)
62 // -----------------------------------------------------------------------------
69 // -------------------------------------------------------------------------
74 // -------------------------------------------------------------------------
76 friend class WebGLContext
;
79 } // namespace mozilla