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/. */
6 #ifndef WEBGL_SAMPLER_H_
7 #define WEBGL_SAMPLER_H_
9 #include "mozilla/LinkedList.h"
10 #include "nsWrapperCache.h"
11 #include "WebGLBindableName.h"
12 #include "WebGLObjectModel.h"
16 class WebGLSampler MOZ_FINAL
17 : public nsWrapperCache
18 , public WebGLBindableName
<GLenum
>
19 , public WebGLRefCountedObject
<WebGLSampler
>
20 , public LinkedListElement
<WebGLSampler
>
21 , public WebGLContextBoundObject
23 friend class WebGLContext2
;
26 explicit WebGLSampler(WebGLContext
* webgl
, GLuint sampler
);
29 WebGLContext
* GetParentObject() const;
31 virtual JSObject
* WrapObject(JSContext
* cx
) MOZ_OVERRIDE
;
35 NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(WebGLSampler
)
36 NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(WebGLSampler
)
42 } // namespace mozilla
44 #endif // WEBGL_SAMPLER_H_