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

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

Issue 2560473005: [wrapper-tracing] WebGLRenderingContextBase: Fix wrapper tracing (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | no next file » | 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 * 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 7658 matching lines...) Expand 10 before | Expand all | Expand 10 after
7669 visitor->trace(m_boundVertexArrayObject); 7669 visitor->trace(m_boundVertexArrayObject);
7670 visitor->trace(m_currentProgram); 7670 visitor->trace(m_currentProgram);
7671 visitor->trace(m_framebufferBinding); 7671 visitor->trace(m_framebufferBinding);
7672 visitor->trace(m_renderbufferBinding); 7672 visitor->trace(m_renderbufferBinding);
7673 visitor->trace(m_textureUnits); 7673 visitor->trace(m_textureUnits);
7674 visitor->trace(m_extensions); 7674 visitor->trace(m_extensions);
7675 CanvasRenderingContext::trace(visitor); 7675 CanvasRenderingContext::trace(visitor);
7676 } 7676 }
7677 7677
7678 DEFINE_TRACE_WRAPPERS(WebGLRenderingContextBase) { 7678 DEFINE_TRACE_WRAPPERS(WebGLRenderingContextBase) {
7679 if (isContextLost()) { 7679 visitor->traceWrappers(m_contextGroup);
Michael Lippautz 2016/12/07 08:36:11 I need some help with proper semantics here: It is
Michael Lippautz 2016/12/07 08:36:11 The context group is TraceWrapperBase which indica
haraken 2016/12/07 09:06:29 kbr@: Would you help me understand why we need to
Ken Russell (switch to Gerrit) 2016/12/07 09:22:37 WebGLRenderingContextBase strongly owns WebGLConte
7680 return;
7681 }
7682 visitor->traceWrappers(m_boundArrayBuffer); 7680 visitor->traceWrappers(m_boundArrayBuffer);
7683 visitor->traceWrappers(m_renderbufferBinding); 7681 visitor->traceWrappers(m_renderbufferBinding);
7684 visitor->traceWrappers(m_framebufferBinding); 7682 visitor->traceWrappers(m_framebufferBinding);
7685 visitor->traceWrappers(m_currentProgram); 7683 visitor->traceWrappers(m_currentProgram);
7686 visitor->traceWrappers(m_boundVertexArrayObject); 7684 visitor->traceWrappers(m_boundVertexArrayObject);
7687 // Trace wrappers explicitly here since TextureUnitState is not a heap 7685 // Trace wrappers explicitly here since TextureUnitState is not a heap
7688 // object, i.e., we cannot set its mark bits. 7686 // object, i.e., we cannot set its mark bits.
7689 for (auto& unit : m_textureUnits) { 7687 for (auto& unit : m_textureUnits) {
7690 visitor->traceWrappers(unit.m_texture2DBinding); 7688 visitor->traceWrappers(unit.m_texture2DBinding);
7691 visitor->traceWrappers(unit.m_textureCubeMapBinding); 7689 visitor->traceWrappers(unit.m_textureCubeMapBinding);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
7743 7741
7744 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas( 7742 void WebGLRenderingContextBase::getHTMLOrOffscreenCanvas(
7745 HTMLCanvasElementOrOffscreenCanvas& result) const { 7743 HTMLCanvasElementOrOffscreenCanvas& result) const {
7746 if (canvas()) 7744 if (canvas())
7747 result.setHTMLCanvasElement(canvas()); 7745 result.setHTMLCanvasElement(canvas());
7748 else 7746 else
7749 result.setOffscreenCanvas(getOffscreenCanvas()); 7747 result.setOffscreenCanvas(getOffscreenCanvas());
7750 } 7748 }
7751 7749
7752 } // namespace blink 7750 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698