OLD | NEW |
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 2233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2244 | 2244 |
2245 bool WebGLRenderingContextBase::extensionSupportedAndAllowed(const ExtensionTrac
ker* tracker) | 2245 bool WebGLRenderingContextBase::extensionSupportedAndAllowed(const ExtensionTrac
ker* tracker) |
2246 { | 2246 { |
2247 if (tracker->draft() && !RuntimeEnabledFeatures::webGLDraftExtensionsEnabled
()) | 2247 if (tracker->draft() && !RuntimeEnabledFeatures::webGLDraftExtensionsEnabled
()) |
2248 return false; | 2248 return false; |
2249 if (!tracker->supported(this)) | 2249 if (!tracker->supported(this)) |
2250 return false; | 2250 return false; |
2251 return true; | 2251 return true; |
2252 } | 2252 } |
2253 | 2253 |
2254 | |
2255 ScriptValue WebGLRenderingContextBase::getExtension(ScriptState* scriptState, co
nst String& name) | 2254 ScriptValue WebGLRenderingContextBase::getExtension(ScriptState* scriptState, co
nst String& name) |
2256 { | 2255 { |
2257 RefPtrWillBeRawPtr<WebGLExtension> extension; | 2256 RefPtrWillBeRawPtr<WebGLExtension> extension = nullptr; |
2258 | 2257 |
2259 if (!isContextLost()) { | 2258 if (!isContextLost()) { |
2260 for (size_t i = 0; i < m_extensions.size(); ++i) { | 2259 for (size_t i = 0; i < m_extensions.size(); ++i) { |
2261 ExtensionTracker* tracker = m_extensions[i].get(); | 2260 ExtensionTracker* tracker = m_extensions[i].get(); |
2262 if (tracker->matchesNameWithPrefixes(name)) { | 2261 if (tracker->matchesNameWithPrefixes(name)) { |
2263 if (extensionSupportedAndAllowed(tracker)) { | 2262 if (extensionSupportedAndAllowed(tracker)) { |
2264 extension = tracker->getExtension(this); | 2263 extension = tracker->getExtension(this); |
2265 if (extension) | 2264 if (extension) |
2266 m_extensionEnabled[extension->name()] = true; | 2265 m_extensionEnabled[extension->name()] = true; |
2267 } | 2266 } |
(...skipping 3769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6037 return m_sharedWebGraphicsContext3D ? m_sharedWebGraphicsContext3D->drawingB
uffer() : 0; | 6036 return m_sharedWebGraphicsContext3D ? m_sharedWebGraphicsContext3D->drawingB
uffer() : 0; |
6038 } | 6037 } |
6039 #else | 6038 #else |
6040 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const | 6039 DrawingBuffer* WebGLRenderingContextBase::drawingBuffer() const |
6041 { | 6040 { |
6042 return m_drawingBuffer.get(); | 6041 return m_drawingBuffer.get(); |
6043 } | 6042 } |
6044 #endif | 6043 #endif |
6045 | 6044 |
6046 } // namespace blink | 6045 } // namespace blink |
OLD | NEW |