Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(592)

Side by Side Diff: Source/core/html/canvas/WebGLGetInfo.h

Issue 606653006: bindings: Adds DOMArrayBuffer, etc. as thin wrappers for ArrayBuffer, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/canvas/DataView.idl ('k') | Source/core/html/canvas/WebGLGetInfo.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2009 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2009 Google Inc. All Rights Reserved. 3 * Copyright (C) 2009 Google Inc. All Rights Reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the 11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution. 12 * documentation and/or other materials provided with the distribution.
13 * 13 *
14 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY 14 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR 17 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
18 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 18 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 19 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
21 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 21 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */ 25 */
26 26
27 #ifndef WebGLGetInfo_h 27 #ifndef WebGLGetInfo_h
28 #define WebGLGetInfo_h 28 #define WebGLGetInfo_h
29 29
30 #include "core/dom/DOMTypedArray.h"
30 #include "core/html/canvas/WebGLBuffer.h" 31 #include "core/html/canvas/WebGLBuffer.h"
31 #include "core/html/canvas/WebGLFramebuffer.h" 32 #include "core/html/canvas/WebGLFramebuffer.h"
32 #include "core/html/canvas/WebGLProgram.h" 33 #include "core/html/canvas/WebGLProgram.h"
33 #include "core/html/canvas/WebGLRenderbuffer.h" 34 #include "core/html/canvas/WebGLRenderbuffer.h"
34 #include "core/html/canvas/WebGLTexture.h" 35 #include "core/html/canvas/WebGLTexture.h"
35 #include "core/html/canvas/WebGLVertexArrayObjectOES.h" 36 #include "core/html/canvas/WebGLVertexArrayObjectOES.h"
36 #include "wtf/Float32Array.h"
37 #include "wtf/Int32Array.h"
38 #include "wtf/PassRefPtr.h" 37 #include "wtf/PassRefPtr.h"
39 #include "wtf/RefPtr.h" 38 #include "wtf/RefPtr.h"
40 #include "wtf/Uint32Array.h"
41 #include "wtf/Uint8Array.h"
42 #include "wtf/text/WTFString.h" 39 #include "wtf/text/WTFString.h"
43 40
44 namespace blink { 41 namespace blink {
45 42
46 // A tagged union representing the result of get queries like 43 // A tagged union representing the result of get queries like
47 // getParameter (encompassing getBooleanv, getIntegerv, getFloatv) and 44 // getParameter (encompassing getBooleanv, getIntegerv, getFloatv) and
48 // similar variants. For reference counted types, increments and 45 // similar variants. For reference counted types, increments and
49 // decrements the reference count of the target object. 46 // decrements the reference count of the target object.
50 47
51 class WebGLGetInfo final { 48 class WebGLGetInfo final {
(...skipping 22 matching lines...) Expand all
74 71
75 explicit WebGLGetInfo(bool value); 72 explicit WebGLGetInfo(bool value);
76 WebGLGetInfo(const bool* value, int size); 73 WebGLGetInfo(const bool* value, int size);
77 explicit WebGLGetInfo(float value); 74 explicit WebGLGetInfo(float value);
78 explicit WebGLGetInfo(int value); 75 explicit WebGLGetInfo(int value);
79 // Represents the null value and type. 76 // Represents the null value and type.
80 WebGLGetInfo(); 77 WebGLGetInfo();
81 explicit WebGLGetInfo(const String& value); 78 explicit WebGLGetInfo(const String& value);
82 explicit WebGLGetInfo(unsigned value); 79 explicit WebGLGetInfo(unsigned value);
83 explicit WebGLGetInfo(PassRefPtrWillBeRawPtr<WebGLBuffer> value); 80 explicit WebGLGetInfo(PassRefPtrWillBeRawPtr<WebGLBuffer> value);
84 explicit WebGLGetInfo(PassRefPtr<Float32Array> value); 81 explicit WebGLGetInfo(PassRefPtr<DOMFloat32Array> value);
85 explicit WebGLGetInfo(PassRefPtrWillBeRawPtr<WebGLFramebuffer> value); 82 explicit WebGLGetInfo(PassRefPtrWillBeRawPtr<WebGLFramebuffer> value);
86 explicit WebGLGetInfo(PassRefPtr<Int32Array> value); 83 explicit WebGLGetInfo(PassRefPtr<DOMInt32Array> value);
87 // FIXME: implement WebGLObjectArray 84 // FIXME: implement WebGLObjectArray
88 // WebGLGetInfo(PassRefPtrWillBeRawPtr<WebGLObjectArray> value); 85 // WebGLGetInfo(PassRefPtrWillBeRawPtr<WebGLObjectArray> value);
89 explicit WebGLGetInfo(PassRefPtrWillBeRawPtr<WebGLProgram> value); 86 explicit WebGLGetInfo(PassRefPtrWillBeRawPtr<WebGLProgram> value);
90 explicit WebGLGetInfo(PassRefPtrWillBeRawPtr<WebGLRenderbuffer> value); 87 explicit WebGLGetInfo(PassRefPtrWillBeRawPtr<WebGLRenderbuffer> value);
91 explicit WebGLGetInfo(PassRefPtrWillBeRawPtr<WebGLTexture> value); 88 explicit WebGLGetInfo(PassRefPtrWillBeRawPtr<WebGLTexture> value);
92 explicit WebGLGetInfo(PassRefPtr<Uint8Array> value); 89 explicit WebGLGetInfo(PassRefPtr<DOMUint8Array> value);
93 explicit WebGLGetInfo(PassRefPtr<Uint32Array> value); 90 explicit WebGLGetInfo(PassRefPtr<DOMUint32Array> value);
94 explicit WebGLGetInfo(PassRefPtrWillBeRawPtr<WebGLVertexArrayObjectOES> valu e); 91 explicit WebGLGetInfo(PassRefPtrWillBeRawPtr<WebGLVertexArrayObjectOES> valu e);
95 92
96 Type getType() const; 93 Type getType() const;
97 94
98 bool getBool() const; 95 bool getBool() const;
99 const Vector<bool>& getBoolArray() const; 96 const Vector<bool>& getBoolArray() const;
100 float getFloat() const; 97 float getFloat() const;
101 int getInt() const; 98 int getInt() const;
102 const String& getString() const; 99 const String& getString() const;
103 unsigned getUnsignedInt() const; 100 unsigned getUnsignedInt() const;
104 PassRefPtrWillBeRawPtr<WebGLBuffer> getWebGLBuffer() const; 101 PassRefPtrWillBeRawPtr<WebGLBuffer> getWebGLBuffer() const;
105 PassRefPtr<Float32Array> getWebGLFloatArray() const; 102 PassRefPtr<DOMFloat32Array> getWebGLFloatArray() const;
106 PassRefPtrWillBeRawPtr<WebGLFramebuffer> getWebGLFramebuffer() const; 103 PassRefPtrWillBeRawPtr<WebGLFramebuffer> getWebGLFramebuffer() const;
107 PassRefPtr<Int32Array> getWebGLIntArray() const; 104 PassRefPtr<DOMInt32Array> getWebGLIntArray() const;
108 // FIXME: implement WebGLObjectArray 105 // FIXME: implement WebGLObjectArray
109 // PassRefPtr<WebGLObjectArray> getWebGLObjectArray() const; 106 // PassRefPtr<WebGLObjectArray> getWebGLObjectArray() const;
110 PassRefPtrWillBeRawPtr<WebGLProgram> getWebGLProgram() const; 107 PassRefPtrWillBeRawPtr<WebGLProgram> getWebGLProgram() const;
111 PassRefPtrWillBeRawPtr<WebGLRenderbuffer> getWebGLRenderbuffer() const; 108 PassRefPtrWillBeRawPtr<WebGLRenderbuffer> getWebGLRenderbuffer() const;
112 PassRefPtrWillBeRawPtr<WebGLTexture> getWebGLTexture() const; 109 PassRefPtrWillBeRawPtr<WebGLTexture> getWebGLTexture() const;
113 PassRefPtr<Uint8Array> getWebGLUnsignedByteArray() const; 110 PassRefPtr<DOMUint8Array> getWebGLUnsignedByteArray() const;
114 PassRefPtr<Uint32Array> getWebGLUnsignedIntArray() const; 111 PassRefPtr<DOMUint32Array> getWebGLUnsignedIntArray() const;
115 PassRefPtrWillBeRawPtr<WebGLVertexArrayObjectOES> getWebGLVertexArrayObjectO ES() const; 112 PassRefPtrWillBeRawPtr<WebGLVertexArrayObjectOES> getWebGLVertexArrayObjectO ES() const;
116 113
117 private: 114 private:
118 Type m_type; 115 Type m_type;
119 bool m_bool; 116 bool m_bool;
120 Vector<bool> m_boolArray; 117 Vector<bool> m_boolArray;
121 float m_float; 118 float m_float;
122 int m_int; 119 int m_int;
123 String m_string; 120 String m_string;
124 unsigned m_unsignedInt; 121 unsigned m_unsignedInt;
125 RefPtrWillBeMember<WebGLBuffer> m_webglBuffer; 122 RefPtrWillBeMember<WebGLBuffer> m_webglBuffer;
126 RefPtr<Float32Array> m_webglFloatArray; 123 RefPtr<DOMFloat32Array> m_webglFloatArray;
127 RefPtrWillBeMember<WebGLFramebuffer> m_webglFramebuffer; 124 RefPtrWillBeMember<WebGLFramebuffer> m_webglFramebuffer;
128 RefPtr<Int32Array> m_webglIntArray; 125 RefPtr<DOMInt32Array> m_webglIntArray;
129 // FIXME: implement WebGLObjectArray 126 // FIXME: implement WebGLObjectArray
130 // RefPtr<WebGLObjectArray> m_webglObjectArray; 127 // RefPtr<WebGLObjectArray> m_webglObjectArray;
131 RefPtrWillBeMember<WebGLProgram> m_webglProgram; 128 RefPtrWillBeMember<WebGLProgram> m_webglProgram;
132 RefPtrWillBeMember<WebGLRenderbuffer> m_webglRenderbuffer; 129 RefPtrWillBeMember<WebGLRenderbuffer> m_webglRenderbuffer;
133 RefPtrWillBeMember<WebGLTexture> m_webglTexture; 130 RefPtrWillBeMember<WebGLTexture> m_webglTexture;
134 RefPtr<Uint8Array> m_webglUnsignedByteArray; 131 RefPtr<DOMUint8Array> m_webglUnsignedByteArray;
135 RefPtr<Uint32Array> m_webglUnsignedIntArray; 132 RefPtr<DOMUint32Array> m_webglUnsignedIntArray;
136 RefPtrWillBeMember<WebGLVertexArrayObjectOES> m_webglVertexArrayObject; 133 RefPtrWillBeMember<WebGLVertexArrayObjectOES> m_webglVertexArrayObject;
137 }; 134 };
138 135
139 } // namespace blink 136 } // namespace blink
140 137
141 #endif // WebGLGetInfo_h 138 #endif // WebGLGetInfo_h
OLDNEW
« no previous file with comments | « Source/core/html/canvas/DataView.idl ('k') | Source/core/html/canvas/WebGLGetInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698