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

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

Issue 2671553003: Remove uses of VisitDOMWrapper (Closed)
Patch Set: Add DependentLifetime when removing Custom=VisitDOMWrapper Created 3 years, 10 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 /* 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 case GL_FRAGMENT_SHADER: 125 case GL_FRAGMENT_SHADER:
126 if (m_fragmentShader != shader) 126 if (m_fragmentShader != shader)
127 return false; 127 return false;
128 m_fragmentShader = nullptr; 128 m_fragmentShader = nullptr;
129 return true; 129 return true;
130 default: 130 default:
131 return false; 131 return false;
132 } 132 }
133 } 133 }
134 134
135 void WebGLProgram::visitChildDOMWrappers(
136 v8::Isolate* isolate,
137 const v8::Persistent<v8::Object>& wrapper) {
138 DOMWrapperWorld::setWrapperReferencesInAllWorlds(wrapper, m_vertexShader,
139 isolate);
140 DOMWrapperWorld::setWrapperReferencesInAllWorlds(wrapper, m_fragmentShader,
141 isolate);
142 }
143
144 void WebGLProgram::cacheInfoIfNeeded(WebGLRenderingContextBase* context) { 135 void WebGLProgram::cacheInfoIfNeeded(WebGLRenderingContextBase* context) {
145 if (m_infoValid) 136 if (m_infoValid)
146 return; 137 return;
147 if (!m_object) 138 if (!m_object)
148 return; 139 return;
149 gpu::gles2::GLES2Interface* gl = context->contextGL(); 140 gpu::gles2::GLES2Interface* gl = context->contextGL();
150 m_linkStatus = 0; 141 m_linkStatus = 0;
151 gl->GetProgramiv(m_object, GL_LINK_STATUS, &m_linkStatus); 142 gl->GetProgramiv(m_object, GL_LINK_STATUS, &m_linkStatus);
152 m_infoValid = true; 143 m_infoValid = true;
153 } 144 }
154 145
155 DEFINE_TRACE(WebGLProgram) { 146 DEFINE_TRACE(WebGLProgram) {
156 visitor->trace(m_vertexShader); 147 visitor->trace(m_vertexShader);
157 visitor->trace(m_fragmentShader); 148 visitor->trace(m_fragmentShader);
158 WebGLSharedPlatform3DObject::trace(visitor); 149 WebGLSharedPlatform3DObject::trace(visitor);
159 } 150 }
160 151
161 DEFINE_TRACE_WRAPPERS(WebGLProgram) { 152 DEFINE_TRACE_WRAPPERS(WebGLProgram) {
162 visitor->traceWrappers(m_vertexShader); 153 visitor->traceWrappers(m_vertexShader);
163 visitor->traceWrappers(m_fragmentShader); 154 visitor->traceWrappers(m_fragmentShader);
164 WebGLSharedPlatform3DObject::traceWrappers(visitor); 155 WebGLSharedPlatform3DObject::traceWrappers(visitor);
165 } 156 }
166 157
167 } // namespace blink 158 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698