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 27 matching lines...) Expand all Loading... |
38 | 38 |
39 WebGLVertexArrayObjectOES::WebGLVertexArrayObjectOES(WebGLRenderingContextBase*
ctx, VaoType type) | 39 WebGLVertexArrayObjectOES::WebGLVertexArrayObjectOES(WebGLRenderingContextBase*
ctx, VaoType type) |
40 : WebGLContextObject(ctx) | 40 : WebGLContextObject(ctx) |
41 , m_type(type) | 41 , m_type(type) |
42 , m_hasEverBeenBound(false) | 42 , m_hasEverBeenBound(false) |
43 #if ENABLE(OILPAN) | 43 #if ENABLE(OILPAN) |
44 , m_destructionInProgress(false) | 44 , m_destructionInProgress(false) |
45 #endif | 45 #endif |
46 , m_boundElementArrayBuffer(nullptr) | 46 , m_boundElementArrayBuffer(nullptr) |
47 { | 47 { |
48 ScriptWrappable::init(this); | |
49 m_vertexAttribState.resize(ctx->maxVertexAttribs()); | 48 m_vertexAttribState.resize(ctx->maxVertexAttribs()); |
50 | 49 |
51 switch (m_type) { | 50 switch (m_type) { |
52 case VaoTypeDefault: | 51 case VaoTypeDefault: |
53 break; | 52 break; |
54 default: | 53 default: |
55 setObject(context()->webContext()->createVertexArrayOES()); | 54 setObject(context()->webContext()->createVertexArrayOES()); |
56 break; | 55 break; |
57 } | 56 } |
58 } | 57 } |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 } | 167 } |
169 | 168 |
170 void WebGLVertexArrayObjectOES::trace(Visitor* visitor) | 169 void WebGLVertexArrayObjectOES::trace(Visitor* visitor) |
171 { | 170 { |
172 visitor->trace(m_boundElementArrayBuffer); | 171 visitor->trace(m_boundElementArrayBuffer); |
173 visitor->trace(m_vertexAttribState); | 172 visitor->trace(m_vertexAttribState); |
174 WebGLContextObject::trace(visitor); | 173 WebGLContextObject::trace(visitor); |
175 } | 174 } |
176 | 175 |
177 } | 176 } |
OLD | NEW |