OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 17 matching lines...) Expand all Loading... |
28 | 28 |
29 #include "bindings/core/v8/ScriptWrappable.h" | 29 #include "bindings/core/v8/ScriptWrappable.h" |
30 #include "core/html/canvas/WebGLBuffer.h" | 30 #include "core/html/canvas/WebGLBuffer.h" |
31 #include "core/html/canvas/WebGLContextObject.h" | 31 #include "core/html/canvas/WebGLContextObject.h" |
32 #include "platform/heap/Handle.h" | 32 #include "platform/heap/Handle.h" |
33 #include "wtf/PassRefPtr.h" | 33 #include "wtf/PassRefPtr.h" |
34 | 34 |
35 namespace blink { | 35 namespace blink { |
36 | 36 |
37 class WebGLVertexArrayObjectOES FINAL : public WebGLContextObject, public Script
Wrappable { | 37 class WebGLVertexArrayObjectOES FINAL : public WebGLContextObject, public Script
Wrappable { |
| 38 DEFINE_WRAPPERTYPEINFO(); |
38 public: | 39 public: |
39 enum VaoType { | 40 enum VaoType { |
40 VaoTypeDefault, | 41 VaoTypeDefault, |
41 VaoTypeUser, | 42 VaoTypeUser, |
42 }; | 43 }; |
43 | 44 |
44 virtual ~WebGLVertexArrayObjectOES(); | 45 virtual ~WebGLVertexArrayObjectOES(); |
45 | 46 |
46 static PassRefPtrWillBeRawPtr<WebGLVertexArrayObjectOES> create(WebGLRenderi
ngContextBase*, VaoType); | 47 static PassRefPtrWillBeRawPtr<WebGLVertexArrayObjectOES> create(WebGLRenderi
ngContextBase*, VaoType); |
47 | 48 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 #if ENABLE(OILPAN) | 103 #if ENABLE(OILPAN) |
103 bool m_destructionInProgress; | 104 bool m_destructionInProgress; |
104 #endif | 105 #endif |
105 RefPtrWillBeMember<WebGLBuffer> m_boundElementArrayBuffer; | 106 RefPtrWillBeMember<WebGLBuffer> m_boundElementArrayBuffer; |
106 WillBeHeapVector<VertexAttribState> m_vertexAttribState; | 107 WillBeHeapVector<VertexAttribState> m_vertexAttribState; |
107 }; | 108 }; |
108 | 109 |
109 } // namespace blink | 110 } // namespace blink |
110 | 111 |
111 namespace WTF { | 112 namespace WTF { |
| 113 |
112 template<> | 114 template<> |
113 struct VectorTraits<blink::WebGLVertexArrayObjectOES::VertexAttribState> : Simpl
eClassVectorTraits<blink::WebGLVertexArrayObjectOES::VertexAttribState> { | 115 struct VectorTraits<blink::WebGLVertexArrayObjectOES::VertexAttribState> : Simpl
eClassVectorTraits<blink::WebGLVertexArrayObjectOES::VertexAttribState> { |
114 // Specialization needed as the VertexAttribState's struct fields | 116 // Specialization needed as the VertexAttribState's struct fields |
115 // aren't handled as desired by the IsPod() trait. | 117 // aren't handled as desired by the IsPod() trait. |
116 #if ENABLE(OILPAN) | 118 #if ENABLE(OILPAN) |
117 static const bool needsDestruction = false; | 119 static const bool needsDestruction = false; |
118 #endif | 120 #endif |
119 // Must use the constructor. | 121 // Must use the constructor. |
120 static const bool canInitializeWithMemset = false; | 122 static const bool canInitializeWithMemset = false; |
121 static const bool canCopyWithMemcpy = true; | 123 static const bool canCopyWithMemcpy = true; |
122 }; | 124 }; |
123 } | 125 |
| 126 } // namespace WTF |
124 | 127 |
125 #endif // WebGLVertexArrayObjectOES_h | 128 #endif // WebGLVertexArrayObjectOES_h |
OLD | NEW |