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 // -------------------------------------------------------------------------
28 // CONSTRUCTOR & DESTRUCTOR
30 WebGLQuery(WebGLContext
*context
);
37 // -------------------------------------------------------------------------
40 bool IsActive() const;
42 bool HasEverBeenActive()
48 // -------------------------------------------------------------------------
49 // IMPLEMENT WebGLRefCountedObject and WebGLContextBoundObject
53 WebGLContext
* GetParentObject() const
59 // -------------------------------------------------------------------------
61 virtual JSObject
* WrapObject(JSContext
*cx
,
62 JS::Handle
<JSObject
*> scope
) MOZ_OVERRIDE
;
64 NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(WebGLQuery
)
65 NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(WebGLQuery
)
68 // -----------------------------------------------------------------------------
72 // -------------------------------------------------------------------------
77 // -------------------------------------------------------------------------
79 friend class WebGLContext
;
82 } // namespace mozilla