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 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
690 // release all extensions | 690 // release all extensions |
691 for (size_t i = 0; i < m_extensions.size(); ++i) | 691 for (size_t i = 0; i < m_extensions.size(); ++i) |
692 delete m_extensions[i]; | 692 delete m_extensions[i]; |
693 | 693 |
694 // Context must be removed from the group prior to the destruction of the | 694 // Context must be removed from the group prior to the destruction of the |
695 // WebGraphicsContext3D, otherwise shared objects may not be properly delete
d. | 695 // WebGraphicsContext3D, otherwise shared objects may not be properly delete
d. |
696 m_contextGroup->removeContext(this); | 696 m_contextGroup->removeContext(this); |
697 | 697 |
698 destroyContext(); | 698 destroyContext(); |
699 | 699 |
| 700 #if !ENABLE(OILPAN) |
700 if (m_multisamplingObserverRegistered) { | 701 if (m_multisamplingObserverRegistered) { |
701 Page* page = canvas()->document().page(); | 702 Page* page = canvas()->document().page(); |
702 if (page) | 703 if (page) |
703 page->removeMultisamplingChangedObserver(this); | 704 page->removeMultisamplingChangedObserver(this); |
704 } | 705 } |
| 706 #endif |
705 | 707 |
706 willDestroyContext(this); | 708 willDestroyContext(this); |
707 } | 709 } |
708 | 710 |
709 void WebGLRenderingContextBase::destroyContext() | 711 void WebGLRenderingContextBase::destroyContext() |
710 { | 712 { |
711 m_contextLost = true; | 713 m_contextLost = true; |
712 | 714 |
713 if (!m_drawingBuffer) | 715 if (!m_drawingBuffer) |
714 return; | 716 return; |
(...skipping 4875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5590 if (m_textureUnits[i].m_texture2DBinding | 5592 if (m_textureUnits[i].m_texture2DBinding |
5591 || m_textureUnits[i].m_textureCubeMapBinding) { | 5593 || m_textureUnits[i].m_textureCubeMapBinding) { |
5592 m_onePlusMaxNonDefaultTextureUnit = i + 1; | 5594 m_onePlusMaxNonDefaultTextureUnit = i + 1; |
5593 return; | 5595 return; |
5594 } | 5596 } |
5595 } | 5597 } |
5596 m_onePlusMaxNonDefaultTextureUnit = 0; | 5598 m_onePlusMaxNonDefaultTextureUnit = 0; |
5597 } | 5599 } |
5598 | 5600 |
5599 } // namespace WebCore | 5601 } // namespace WebCore |
OLD | NEW |