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

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

Issue 2227293002: Add RAIL tracing category to Chrome tracing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add missing PaintTiming markers Created 4 years, 4 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 | « ui/events/blink/input_handler_proxy.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 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>
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 void LatencyInfoTracedValue::AppendAsTraceFormat(std::string* out) const { 112 void LatencyInfoTracedValue::AppendAsTraceFormat(std::string* out) const {
113 std::string tmp; 113 std::string tmp;
114 base::JSONWriter::Write(*value_, &tmp); 114 base::JSONWriter::Write(*value_, &tmp);
115 *out += tmp; 115 *out += tmp;
116 } 116 }
117 117
118 LatencyInfoTracedValue::LatencyInfoTracedValue(base::Value* value) 118 LatencyInfoTracedValue::LatencyInfoTracedValue(base::Value* value)
119 : value_(value) { 119 : value_(value) {
120 } 120 }
121 121
122 const char kTraceCategoriesForAsyncEvents[] = "benchmark,latencyInfo"; 122 const char kTraceCategoriesForAsyncEvents[] = "benchmark,latencyInfo,rail";
123 123
124 struct LatencyInfoEnabledInitializer { 124 struct LatencyInfoEnabledInitializer {
125 LatencyInfoEnabledInitializer() : 125 LatencyInfoEnabledInitializer() :
126 latency_info_enabled(TRACE_EVENT_API_GET_CATEGORY_GROUP_ENABLED( 126 latency_info_enabled(TRACE_EVENT_API_GET_CATEGORY_GROUP_ENABLED(
127 kTraceCategoriesForAsyncEvents)) { 127 kTraceCategoriesForAsyncEvents)) {
128 } 128 }
129 129
130 const unsigned char* latency_info_enabled; 130 const unsigned char* latency_info_enabled;
131 }; 131 };
132 132
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 } 367 }
368 368
369 bool LatencyInfo::AddInputCoordinate(const gfx::PointF& input_coordinate) { 369 bool LatencyInfo::AddInputCoordinate(const gfx::PointF& input_coordinate) {
370 if (input_coordinates_size_ >= kMaxInputCoordinates) 370 if (input_coordinates_size_ >= kMaxInputCoordinates)
371 return false; 371 return false;
372 input_coordinates_[input_coordinates_size_++] = input_coordinate; 372 input_coordinates_[input_coordinates_size_++] = input_coordinate;
373 return true; 373 return true;
374 } 374 }
375 375
376 } // namespace ui 376 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/blink/input_handler_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698