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

Side by Side Diff: ui/events/latency_info.cc

Issue 2273193002: Make compositor_frame.h NOT include base/trace_event/trace_event.h (Closed)
Patch Set: Fix Created 4 years, 3 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
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 "ui/events/latency_info.h" 5 #include "ui/events/latency_info.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <string> 10 #include <string>
11 #include <utility> 11 #include <utility>
12 12
13 #include "base/json/json_writer.h" 13 #include "base/json/json_writer.h"
14 #include "base/lazy_instance.h" 14 #include "base/lazy_instance.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/strings/stringprintf.h" 16 #include "base/strings/stringprintf.h"
17 #include "base/trace_event/trace_event.h"
17 18
18 namespace { 19 namespace {
19 20
20 const size_t kMaxLatencyInfoNumber = 100; 21 const size_t kMaxLatencyInfoNumber = 100;
21 22
22 const char* GetComponentName(ui::LatencyComponentType type) { 23 const char* GetComponentName(ui::LatencyComponentType type) {
23 #define CASE_TYPE(t) case ui::t: return #t 24 #define CASE_TYPE(t) case ui::t: return #t
24 switch (type) { 25 switch (type) {
25 CASE_TYPE(INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT); 26 CASE_TYPE(INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT);
26 CASE_TYPE(LATENCY_BEGIN_SCROLL_LISTENER_UPDATE_MAIN_COMPONENT); 27 CASE_TYPE(LATENCY_BEGIN_SCROLL_LISTENER_UPDATE_MAIN_COMPONENT);
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 } 368 }
368 369
369 bool LatencyInfo::AddInputCoordinate(const gfx::PointF& input_coordinate) { 370 bool LatencyInfo::AddInputCoordinate(const gfx::PointF& input_coordinate) {
370 if (input_coordinates_size_ >= kMaxInputCoordinates) 371 if (input_coordinates_size_ >= kMaxInputCoordinates)
371 return false; 372 return false;
372 input_coordinates_[input_coordinates_size_++] = input_coordinate; 373 input_coordinates_[input_coordinates_size_++] = input_coordinate;
373 return true; 374 return true;
374 } 375 }
375 376
376 } // namespace ui 377 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698