Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Side by Side Diff: Source/WebKit/chromium/src/WebViewImpl.cpp

Issue 7316012: Merge 90185 - 2011-06-30 John Bates <jbates@google.com> (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/782/
Patch Set: Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/WebKit/chromium/ChangeLog ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after
1137 page()->mainFrame()->view()->syncCompositingStateIncludingSubframes(); 1137 page()->mainFrame()->view()->syncCompositingStateIncludingSubframes();
1138 1138
1139 TRACE_EVENT("WebViewImpl::composite", this, 0); 1139 TRACE_EVENT("WebViewImpl::composite", this, 0);
1140 if (m_recreatingGraphicsContext) { 1140 if (m_recreatingGraphicsContext) {
1141 // reallocateRenderer will request a repaint whether or not it succeeded 1141 // reallocateRenderer will request a repaint whether or not it succeeded
1142 // in creating a new context. 1142 // in creating a new context.
1143 reallocateRenderer(); 1143 reallocateRenderer();
1144 m_recreatingGraphicsContext = false; 1144 m_recreatingGraphicsContext = false;
1145 return; 1145 return;
1146 } 1146 }
1147 doComposite();
1148 1147
1149 // Finish if requested. 1148 // Do not composite if the compositor context is already lost.
1150 if (finish) 1149 if (!m_layerRenderer->isCompositorContextLost()) {
1151 m_layerRenderer->finish(); 1150 doComposite();
1152 1151
1153 // Put result onscreen. 1152 // Finish if requested.
1154 m_layerRenderer->present(); 1153 if (finish)
1154 m_layerRenderer->finish();
1155
1156 // Put result onscreen.
1157 m_layerRenderer->present();
1158 }
1155 1159
1156 if (m_layerRenderer->isCompositorContextLost()) { 1160 if (m_layerRenderer->isCompositorContextLost()) {
1157 // Trying to recover the context right here will not work if GPU process 1161 // Trying to recover the context right here will not work if GPU process
1158 // died. This is because GpuChannelHost::OnErrorMessage will only be 1162 // died. This is because GpuChannelHost::OnErrorMessage will only be
1159 // called at the next iteration of the message loop, reverting our 1163 // called at the next iteration of the message loop, reverting our
1160 // recovery attempts here. Instead, we detach the root layer from the 1164 // recovery attempts here. Instead, we detach the root layer from the
1161 // renderer, recreate the renderer at the next message loop iteration 1165 // renderer, recreate the renderer at the next message loop iteration
1162 // and request a repaint yet again. 1166 // and request a repaint yet again.
1163 m_recreatingGraphicsContext = true; 1167 m_recreatingGraphicsContext = true;
1164 setRootLayerNeedsDisplay(); 1168 setRootLayerNeedsDisplay();
(...skipping 1417 matching lines...) Expand 10 before | Expand all | Expand 10 after
2582 return; 2586 return;
2583 2587
2584 ASSERT(visibilityState == WebPageVisibilityStateVisible 2588 ASSERT(visibilityState == WebPageVisibilityStateVisible
2585 || visibilityState == WebPageVisibilityStateHidden 2589 || visibilityState == WebPageVisibilityStateHidden
2586 || visibilityState == WebPageVisibilityStatePrerender); 2590 || visibilityState == WebPageVisibilityStatePrerender);
2587 m_page->setVisibilityState(static_cast<PageVisibilityState>(static_cast<int> (visibilityState)), isInitialState); 2591 m_page->setVisibilityState(static_cast<PageVisibilityState>(static_cast<int> (visibilityState)), isInitialState);
2588 #endif 2592 #endif
2589 } 2593 }
2590 2594
2591 } // namespace WebKit 2595 } // namespace WebKit
OLDNEW
« no previous file with comments | « Source/WebKit/chromium/ChangeLog ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698