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

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 10382213: Defer CGLFlushDrawable until OSX-requested drawRect to avoid spinning when window is obscured. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test compile Created 8 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_mac.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "content/browser/renderer_host/render_widget_host_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 repaint_start_time_ = TimeTicks::Now(); 608 repaint_start_time_ = TimeTicks::Now();
609 repaint_ack_pending_ = true; 609 repaint_ack_pending_ = true;
610 Send(new ViewMsg_Repaint(routing_id_, view_size)); 610 Send(new ViewMsg_Repaint(routing_id_, view_size));
611 } 611 }
612 612
613 TimeDelta max_delay = TimeDelta::FromMilliseconds(kPaintMsgTimeoutMS); 613 TimeDelta max_delay = TimeDelta::FromMilliseconds(kPaintMsgTimeoutMS);
614 TimeTicks end_time = TimeTicks::Now() + max_delay; 614 TimeTicks end_time = TimeTicks::Now() + max_delay;
615 do { 615 do {
616 TRACE_EVENT0("renderer_host", "GetBackingStore::WaitForUpdate"); 616 TRACE_EVENT0("renderer_host", "GetBackingStore::WaitForUpdate");
617 617
618 #if defined(OS_MACOSX)
619 view_->AboutToWaitForBackingStoreMsg();
620 #endif
621
618 // When we have asked the RenderWidget to resize, and we are still waiting 622 // When we have asked the RenderWidget to resize, and we are still waiting
619 // on a response, block for a little while to see if we can't get a response 623 // on a response, block for a little while to see if we can't get a response
620 // before returning the old (incorrectly sized) backing store. 624 // before returning the old (incorrectly sized) backing store.
621 IPC::Message msg; 625 IPC::Message msg;
622 if (process_->WaitForBackingStoreMsg(routing_id_, max_delay, &msg)) { 626 if (process_->WaitForBackingStoreMsg(routing_id_, max_delay, &msg)) {
623 OnMessageReceived(msg); 627 OnMessageReceived(msg);
624 628
625 // For auto-resized views, current_size_ determines the view_size and it 629 // For auto-resized views, current_size_ determines the view_size and it
626 // may have changed during the handling of an UpdateRect message. 630 // may have changed during the handling of an UpdateRect message.
627 if (should_auto_resize_) 631 if (should_auto_resize_)
(...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after
1778 // indicate that no callback is in progress (i.e. without this line 1782 // indicate that no callback is in progress (i.e. without this line
1779 // DelayedAutoResized will not get called again). 1783 // DelayedAutoResized will not get called again).
1780 new_auto_size_.SetSize(0, 0); 1784 new_auto_size_.SetSize(0, 0);
1781 if (!should_auto_resize_) 1785 if (!should_auto_resize_)
1782 return; 1786 return;
1783 1787
1784 OnRenderAutoResized(new_size); 1788 OnRenderAutoResized(new_size);
1785 } 1789 }
1786 1790
1787 } // namespace content 1791 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698