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