| 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 621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 m_multisamplingAllowed = m_drawingBuffer->multisample(); | 632 m_multisamplingAllowed = m_drawingBuffer->multisample(); |
| 633 p->addMultisamplingChangedObserver(this); | 633 p->addMultisamplingChangedObserver(this); |
| 634 m_multisamplingObserverRegistered = true; | 634 m_multisamplingObserverRegistered = true; |
| 635 } | 635 } |
| 636 } | 636 } |
| 637 | 637 |
| 638 m_isGLES2NPOTStrict = !extensionsUtil()->isExtensionEnabled("GL_OES_texture_
npot"); | 638 m_isGLES2NPOTStrict = !extensionsUtil()->isExtensionEnabled("GL_OES_texture_
npot"); |
| 639 m_isDepthStencilSupported = extensionsUtil()->isExtensionEnabled("GL_OES_pac
ked_depth_stencil"); | 639 m_isDepthStencilSupported = extensionsUtil()->isExtensionEnabled("GL_OES_pac
ked_depth_stencil"); |
| 640 } | 640 } |
| 641 | 641 |
| 642 bool WebGLRenderingContextBase::allowPrivilegedExtensions() const | |
| 643 { | |
| 644 if (Page* p = canvas()->document().page()) | |
| 645 return p->settings().privilegedWebGLExtensionsEnabled(); | |
| 646 return false; | |
| 647 } | |
| 648 | |
| 649 bool WebGLRenderingContextBase::allowWebGLDebugRendererInfo() const | |
| 650 { | |
| 651 return true; | |
| 652 } | |
| 653 | |
| 654 void WebGLRenderingContextBase::addCompressedTextureFormat(GLenum format) | 642 void WebGLRenderingContextBase::addCompressedTextureFormat(GLenum format) |
| 655 { | 643 { |
| 656 if (!m_compressedTextureFormats.contains(format)) | 644 if (!m_compressedTextureFormats.contains(format)) |
| 657 m_compressedTextureFormats.append(format); | 645 m_compressedTextureFormats.append(format); |
| 658 } | 646 } |
| 659 | 647 |
| 660 void WebGLRenderingContextBase::removeAllCompressedTextureFormats() | 648 void WebGLRenderingContextBase::removeAllCompressedTextureFormats() |
| 661 { | 649 { |
| 662 m_compressedTextureFormats.clear(); | 650 m_compressedTextureFormats.clear(); |
| 663 } | 651 } |
| (...skipping 1457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2121 String prefixedName = String(*prefixSet) + extensionName(); | 2109 String prefixedName = String(*prefixSet) + extensionName(); |
| 2122 if (equalIgnoringCase(prefixedName, name)) { | 2110 if (equalIgnoringCase(prefixedName, name)) { |
| 2123 return true; | 2111 return true; |
| 2124 } | 2112 } |
| 2125 } | 2113 } |
| 2126 return false; | 2114 return false; |
| 2127 } | 2115 } |
| 2128 | 2116 |
| 2129 bool WebGLRenderingContextBase::extensionSupportedAndAllowed(const ExtensionTrac
ker* tracker) | 2117 bool WebGLRenderingContextBase::extensionSupportedAndAllowed(const ExtensionTrac
ker* tracker) |
| 2130 { | 2118 { |
| 2131 if (tracker->webglDebugRendererInfo() && !allowWebGLDebugRendererInfo()) | |
| 2132 return false; | |
| 2133 if (tracker->privileged() && !allowPrivilegedExtensions()) | |
| 2134 return false; | |
| 2135 if (tracker->draft() && !RuntimeEnabledFeatures::webGLDraftExtensionsEnabled
()) | 2119 if (tracker->draft() && !RuntimeEnabledFeatures::webGLDraftExtensionsEnabled
()) |
| 2136 return false; | 2120 return false; |
| 2137 if (!tracker->supported(this)) | 2121 if (!tracker->supported(this)) |
| 2138 return false; | 2122 return false; |
| 2139 return true; | 2123 return true; |
| 2140 } | 2124 } |
| 2141 | 2125 |
| 2142 | 2126 |
| 2143 PassRefPtr<WebGLExtension> WebGLRenderingContextBase::getExtension(const String&
name) | 2127 PassRefPtr<WebGLExtension> WebGLRenderingContextBase::getExtension(const String&
name) |
| 2144 { | 2128 { |
| (...skipping 3547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5692 if (m_textureUnits[i].m_texture2DBinding | 5676 if (m_textureUnits[i].m_texture2DBinding |
| 5693 || m_textureUnits[i].m_textureCubeMapBinding) { | 5677 || m_textureUnits[i].m_textureCubeMapBinding) { |
| 5694 m_onePlusMaxNonDefaultTextureUnit = i + 1; | 5678 m_onePlusMaxNonDefaultTextureUnit = i + 1; |
| 5695 return; | 5679 return; |
| 5696 } | 5680 } |
| 5697 } | 5681 } |
| 5698 m_onePlusMaxNonDefaultTextureUnit = 0; | 5682 m_onePlusMaxNonDefaultTextureUnit = 0; |
| 5699 } | 5683 } |
| 5700 | 5684 |
| 5701 } // namespace WebCore | 5685 } // namespace WebCore |
| OLD | NEW |