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 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
694 // release all extensions | 694 // release all extensions |
695 for (size_t i = 0; i < m_extensions.size(); ++i) | 695 for (size_t i = 0; i < m_extensions.size(); ++i) |
696 delete m_extensions[i]; | 696 delete m_extensions[i]; |
697 | 697 |
698 // Context must be removed from the group prior to the destruction of the | 698 // Context must be removed from the group prior to the destruction of the |
699 // WebGraphicsContext3D, otherwise shared objects may not be properly delete
d. | 699 // WebGraphicsContext3D, otherwise shared objects may not be properly delete
d. |
700 m_contextGroup->removeContext(this); | 700 m_contextGroup->removeContext(this); |
701 | 701 |
702 destroyContext(); | 702 destroyContext(); |
703 | 703 |
| 704 #if !ENABLE(OILPAN) |
704 if (m_multisamplingObserverRegistered) { | 705 if (m_multisamplingObserverRegistered) { |
705 Page* page = canvas()->document().page(); | 706 Page* page = canvas()->document().page(); |
706 if (page) | 707 if (page) |
707 page->removeMultisamplingChangedObserver(this); | 708 page->removeMultisamplingChangedObserver(this); |
708 } | 709 } |
| 710 #endif |
709 | 711 |
710 willDestroyContext(this); | 712 willDestroyContext(this); |
711 } | 713 } |
712 | 714 |
713 void WebGLRenderingContextBase::destroyContext() | 715 void WebGLRenderingContextBase::destroyContext() |
714 { | 716 { |
715 m_contextLost = true; | 717 m_contextLost = true; |
716 | 718 |
717 if (!m_drawingBuffer) | 719 if (!m_drawingBuffer) |
718 return; | 720 return; |
(...skipping 4948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5667 if (m_textureUnits[i].m_texture2DBinding | 5669 if (m_textureUnits[i].m_texture2DBinding |
5668 || m_textureUnits[i].m_textureCubeMapBinding) { | 5670 || m_textureUnits[i].m_textureCubeMapBinding) { |
5669 m_onePlusMaxNonDefaultTextureUnit = i + 1; | 5671 m_onePlusMaxNonDefaultTextureUnit = i + 1; |
5670 return; | 5672 return; |
5671 } | 5673 } |
5672 } | 5674 } |
5673 m_onePlusMaxNonDefaultTextureUnit = 0; | 5675 m_onePlusMaxNonDefaultTextureUnit = 0; |
5674 } | 5676 } |
5675 | 5677 |
5676 } // namespace WebCore | 5678 } // namespace WebCore |
OLD | NEW |