| OLD | NEW |
| 1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 | 5 |
| 6 #include "config.h" | 6 #include "config.h" |
| 7 | 7 |
| 8 #if USE(ACCELERATED_COMPOSITING) | 8 #if USE(ACCELERATED_COMPOSITING) |
| 9 #include "CCRendererGL.h" | 9 #include "CCRendererGL.h" |
| 10 | 10 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 base::SplitString(extensionsString, ' ', &extensionsList); | 97 base::SplitString(extensionsString, ' ', &extensionsList); |
| 98 std::set<string> extensions(extensionsList.begin(), extensionsList.end()); | 98 std::set<string> extensions(extensionsList.begin(), extensionsList.end()); |
| 99 | 99 |
| 100 if (settings().acceleratePainting && extensions.count("GL_EXT_texture_format
_BGRA8888") | 100 if (settings().acceleratePainting && extensions.count("GL_EXT_texture_format
_BGRA8888") |
| 101 && extensions.count("GL_EXT_read_format_bg
ra")) | 101 && extensions.count("GL_EXT_read_format_bg
ra")) |
| 102 m_capabilities.usingAcceleratedPainting = true; | 102 m_capabilities.usingAcceleratedPainting = true; |
| 103 else | 103 else |
| 104 m_capabilities.usingAcceleratedPainting = false; | 104 m_capabilities.usingAcceleratedPainting = false; |
| 105 | 105 |
| 106 | 106 |
| 107 m_capabilities.contextHasCachedFrontBuffer = extensions.count("GL_CHROMIUM_f
ront_buffer_cached"); | |
| 108 | |
| 109 m_capabilities.usingPartialSwap = CCSettings::partialSwapEnabled() && extens
ions.count("GL_CHROMIUM_post_sub_buffer"); | 107 m_capabilities.usingPartialSwap = CCSettings::partialSwapEnabled() && extens
ions.count("GL_CHROMIUM_post_sub_buffer"); |
| 110 | 108 |
| 111 // Use the swapBuffers callback only with the threaded proxy. | 109 // Use the swapBuffers callback only with the threaded proxy. |
| 112 if (CCProxy::hasImplThread()) | 110 if (CCProxy::hasImplThread()) |
| 113 m_capabilities.usingSwapCompleteCallback = extensions.count("GL_CHROMIUM
_swapbuffers_complete_callback"); | 111 m_capabilities.usingSwapCompleteCallback = extensions.count("GL_CHROMIUM
_swapbuffers_complete_callback"); |
| 114 if (m_capabilities.usingSwapCompleteCallback) | 112 if (m_capabilities.usingSwapCompleteCallback) |
| 115 m_context->setSwapBuffersCompleteCallbackCHROMIUM(this); | 113 m_context->setSwapBuffersCompleteCallbackCHROMIUM(this); |
| 116 | 114 |
| 117 m_capabilities.usingSetVisibility = extensions.count("GL_CHROMIUM_set_visibi
lity"); | 115 m_capabilities.usingSetVisibility = extensions.count("GL_CHROMIUM_set_visibi
lity"); |
| 118 | 116 |
| (...skipping 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1507 } | 1505 } |
| 1508 | 1506 |
| 1509 bool CCRendererGL::isContextLost() | 1507 bool CCRendererGL::isContextLost() |
| 1510 { | 1508 { |
| 1511 return (m_context->getGraphicsResetStatusARB() != GraphicsContext3D::NO_ERRO
R); | 1509 return (m_context->getGraphicsResetStatusARB() != GraphicsContext3D::NO_ERRO
R); |
| 1512 } | 1510 } |
| 1513 | 1511 |
| 1514 } // namespace WebCore | 1512 } // namespace WebCore |
| 1515 | 1513 |
| 1516 #endif // USE(ACCELERATED_COMPOSITING) | 1514 #endif // USE(ACCELERATED_COMPOSITING) |
| OLD | NEW |