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

Side by Side Diff: third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp

Issue 2392313004: [wrapper-tracing] Add tracing to WebGLRenderingContextBase and friends (Closed)
Patch Set: Add WebGL2RenderingContextBase Created 4 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
OLDNEW
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/WebGL2RenderingContextBase.h" 5 #include "modules/webgl/WebGL2RenderingContextBase.h"
6 6
7 #include "bindings/modules/v8/WebGLAny.h" 7 #include "bindings/modules/v8/WebGLAny.h"
8 #include "core/frame/ImageBitmap.h" 8 #include "core/frame/ImageBitmap.h"
9 #include "core/html/HTMLCanvasElement.h" 9 #include "core/html/HTMLCanvasElement.h"
10 #include "core/html/HTMLImageElement.h" 10 #include "core/html/HTMLImageElement.h"
(...skipping 4243 matching lines...) Expand 10 before | Expand all | Expand 10 after
4254 visitor->trace(m_boundTransformFeedbackBuffer); 4254 visitor->trace(m_boundTransformFeedbackBuffer);
4255 visitor->trace(m_boundUniformBuffer); 4255 visitor->trace(m_boundUniformBuffer);
4256 visitor->trace(m_boundIndexedTransformFeedbackBuffers); 4256 visitor->trace(m_boundIndexedTransformFeedbackBuffers);
4257 visitor->trace(m_boundIndexedUniformBuffers); 4257 visitor->trace(m_boundIndexedUniformBuffers);
4258 visitor->trace(m_currentBooleanOcclusionQuery); 4258 visitor->trace(m_currentBooleanOcclusionQuery);
4259 visitor->trace(m_currentTransformFeedbackPrimitivesWrittenQuery); 4259 visitor->trace(m_currentTransformFeedbackPrimitivesWrittenQuery);
4260 visitor->trace(m_samplerUnits); 4260 visitor->trace(m_samplerUnits);
4261 WebGLRenderingContextBase::trace(visitor); 4261 WebGLRenderingContextBase::trace(visitor);
4262 } 4262 }
4263 4263
4264 DEFINE_TRACE_WRAPPERS(WebGL2RenderingContextBase) {
Ken Russell (switch to Gerrit) 2016/10/06 19:05:14 It's unfortunate that basically exactly the same c
Michael Lippautz 2016/10/06 19:58:13 It's exactly the code because all members here (an
Ken Russell (switch to Gerrit) 2016/10/07 03:01:50 OK -- sounds fine.
haraken 2016/10/07 04:48:49 Yeah, in general, things traced by traceWrapper()s
4265 if (isContextLost()) {
4266 return;
4267 }
4268
4269 visitor->traceWrappers(m_transformFeedbackBinding);
4270 visitor->traceWrappers(m_readFramebufferBinding);
4271 visitor->traceWrappers(m_boundCopyReadBuffer);
4272 visitor->traceWrappers(m_boundCopyWriteBuffer);
4273 visitor->traceWrappers(m_boundPixelPackBuffer);
4274 visitor->traceWrappers(m_boundPixelUnpackBuffer);
4275 visitor->traceWrappers(m_boundTransformFeedbackBuffer);
4276 visitor->traceWrappers(m_boundUniformBuffer);
4277 for (auto& buf : m_boundIndexedTransformFeedbackBuffers) {
4278 visitor->traceWrappers(buf);
Ken Russell (switch to Gerrit) 2016/10/06 19:05:14 The tracing of the HeapVectors is different from t
Michael Lippautz 2016/10/06 19:58:13 Regular Oilpan tracing is integrated into HeapVect
4279 }
4280 for (auto& buf : m_boundIndexedUniformBuffers) {
4281 visitor->traceWrappers(buf);
4282 }
4283 visitor->traceWrappers(m_currentBooleanOcclusionQuery);
4284 visitor->traceWrappers(m_currentTransformFeedbackPrimitivesWrittenQuery);
4285 for (auto& unit : m_samplerUnits) {
4286 visitor->traceWrappers(unit);
4287 }
4288 WebGLRenderingContextBase::traceWrappers(visitor);
4289 }
4290
4264 WebGLTexture* WebGL2RenderingContextBase::validateTexture3DBinding( 4291 WebGLTexture* WebGL2RenderingContextBase::validateTexture3DBinding(
4265 const char* functionName, 4292 const char* functionName,
4266 GLenum target) { 4293 GLenum target) {
4267 WebGLTexture* tex = nullptr; 4294 WebGLTexture* tex = nullptr;
4268 switch (target) { 4295 switch (target) {
4269 case GL_TEXTURE_2D_ARRAY: 4296 case GL_TEXTURE_2D_ARRAY:
4270 tex = m_textureUnits[m_activeTextureUnit].m_texture2DArrayBinding.get(); 4297 tex = m_textureUnits[m_activeTextureUnit].m_texture2DArrayBinding.get();
4271 break; 4298 break;
4272 case GL_TEXTURE_3D: 4299 case GL_TEXTURE_3D:
4273 tex = m_textureUnits[m_activeTextureUnit].m_texture3DBinding.get(); 4300 tex = m_textureUnits[m_activeTextureUnit].m_texture3DBinding.get();
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
4475 params.skipPixels = m_unpackSkipPixels; 4502 params.skipPixels = m_unpackSkipPixels;
4476 params.skipRows = m_unpackSkipRows; 4503 params.skipRows = m_unpackSkipRows;
4477 if (dimension == Tex3D) { 4504 if (dimension == Tex3D) {
4478 params.imageHeight = m_unpackImageHeight; 4505 params.imageHeight = m_unpackImageHeight;
4479 params.skipImages = m_unpackSkipImages; 4506 params.skipImages = m_unpackSkipImages;
4480 } 4507 }
4481 return params; 4508 return params;
4482 } 4509 }
4483 4510
4484 } // namespace blink 4511 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698