|
1 /* |
|
2 This file is part of the WebKit open source project. |
|
3 This file has been generated by generate-bindings.pl. DO NOT MODIFY! |
|
4 |
|
5 This library is free software; you can redistribute it and/or |
|
6 modify it under the terms of the GNU Library General Public |
|
7 License as published by the Free Software Foundation; either |
|
8 version 2 of the License, or (at your option) any later version. |
|
9 |
|
10 This library is distributed in the hope that it will be useful, |
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
13 Library General Public License for more details. |
|
14 |
|
15 You should have received a copy of the GNU Library General Public License |
|
16 along with this library; see the file COPYING.LIB. If not, write to |
|
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
|
18 Boston, MA 02110-1301, USA. |
|
19 */ |
|
20 |
|
21 #include "config.h" |
|
22 |
|
23 #if ENABLE(3D_CANVAS) |
|
24 |
|
25 #include "JSWebGLShader.h" |
|
26 |
|
27 #include "WebGLShader.h" |
|
28 #include <wtf/GetPtr.h> |
|
29 |
|
30 using namespace JSC; |
|
31 |
|
32 namespace WebCore { |
|
33 |
|
34 ASSERT_CLASS_FITS_IN_CELL(JSWebGLShader); |
|
35 |
|
36 /* Hash table for prototype */ |
|
37 #if ENABLE(JIT) |
|
38 #define THUNK_GENERATOR(generator) , generator |
|
39 #else |
|
40 #define THUNK_GENERATOR(generator) |
|
41 #endif |
|
42 |
|
43 static const HashTableValue JSWebGLShaderPrototypeTableValues[1] = |
|
44 { |
|
45 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
46 }; |
|
47 |
|
48 #undef THUNK_GENERATOR |
|
49 static JSC_CONST_HASHTABLE HashTable JSWebGLShaderPrototypeTable = { 1, 0, JSWebGLShaderPrototypeTableValues, 0 }; |
|
50 const ClassInfo JSWebGLShaderPrototype::s_info = { "WebGLShaderPrototype", 0, &JSWebGLShaderPrototypeTable, 0 }; |
|
51 |
|
52 JSObject* JSWebGLShaderPrototype::self(ExecState* exec, JSGlobalObject* globalObject) |
|
53 { |
|
54 return getDOMPrototype<JSWebGLShader>(exec, globalObject); |
|
55 } |
|
56 |
|
57 const ClassInfo JSWebGLShader::s_info = { "WebGLShader", 0, 0, 0 }; |
|
58 |
|
59 JSWebGLShader::JSWebGLShader(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<WebGLShader> impl) |
|
60 : DOMObjectWithGlobalPointer(structure, globalObject) |
|
61 , m_impl(impl) |
|
62 { |
|
63 } |
|
64 |
|
65 JSWebGLShader::~JSWebGLShader() |
|
66 { |
|
67 forgetDOMObject(this, impl()); |
|
68 } |
|
69 |
|
70 JSObject* JSWebGLShader::createPrototype(ExecState* exec, JSGlobalObject* globalObject) |
|
71 { |
|
72 return new (exec) JSWebGLShaderPrototype(globalObject, JSWebGLShaderPrototype::createStructure(globalObject->objectPrototype())); |
|
73 } |
|
74 |
|
75 JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, WebGLShader* object) |
|
76 { |
|
77 return getDOMObjectWrapper<JSWebGLShader>(exec, globalObject, object); |
|
78 } |
|
79 WebGLShader* toWebGLShader(JSC::JSValue value) |
|
80 { |
|
81 return value.inherits(&JSWebGLShader::s_info) ? static_cast<JSWebGLShader*>(asObject(value))->impl() : 0; |
|
82 } |
|
83 |
|
84 } |
|
85 |
|
86 #endif // ENABLE(3D_CANVAS) |