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

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

Issue 1974713003: Speed up fix for expando-loss conformance test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add V8CopyablePersistent alias to avoid incorrect usage. Created 4 years, 7 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 case GL_FRAGMENT_SHADER: 140 case GL_FRAGMENT_SHADER:
141 if (m_fragmentShader != shader) 141 if (m_fragmentShader != shader)
142 return false; 142 return false;
143 m_fragmentShader = nullptr; 143 m_fragmentShader = nullptr;
144 return true; 144 return true;
145 default: 145 default:
146 return false; 146 return false;
147 } 147 }
148 } 148 }
149 149
150 V8CopyablePersistent<v8::Array>* WebGLProgram::getPersistentCache()
151 {
152 return &m_shaderWrappers;
153 }
154
150 void WebGLProgram::cacheInfoIfNeeded(WebGLRenderingContextBase* context) 155 void WebGLProgram::cacheInfoIfNeeded(WebGLRenderingContextBase* context)
151 { 156 {
152 if (m_infoValid) 157 if (m_infoValid)
153 return; 158 return;
154 if (!m_object) 159 if (!m_object)
155 return; 160 return;
156 gpu::gles2::GLES2Interface* gl = context->contextGL(); 161 gpu::gles2::GLES2Interface* gl = context->contextGL();
157 m_linkStatus = 0; 162 m_linkStatus = 0;
158 gl->GetProgramiv(m_object, GL_LINK_STATUS, &m_linkStatus); 163 gl->GetProgramiv(m_object, GL_LINK_STATUS, &m_linkStatus);
159 m_infoValid = true; 164 m_infoValid = true;
160 } 165 }
161 166
162 DEFINE_TRACE(WebGLProgram) 167 DEFINE_TRACE(WebGLProgram)
163 { 168 {
164 visitor->trace(m_vertexShader); 169 visitor->trace(m_vertexShader);
165 visitor->trace(m_fragmentShader); 170 visitor->trace(m_fragmentShader);
166 WebGLSharedPlatform3DObject::trace(visitor); 171 WebGLSharedPlatform3DObject::trace(visitor);
167 } 172 }
168 173
169 } // namespace blink 174 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698