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

Side by Side Diff: tracing/tracing/model/device.html

Issue 2083213002: Change call-sites in trace viewer to use generators instead of iteration functions. (Closed) Base URL: git@github.com:catapult-project/catapult@master
Patch Set: fix break/continue Created 4 years, 6 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) 2015 The Chromium Authors. All rights reserved. 3 Copyright (c) 2015 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="import" href="/tracing/base/guid.html"> 8 <link rel="import" href="/tracing/base/guid.html">
9 <link rel="import" href="/tracing/base/range.html"> 9 <link rel="import" href="/tracing/base/range.html">
10 <link rel="import" href="/tracing/model/event_container.html"> 10 <link rel="import" href="/tracing/model/event_container.html">
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 get vSyncTimestamps() { 71 get vSyncTimestamps() {
72 return this.vSyncTimestamps_; 72 return this.vSyncTimestamps_;
73 }, 73 },
74 74
75 set vSyncTimestamps(value) { 75 set vSyncTimestamps(value) {
76 this.vSyncTimestamps_ = value; 76 this.vSyncTimestamps_ = value;
77 }, 77 },
78 78
79 updateBounds: function() { 79 updateBounds: function() {
80 this.bounds.reset(); 80 this.bounds.reset();
81 81 for (var child of this.childEventContainers()) {
82 this.iterateAllChildEventContainers(function(child) {
83 child.updateBounds(); 82 child.updateBounds();
84 this.bounds.addRange(child.bounds); 83 this.bounds.addRange(child.bounds);
85 }, this); 84 }
86 }, 85 },
87 86
88 shiftTimestampsForward: function(amount) { 87 shiftTimestampsForward: function(amount) {
89 this.iterateAllChildEventContainers(function(child) { 88 for (var child of this.childEventContainers()) {
90 child.shiftTimestampsForward(amount); 89 child.shiftTimestampsForward(amount);
91 }); 90 }
92 91
93 for (var i = 0; i < this.vSyncTimestamps_.length; i++) 92 for (var i = 0; i < this.vSyncTimestamps_.length; i++)
94 this.vSyncTimestamps_[i] += amount; 93 this.vSyncTimestamps_[i] += amount;
95 }, 94 },
96 95
97 addCategoriesToDict: function(categoriesDict) { 96 addCategoriesToDict: function(categoriesDict) {
98 }, 97 },
99 98
100 findTopmostSlicesInThisContainer: function(eventPredicate, callback, 99 childEvents: function*() {
charliea (OOO until 10-5) 2016/06/29 18:08:44 nit: can delete this if we provide a default ipml
alexandermont 2016/06/29 20:47:11 Done
101 opt_this) {
102 },
103
104 childEvents: function*(eventTypePredicate, opt_this) {
105 }, 100 },
106 101
107 childEventContainers: function*() { 102 childEventContainers: function*() {
108 if (this.powerSeries_) 103 if (this.powerSeries_)
109 yield this.powerSeries_; 104 yield this.powerSeries_;
110 } 105 }
111 }; 106 };
112 107
113 return { 108 return {
114 Device: Device 109 Device: Device
115 }; 110 };
116 }); 111 });
117 </script> 112 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698