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

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

Issue 2863503002: Do not log Display Compositor latency component twice. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « content/browser/renderer_host/input/render_widget_host_latency_tracker.cc ('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 // 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 8
9 #include <set> 9 #include <set>
10 #include <tuple> 10 #include <tuple>
(...skipping 2552 matching lines...) Expand 10 before | Expand all | Expand 10 after
2563 2563
2564 last_local_surface_id_ = local_surface_id; 2564 last_local_surface_id_ = local_surface_id;
2565 last_frame_size_ = frame_size; 2565 last_frame_size_ = frame_size;
2566 last_device_scale_factor_ = device_scale_factor; 2566 last_device_scale_factor_ = device_scale_factor;
2567 2567
2568 last_received_content_source_id_ = frame.metadata.content_source_id; 2568 last_received_content_source_id_ = frame.metadata.content_source_id;
2569 2569
2570 // |has_damage| is not transmitted. 2570 // |has_damage| is not transmitted.
2571 frame.metadata.begin_frame_ack.has_damage = true; 2571 frame.metadata.begin_frame_ack.has_damage = true;
2572 2572
2573 if (!ui::LatencyInfo::Verify(frame.metadata.latency_info,
2574 "RenderWidgetHostImpl::OnSwapCompositorFrame")) {
2575 std::vector<ui::LatencyInfo>().swap(frame.metadata.latency_info);
2576 }
2577
2578 last_frame_metadata_ = frame.metadata.Clone(); 2573 last_frame_metadata_ = frame.metadata.Clone();
2579 2574
2580 latency_tracker_.OnSwapCompositorFrame(&frame.metadata.latency_info); 2575 latency_tracker_.OnSwapCompositorFrame(&frame.metadata.latency_info);
2581 2576
2582 bool is_mobile_optimized = IsMobileOptimizedFrame(frame.metadata); 2577 bool is_mobile_optimized = IsMobileOptimizedFrame(frame.metadata);
2583 input_router_->NotifySiteIsMobileOptimized(is_mobile_optimized); 2578 input_router_->NotifySiteIsMobileOptimized(is_mobile_optimized);
2584 if (touch_emulator_) 2579 if (touch_emulator_)
2585 touch_emulator_->SetDoubleTapSupportForPageEnabled(!is_mobile_optimized); 2580 touch_emulator_->SetDoubleTapSupportForPageEnabled(!is_mobile_optimized);
2586 2581
2587 // Ignore this frame if its content has already been unloaded. Source ID 2582 // Ignore this frame if its content has already been unloaded. Source ID
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
2635 RenderProcessHost* rph = GetProcess(); 2630 RenderProcessHost* rph = GetProcess();
2636 for (std::vector<IPC::Message>::const_iterator i = messages.begin(); 2631 for (std::vector<IPC::Message>::const_iterator i = messages.begin();
2637 i != messages.end(); ++i) { 2632 i != messages.end(); ++i) {
2638 rph->OnMessageReceived(*i); 2633 rph->OnMessageReceived(*i);
2639 if (i->dispatch_error()) 2634 if (i->dispatch_error())
2640 rph->OnBadMessageReceived(*i); 2635 rph->OnBadMessageReceived(*i);
2641 } 2636 }
2642 } 2637 }
2643 2638
2644 } // namespace content 2639 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/input/render_widget_host_latency_tracker.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698