| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "modules/webgl/WebGLVertexArrayObjectBase.h" | 5 #include "modules/webgl/WebGLVertexArrayObjectBase.h" |
| 6 | 6 |
| 7 #include "gpu/command_buffer/client/gles2_interface.h" | 7 #include "gpu/command_buffer/client/gles2_interface.h" |
| 8 #include "modules/webgl/WebGLRenderingContextBase.h" | 8 #include "modules/webgl/WebGLRenderingContextBase.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 | 120 |
| 121 for (size_t i = 0; i < m_arrayBufferList.size(); ++i) { | 121 for (size_t i = 0; i < m_arrayBufferList.size(); ++i) { |
| 122 if (m_arrayBufferList[i] == buffer) { | 122 if (m_arrayBufferList[i] == buffer) { |
| 123 m_arrayBufferList[i]->onDetached(context()->contextGL()); | 123 m_arrayBufferList[i]->onDetached(context()->contextGL()); |
| 124 m_arrayBufferList[i] = nullptr; | 124 m_arrayBufferList[i] = nullptr; |
| 125 } | 125 } |
| 126 } | 126 } |
| 127 updateAttribBufferBoundStatus(); | 127 updateAttribBufferBoundStatus(); |
| 128 } | 128 } |
| 129 | 129 |
| 130 void WebGLVertexArrayObjectBase::visitChildDOMWrappers( | |
| 131 v8::Isolate* isolate, | |
| 132 const v8::Persistent<v8::Object>& wrapper) { | |
| 133 DOMWrapperWorld::setWrapperReferencesInAllWorlds( | |
| 134 wrapper, m_boundElementArrayBuffer, isolate); | |
| 135 for (size_t i = 0; i < m_arrayBufferList.size(); ++i) { | |
| 136 DOMWrapperWorld::setWrapperReferencesInAllWorlds( | |
| 137 wrapper, m_arrayBufferList[i], isolate); | |
| 138 } | |
| 139 } | |
| 140 | |
| 141 DEFINE_TRACE(WebGLVertexArrayObjectBase) { | 130 DEFINE_TRACE(WebGLVertexArrayObjectBase) { |
| 142 visitor->trace(m_boundElementArrayBuffer); | 131 visitor->trace(m_boundElementArrayBuffer); |
| 143 visitor->trace(m_arrayBufferList); | 132 visitor->trace(m_arrayBufferList); |
| 144 WebGLContextObject::trace(visitor); | 133 WebGLContextObject::trace(visitor); |
| 145 } | 134 } |
| 146 | 135 |
| 147 DEFINE_TRACE_WRAPPERS(WebGLVertexArrayObjectBase) { | 136 DEFINE_TRACE_WRAPPERS(WebGLVertexArrayObjectBase) { |
| 148 visitor->traceWrappers(m_boundElementArrayBuffer); | 137 visitor->traceWrappers(m_boundElementArrayBuffer); |
| 149 for (size_t i = 0; i < m_arrayBufferList.size(); ++i) { | 138 for (size_t i = 0; i < m_arrayBufferList.size(); ++i) { |
| 150 visitor->traceWrappers(m_arrayBufferList[i]); | 139 visitor->traceWrappers(m_arrayBufferList[i]); |
| 151 } | 140 } |
| 152 WebGLContextObject::traceWrappers(visitor); | 141 WebGLContextObject::traceWrappers(visitor); |
| 153 } | 142 } |
| 154 | 143 |
| 155 } // namespace blink | 144 } // namespace blink |
| OLD | NEW |