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 1642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1653 void WebGLRenderingContext::deleteShader(WebGLShader* shader) | 1653 void WebGLRenderingContext::deleteShader(WebGLShader* shader) |
1654 { | 1654 { |
1655 deleteObject(shader); | 1655 deleteObject(shader); |
1656 } | 1656 } |
1657 | 1657 |
1658 void WebGLRenderingContext::deleteTexture(WebGLTexture* texture) | 1658 void WebGLRenderingContext::deleteTexture(WebGLTexture* texture) |
1659 { | 1659 { |
1660 if (!deleteObject(texture)) | 1660 if (!deleteObject(texture)) |
1661 return; | 1661 return; |
1662 for (size_t i = 0; i < m_textureUnits.size(); ++i) { | 1662 for (size_t i = 0; i < m_textureUnits.size(); ++i) { |
1663 if (texture == m_textureUnits[i].m_texture2DBinding) | 1663 if (texture == m_textureUnits[i].m_texture2DBinding) { |
1664 m_textureUnits[i].m_texture2DBinding = 0; | 1664 m_textureUnits[i].m_texture2DBinding = 0; |
| 1665 if (!i) |
| 1666 m_drawingBuffer->setTexture2DBinding(0); |
| 1667 } |
1665 if (texture == m_textureUnits[i].m_textureCubeMapBinding) | 1668 if (texture == m_textureUnits[i].m_textureCubeMapBinding) |
1666 m_textureUnits[i].m_textureCubeMapBinding = 0; | 1669 m_textureUnits[i].m_textureCubeMapBinding = 0; |
1667 } | 1670 } |
1668 if (m_framebufferBinding) | 1671 if (m_framebufferBinding) |
1669 m_framebufferBinding->removeAttachmentFromBoundFramebuffer(texture); | 1672 m_framebufferBinding->removeAttachmentFromBoundFramebuffer(texture); |
1670 } | 1673 } |
1671 | 1674 |
1672 void WebGLRenderingContext::depthFunc(GC3Denum func) | 1675 void WebGLRenderingContext::depthFunc(GC3Denum func) |
1673 { | 1676 { |
1674 if (isContextLost()) | 1677 if (isContextLost()) |
(...skipping 3903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5578 | 5581 |
5579 void WebGLRenderingContext::multisamplingChanged(bool enabled) | 5582 void WebGLRenderingContext::multisamplingChanged(bool enabled) |
5580 { | 5583 { |
5581 if (m_multisamplingAllowed != enabled) { | 5584 if (m_multisamplingAllowed != enabled) { |
5582 m_multisamplingAllowed = enabled; | 5585 m_multisamplingAllowed = enabled; |
5583 forceLostContext(WebGLRenderingContext::AutoRecoverSyntheticLostContext)
; | 5586 forceLostContext(WebGLRenderingContext::AutoRecoverSyntheticLostContext)
; |
5584 } | 5587 } |
5585 } | 5588 } |
5586 | 5589 |
5587 } // namespace WebCore | 5590 } // namespace WebCore |
OLD | NEW |