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 <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 1346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1357 | 1357 |
1358 // Measures the time from receiving the MsgUpdateRect IPC to completing the | 1358 // Measures the time from receiving the MsgUpdateRect IPC to completing the |
1359 // DidUpdateBackingStore() method. On platforms which have asynchronous | 1359 // DidUpdateBackingStore() method. On platforms which have asynchronous |
1360 // painting, such as Linux, this is the sum of MPArch.RWH_OnMsgUpdateRect, | 1360 // painting, such as Linux, this is the sum of MPArch.RWH_OnMsgUpdateRect, |
1361 // MPArch.RWH_DidUpdateBackingStore, and the time spent asynchronously | 1361 // MPArch.RWH_DidUpdateBackingStore, and the time spent asynchronously |
1362 // waiting for the paint to complete. | 1362 // waiting for the paint to complete. |
1363 // | 1363 // |
1364 // On other platforms, this will be equivalent to MPArch.RWH_OnMsgUpdateRect. | 1364 // On other platforms, this will be equivalent to MPArch.RWH_OnMsgUpdateRect. |
1365 delta = now - paint_start; | 1365 delta = now - paint_start; |
1366 UMA_HISTOGRAM_TIMES("MPArch.RWH_TotalPaintTime", delta); | 1366 UMA_HISTOGRAM_TIMES("MPArch.RWH_TotalPaintTime", delta); |
| 1367 UNSHIPPED_TRACE_EVENT_INSTANT1("test_latency", "UpdateRectComplete", |
| 1368 "x+y", params.bitmap_rect.x() + params.bitmap_rect.y()); |
1367 } | 1369 } |
1368 | 1370 |
1369 void RenderWidgetHostImpl::OnMsgInputEventAck(WebInputEvent::Type event_type, | 1371 void RenderWidgetHostImpl::OnMsgInputEventAck(WebInputEvent::Type event_type, |
1370 bool processed) { | 1372 bool processed) { |
1371 TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::OnMsgInputEventAck"); | 1373 TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::OnMsgInputEventAck"); |
1372 | 1374 |
1373 // Log the time delta for processing an input event. | 1375 // Log the time delta for processing an input event. |
1374 TimeDelta delta = TimeTicks::Now() - input_event_start_time_; | 1376 TimeDelta delta = TimeTicks::Now() - input_event_start_time_; |
1375 UMA_HISTOGRAM_TIMES("MPArch.RWH_InputEventDelta", delta); | 1377 UMA_HISTOGRAM_TIMES("MPArch.RWH_InputEventDelta", delta); |
1376 | 1378 |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1784 // indicate that no callback is in progress (i.e. without this line | 1786 // indicate that no callback is in progress (i.e. without this line |
1785 // DelayedAutoResized will not get called again). | 1787 // DelayedAutoResized will not get called again). |
1786 new_auto_size_.SetSize(0, 0); | 1788 new_auto_size_.SetSize(0, 0); |
1787 if (!should_auto_resize_) | 1789 if (!should_auto_resize_) |
1788 return; | 1790 return; |
1789 | 1791 |
1790 OnRenderAutoResized(new_size); | 1792 OnRenderAutoResized(new_size); |
1791 } | 1793 } |
1792 | 1794 |
1793 } // namespace content | 1795 } // namespace content |
OLD | NEW |