| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1146 } | 1146 } |
| 1147 doComposite(); | 1147 doComposite(); |
| 1148 | 1148 |
| 1149 // Finish if requested. | 1149 // Finish if requested. |
| 1150 if (finish) | 1150 if (finish) |
| 1151 m_layerRenderer->finish(); | 1151 m_layerRenderer->finish(); |
| 1152 | 1152 |
| 1153 // Put result onscreen. | 1153 // Put result onscreen. |
| 1154 m_layerRenderer->present(); | 1154 m_layerRenderer->present(); |
| 1155 | 1155 |
| 1156 GraphicsContext3D* context = m_layerRenderer->context(); | 1156 if (m_layerRenderer->isCompositorContextLost()) { |
| 1157 if (context->getExtensions()->getGraphicsResetStatusARB() != GraphicsContext
3D::NO_ERROR) { | |
| 1158 // Trying to recover the context right here will not work if GPU process | 1157 // Trying to recover the context right here will not work if GPU process |
| 1159 // died. This is because GpuChannelHost::OnErrorMessage will only be | 1158 // died. This is because GpuChannelHost::OnErrorMessage will only be |
| 1160 // called at the next iteration of the message loop, reverting our | 1159 // called at the next iteration of the message loop, reverting our |
| 1161 // recovery attempts here. Instead, we detach the root layer from the | 1160 // recovery attempts here. Instead, we detach the root layer from the |
| 1162 // renderer, recreate the renderer at the next message loop iteration | 1161 // renderer, recreate the renderer at the next message loop iteration |
| 1163 // and request a repaint yet again. | 1162 // and request a repaint yet again. |
| 1164 m_recreatingGraphicsContext = true; | 1163 m_recreatingGraphicsContext = true; |
| 1165 setRootLayerNeedsDisplay(); | 1164 setRootLayerNeedsDisplay(); |
| 1166 } | 1165 } |
| 1167 #endif | 1166 #endif |
| (...skipping 1415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2583 return; | 2582 return; |
| 2584 | 2583 |
| 2585 ASSERT(visibilityState == WebPageVisibilityStateVisible | 2584 ASSERT(visibilityState == WebPageVisibilityStateVisible |
| 2586 || visibilityState == WebPageVisibilityStateHidden | 2585 || visibilityState == WebPageVisibilityStateHidden |
| 2587 || visibilityState == WebPageVisibilityStatePrerender); | 2586 || visibilityState == WebPageVisibilityStatePrerender); |
| 2588 m_page->setVisibilityState(static_cast<PageVisibilityState>(static_cast<int>
(visibilityState)), isInitialState); | 2587 m_page->setVisibilityState(static_cast<PageVisibilityState>(static_cast<int>
(visibilityState)), isInitialState); |
| 2589 #endif | 2588 #endif |
| 2590 } | 2589 } |
| 2591 | 2590 |
| 2592 } // namespace WebKit | 2591 } // namespace WebKit |
| OLD | NEW |