OLD | NEW |
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 <math.h> | 7 #include <math.h> |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
830 TRACE_EVENT_ASYNC_BEGIN0( | 830 TRACE_EVENT_ASYNC_BEGIN0( |
831 "renderer_host", "RenderWidgetHostImpl::repaint_ack_pending_", this); | 831 "renderer_host", "RenderWidgetHostImpl::repaint_ack_pending_", this); |
832 Send(new ViewMsg_Repaint(routing_id_, view_size)); | 832 Send(new ViewMsg_Repaint(routing_id_, view_size)); |
833 } | 833 } |
834 | 834 |
835 TimeDelta max_delay = TimeDelta::FromMilliseconds(kPaintMsgTimeoutMS); | 835 TimeDelta max_delay = TimeDelta::FromMilliseconds(kPaintMsgTimeoutMS); |
836 TimeTicks end_time = TimeTicks::Now() + max_delay; | 836 TimeTicks end_time = TimeTicks::Now() + max_delay; |
837 do { | 837 do { |
838 TRACE_EVENT0("renderer_host", "GetBackingStore::WaitForUpdate"); | 838 TRACE_EVENT0("renderer_host", "GetBackingStore::WaitForUpdate"); |
839 | 839 |
840 #if defined(OS_MACOSX) | |
841 view_->AboutToWaitForBackingStoreMsg(); | |
842 #endif | |
843 | |
844 // When we have asked the RenderWidget to resize, and we are still waiting | 840 // When we have asked the RenderWidget to resize, and we are still waiting |
845 // on a response, block for a little while to see if we can't get a response | 841 // on a response, block for a little while to see if we can't get a response |
846 // before returning the old (incorrectly sized) backing store. | 842 // before returning the old (incorrectly sized) backing store. |
847 IPC::Message msg; | 843 IPC::Message msg; |
848 if (process_->WaitForBackingStoreMsg(routing_id_, max_delay, &msg)) { | 844 if (process_->WaitForBackingStoreMsg(routing_id_, max_delay, &msg)) { |
849 OnMessageReceived(msg); | 845 OnMessageReceived(msg); |
850 | 846 |
851 // For auto-resized views, current_size_ determines the view_size and it | 847 // For auto-resized views, current_size_ determines the view_size and it |
852 // may have changed during the handling of an UpdateRect message. | 848 // may have changed during the handling of an UpdateRect message. |
853 if (should_auto_resize_) | 849 if (should_auto_resize_) |
(...skipping 1614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2468 continue; | 2464 continue; |
2469 } | 2465 } |
2470 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(rwh); | 2466 RenderWidgetHostImpl* rwhi = RenderWidgetHostImpl::From(rwh); |
2471 if (rwhi_set.insert(rwhi).second) | 2467 if (rwhi_set.insert(rwhi).second) |
2472 rwhi->FrameSwapped(latency_info); | 2468 rwhi->FrameSwapped(latency_info); |
2473 } | 2469 } |
2474 } | 2470 } |
2475 } | 2471 } |
2476 | 2472 |
2477 } // namespace content | 2473 } // namespace content |
OLD | NEW |