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 2582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2593 | 2593 |
2594 String WebGLRenderingContextBase::getShaderSource(WebGLShader* shader) | 2594 String WebGLRenderingContextBase::getShaderSource(WebGLShader* shader) |
2595 { | 2595 { |
2596 if (isContextLost()) | 2596 if (isContextLost()) |
2597 return String(); | 2597 return String(); |
2598 if (!validateWebGLObject("getShaderSource", shader)) | 2598 if (!validateWebGLObject("getShaderSource", shader)) |
2599 return ""; | 2599 return ""; |
2600 return ensureNotNull(shader->source()); | 2600 return ensureNotNull(shader->source()); |
2601 } | 2601 } |
2602 | 2602 |
2603 Vector<String> WebGLRenderingContextBase::getSupportedExtensions() | 2603 Nullable<Vector<String> > WebGLRenderingContextBase::getSupportedExtensions() |
2604 { | 2604 { |
| 2605 if (isContextLost()) |
| 2606 return Nullable<Vector<String> >(); |
| 2607 |
2605 Vector<String> result; | 2608 Vector<String> result; |
2606 if (isContextLost()) | |
2607 return result; | |
2608 | 2609 |
2609 for (size_t i = 0; i < m_extensions.size(); ++i) { | 2610 for (size_t i = 0; i < m_extensions.size(); ++i) { |
2610 ExtensionTracker* tracker = m_extensions[i]; | 2611 ExtensionTracker* tracker = m_extensions[i]; |
2611 if (extensionSupportedAndAllowed(tracker)) { | 2612 if (extensionSupportedAndAllowed(tracker)) { |
2612 const char* const* prefixes = tracker->prefixes(); | 2613 const char* const* prefixes = tracker->prefixes(); |
2613 for (; *prefixes; ++prefixes) { | 2614 for (; *prefixes; ++prefixes) { |
2614 String prefixedName = String(*prefixes) + tracker->extensionName
(); | 2615 String prefixedName = String(*prefixes) + tracker->extensionName
(); |
2615 result.append(prefixedName); | 2616 result.append(prefixedName); |
2616 } | 2617 } |
2617 } | 2618 } |
(...skipping 3076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5694 if (m_textureUnits[i].m_texture2DBinding | 5695 if (m_textureUnits[i].m_texture2DBinding |
5695 || m_textureUnits[i].m_textureCubeMapBinding) { | 5696 || m_textureUnits[i].m_textureCubeMapBinding) { |
5696 m_onePlusMaxNonDefaultTextureUnit = i + 1; | 5697 m_onePlusMaxNonDefaultTextureUnit = i + 1; |
5697 return; | 5698 return; |
5698 } | 5699 } |
5699 } | 5700 } |
5700 m_onePlusMaxNonDefaultTextureUnit = 0; | 5701 m_onePlusMaxNonDefaultTextureUnit = 0; |
5701 } | 5702 } |
5702 | 5703 |
5703 } // namespace WebCore | 5704 } // namespace WebCore |
OLD | NEW |