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

Side by Side Diff: tracing/tracing/ui/extras/system_stats/system_stats_instance_track.html

Issue 2771723003: [tracing] Move math utilities from base into their own subdirectory (attempt 2) (Closed)
Patch Set: rebase Created 3 years, 9 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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright (c) 2013 The Chromium Authors. All rights reserved. 3 Copyright (c) 2013 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be 4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file. 5 found in the LICENSE file.
6 --> 6 -->
7 7
8 <link rel="stylesheet" 8 <link rel="stylesheet"
9 href="/tracing/ui/extras/system_stats/system_stats_instance_track.css"> 9 href="/tracing/ui/extras/system_stats/system_stats_instance_track.css">
10 10
11 <link rel="import" href="/tracing/base/sorted_array_utils.html"> 11 <link rel="import" href="/tracing/base/math/sorted_array_utils.html">
12 <link rel="import" href="/tracing/ui/base/event_presenter.html"> 12 <link rel="import" href="/tracing/ui/base/event_presenter.html">
13 <link rel="import" href="/tracing/ui/base/ui.html"> 13 <link rel="import" href="/tracing/ui/base/ui.html">
14 <link rel="import" href="/tracing/ui/tracks/object_instance_track.html"> 14 <link rel="import" href="/tracing/ui/tracks/object_instance_track.html">
15 <link rel="import" href="/tracing/ui/tracks/stacked_bars_track.html"> 15 <link rel="import" href="/tracing/ui/tracks/stacked_bars_track.html">
16 16
17 <script> 17 <script>
18 'use strict'; 18 'use strict';
19 19
20 tr.exportTo('tr.ui.e.system_stats', function() { 20 tr.exportTo('tr.ui.e.system_stats', function() {
21 var EventPresenter = tr.ui.b.EventPresenter; 21 var EventPresenter = tr.ui.b.EventPresenter;
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 var width = bounds.width * pixelRatio; 205 var width = bounds.width * pixelRatio;
206 var height = (bounds.height * pixelRatio) / statCount; 206 var height = (bounds.height * pixelRatio) / statCount;
207 207
208 // Culling parameters. 208 // Culling parameters.
209 var vp = this.viewport.currentDisplayTransform; 209 var vp = this.viewport.currentDisplayTransform;
210 210
211 // Scale by the size of the largest snapshot. 211 // Scale by the size of the largest snapshot.
212 var maxStats = this.maxStats_; 212 var maxStats = this.maxStats_;
213 213
214 var objectSnapshots = this.objectInstance_.snapshots; 214 var objectSnapshots = this.objectInstance_.snapshots;
215 var lowIndex = tr.b.findLowIndexInSortedArray( 215 var lowIndex = tr.b.math.findLowIndexInSortedArray(
216 objectSnapshots, 216 objectSnapshots,
217 function(snapshot) { 217 function(snapshot) {
218 return snapshot.ts; 218 return snapshot.ts;
219 }, 219 },
220 viewLWorld); 220 viewLWorld);
221 221
222 // Assure that the stack with the left edge off screen still gets drawn 222 // Assure that the stack with the left edge off screen still gets drawn
223 if (lowIndex > 0) 223 if (lowIndex > 0)
224 lowIndex -= 1; 224 lowIndex -= 1;
225 225
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 346
347 tr.ui.tracks.ObjectInstanceTrack.register( 347 tr.ui.tracks.ObjectInstanceTrack.register(
348 SystemStatsInstanceTrack, 348 SystemStatsInstanceTrack,
349 {typeName: 'base::TraceEventSystemStatsMonitor::SystemStats'}); 349 {typeName: 'base::TraceEventSystemStatsMonitor::SystemStats'});
350 350
351 return { 351 return {
352 SystemStatsInstanceTrack, 352 SystemStatsInstanceTrack,
353 }; 353 };
354 }); 354 });
355 </script> 355 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698