| 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 2387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2398 } | 2398 } |
| 2399 if (equalIgnoringCase(name, "WEBGL_lose_context") | 2399 if (equalIgnoringCase(name, "WEBGL_lose_context") |
| 2400 // FIXME: remove this after a certain grace period. | 2400 // FIXME: remove this after a certain grace period. |
| 2401 || equalIgnoringCase(name, "WEBKIT_WEBGL_lose_context") | 2401 || equalIgnoringCase(name, "WEBKIT_WEBGL_lose_context") |
| 2402 // FIXME: Is it safe to remove WEBKIT_lose_context now? | 2402 // FIXME: Is it safe to remove WEBKIT_lose_context now? |
| 2403 || equalIgnoringCase(name, "WEBKIT_lose_context")) { | 2403 || equalIgnoringCase(name, "WEBKIT_lose_context")) { |
| 2404 if (!m_webglLoseContext) | 2404 if (!m_webglLoseContext) |
| 2405 m_webglLoseContext = WebGLLoseContext::create(this); | 2405 m_webglLoseContext = WebGLLoseContext::create(this); |
| 2406 return m_webglLoseContext.get(); | 2406 return m_webglLoseContext.get(); |
| 2407 } | 2407 } |
| 2408 if (equalIgnoringCase(name, "WEBGL_compressed_texture_s3tc") | 2408 if ((equalIgnoringCase(name, "WEBGL_compressed_texture_s3tc") |
| 2409 // FIXME: remove this after a certain grace period. | 2409 // FIXME: remove this after a certain grace period. |
| 2410 || equalIgnoringCase(name, "WEBKIT_WEBGL_compressed_texture_s3tc")) { | 2410 || equalIgnoringCase(name, "WEBKIT_WEBGL_compressed_texture_s3tc")) |
| 2411 && WebGLCompressedTextureS3TC::supported(this)) { |
| 2411 if (!m_webglCompressedTextureS3TC) | 2412 if (!m_webglCompressedTextureS3TC) |
| 2412 m_webglCompressedTextureS3TC = WebGLCompressedTextureS3TC::create(th
is); | 2413 m_webglCompressedTextureS3TC = WebGLCompressedTextureS3TC::create(th
is); |
| 2413 return m_webglCompressedTextureS3TC.get(); | 2414 return m_webglCompressedTextureS3TC.get(); |
| 2414 } | 2415 } |
| 2415 if ((equalIgnoringCase(name, "WEBGL_depth_texture") | 2416 if ((equalIgnoringCase(name, "WEBGL_depth_texture") |
| 2416 // FIXME: remove this after a certain grace period. | 2417 // FIXME: remove this after a certain grace period. |
| 2417 || equalIgnoringCase(name, "WEBKIT_WEBGL_depth_texture")) | 2418 || equalIgnoringCase(name, "WEBKIT_WEBGL_depth_texture")) |
| 2418 && WebGLDepthTexture::supported(graphicsContext3D())) { | 2419 && WebGLDepthTexture::supported(graphicsContext3D())) { |
| 2419 if (!m_webglDepthTexture) { | 2420 if (!m_webglDepthTexture) { |
| 2420 m_context->getExtensions()->ensureEnabled("GL_CHROMIUM_depth_texture
"); | 2421 m_context->getExtensions()->ensureEnabled("GL_CHROMIUM_depth_texture
"); |
| (...skipping 3413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5834 | 5835 |
| 5835 IntSize WebGLRenderingContext::clampedCanvasSize() | 5836 IntSize WebGLRenderingContext::clampedCanvasSize() |
| 5836 { | 5837 { |
| 5837 return IntSize(clamp(canvas()->width(), 1, m_maxViewportDims[0]), | 5838 return IntSize(clamp(canvas()->width(), 1, m_maxViewportDims[0]), |
| 5838 clamp(canvas()->height(), 1, m_maxViewportDims[1])); | 5839 clamp(canvas()->height(), 1, m_maxViewportDims[1])); |
| 5839 } | 5840 } |
| 5840 | 5841 |
| 5841 } // namespace WebCore | 5842 } // namespace WebCore |
| 5842 | 5843 |
| 5843 #endif // ENABLE(WEBGL) | 5844 #endif // ENABLE(WEBGL) |
| OLD | NEW |