summaryrefslogtreecommitdiffstats
path: root/content/browser/renderer_host/render_widget_host_impl.cc
diff options
context:
space:
mode:
authorjbates@chromium.org <jbates@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-22 19:32:42 +0000
committerjbates@chromium.org <jbates@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-22 19:32:42 +0000
commit89afd64a7c5ac55993f4d7ffb5114f5887b66df7 (patch)
tree0948589b1c28c19fe638e1ee706b23f52bf595db /content/browser/renderer_host/render_widget_host_impl.cc
parenta450b6be42ae40c647c24b08fca1ee5851cc040f (diff)
downloadchromium_src-89afd64a7c5ac55993f4d7ffb5114f5887b66df7.zip
chromium_src-89afd64a7c5ac55993f4d7ffb5114f5887b66df7.tar.gz
chromium_src-89afd64a7c5ac55993f4d7ffb5114f5887b66df7.tar.bz2
Defer CGLFlushDrawable until OSX-requested drawRect to avoid spinning when window is obscured.
Sadly, this fix regresses some black flashing bugs: -flicker-test2.html occasionally flashes while resizing the window. I think this regression could be fixed if we always draw with the OpenGL context once the context is created. But that would be a third drawing path and some significant code, so let's consider it in a follow up. BUG=127709 TEST=open https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/demos/google/particles/index.html ; open Activity Monitor and observe the chrome process CPU usage ; resize chrome window so it's smaller than the Activity Monitor window (or increase size of Activity Monitor); move Activity Monitor on top of chrome window to fully obscure it ; verify that the CPU usage of chrome does not spike upwards while the chrome window is obscured. Review URL: https://chromiumcodereview.appspot.com/10382213 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138327 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/renderer_host/render_widget_host_impl.cc')
-rw-r--r--content/browser/renderer_host/render_widget_host_impl.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 6c4a78e..2ffb094 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -615,6 +615,10 @@ BackingStore* RenderWidgetHostImpl::GetBackingStore(bool force_create) {
do {
TRACE_EVENT0("renderer_host", "GetBackingStore::WaitForUpdate");
+#if defined(OS_MACOSX)
+ view_->AboutToWaitForBackingStoreMsg();
+#endif
+
// When we have asked the RenderWidget to resize, and we are still waiting
// on a response, block for a little while to see if we can't get a response
// before returning the old (incorrectly sized) backing store.