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

Side by Side Diff: cc/base/latency_info_swap_promise_monitor.cc

Issue 632613002: [C++11 Allowed Features] Declares a type-safe null pointer converting from NULL to nullptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « cc/animation/transform_operations.cc ('k') | cc/base/math_util.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "cc/base/latency_info_swap_promise_monitor.h" 5 #include "cc/base/latency_info_swap_promise_monitor.h"
6 6
7 #include "base/threading/platform_thread.h" 7 #include "base/threading/platform_thread.h"
8 #include "cc/base/latency_info_swap_promise.h" 8 #include "cc/base/latency_info_swap_promise.h"
9 #include "cc/trees/layer_tree_host.h" 9 #include "cc/trees/layer_tree_host.h"
10 #include "cc/trees/layer_tree_host_impl.h" 10 #include "cc/trees/layer_tree_host_impl.h"
11 #include "cc/trees/layer_tree_impl.h" 11 #include "cc/trees/layer_tree_impl.h"
12 12
13 namespace { 13 namespace {
14 14
15 bool AddRenderingScheduledComponent(ui::LatencyInfo* latency_info) { 15 bool AddRenderingScheduledComponent(ui::LatencyInfo* latency_info) {
16 if (latency_info->FindLatency( 16 if (latency_info->FindLatency(
17 ui::INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_COMPONENT, 0, NULL)) 17 ui::INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_COMPONENT, 0, nullptr))
18 return false; 18 return false;
19 latency_info->AddLatencyNumber( 19 latency_info->AddLatencyNumber(
20 ui::INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_COMPONENT, 0, 0); 20 ui::INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_COMPONENT, 0, 0);
21 return true; 21 return true;
22 } 22 }
23 23
24 bool AddForwardingScrollUpdateToMainComponent(ui::LatencyInfo* latency_info) { 24 bool AddForwardingScrollUpdateToMainComponent(ui::LatencyInfo* latency_info) {
25 if (latency_info->FindLatency( 25 if (latency_info->FindLatency(
26 ui::INPUT_EVENT_LATENCY_FORWARD_SCROLL_UPDATE_TO_MAIN_COMPONENT, 26 ui::INPUT_EVENT_LATENCY_FORWARD_SCROLL_UPDATE_TO_MAIN_COMPONENT,
27 0, 27 0,
28 NULL)) 28 nullptr))
29 return false; 29 return false;
30 latency_info->AddLatencyNumber( 30 latency_info->AddLatencyNumber(
31 ui::INPUT_EVENT_LATENCY_FORWARD_SCROLL_UPDATE_TO_MAIN_COMPONENT, 31 ui::INPUT_EVENT_LATENCY_FORWARD_SCROLL_UPDATE_TO_MAIN_COMPONENT,
32 0, 32 0,
33 latency_info->trace_id); 33 latency_info->trace_id);
34 return true; 34 return true;
35 } 35 }
36 36
37 } // namespace 37 } // namespace
38 38
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 *latency_, 88 *latency_,
89 ui::INPUT_EVENT_LATENCY_FORWARD_SCROLL_UPDATE_TO_MAIN_COMPONENT); 89 ui::INPUT_EVENT_LATENCY_FORWARD_SCROLL_UPDATE_TO_MAIN_COMPONENT);
90 scoped_ptr<SwapPromise> swap_promise( 90 scoped_ptr<SwapPromise> swap_promise(
91 new LatencyInfoSwapPromise(new_latency)); 91 new LatencyInfoSwapPromise(new_latency));
92 layer_tree_host_impl_->QueueSwapPromiseForMainThreadScrollUpdate( 92 layer_tree_host_impl_->QueueSwapPromiseForMainThreadScrollUpdate(
93 swap_promise.Pass()); 93 swap_promise.Pass());
94 } 94 }
95 } 95 }
96 96
97 } // namespace cc 97 } // namespace cc
OLDNEW
« no previous file with comments | « cc/animation/transform_operations.cc ('k') | cc/base/math_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698