| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 this.cpuTime = 0; | 565 this.cpuTime = 0; |
| 566 this.idle = false; | 566 this.idle = false; |
| 567 /** @type {?WebInspector.DeferredLayerTree} */ | 567 /** @type {?WebInspector.DeferredLayerTree} */ |
| 568 this.layerTree = null; | 568 this.layerTree = null; |
| 569 /** @type {number|undefined} */ | 569 /** @type {number|undefined} */ |
| 570 this._mainFrameId = undefined; | 570 this._mainFrameId = undefined; |
| 571 } | 571 } |
| 572 | 572 |
| 573 WebInspector.TimelineFrame.prototype = { | 573 WebInspector.TimelineFrame.prototype = { |
| 574 /** | 574 /** |
| 575 * @return {boolean} |
| 576 */ |
| 577 hasWarnings: function() |
| 578 { |
| 579 var /** @const */ longFrameDurationThresholdMs = 18; |
| 580 return !this.idle && this.duration > longFrameDurationThresholdMs; |
| 581 }, |
| 582 |
| 583 /** |
| 575 * @param {number} endTime | 584 * @param {number} endTime |
| 576 */ | 585 */ |
| 577 _setEndTime: function(endTime) | 586 _setEndTime: function(endTime) |
| 578 { | 587 { |
| 579 this.endTime = endTime; | 588 this.endTime = endTime; |
| 580 this.duration = this.endTime - this.startTime; | 589 this.duration = this.endTime - this.startTime; |
| 581 }, | 590 }, |
| 582 | 591 |
| 583 /** | 592 /** |
| 584 * @param {?WebInspector.DeferredLayerTree} layerTree | 593 * @param {?WebInspector.DeferredLayerTree} layerTree |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 WebInspector.PendingFrame = function(triggerTime, timeByCategory) | 695 WebInspector.PendingFrame = function(triggerTime, timeByCategory) |
| 687 { | 696 { |
| 688 /** @type {!Object.<string, number>} */ | 697 /** @type {!Object.<string, number>} */ |
| 689 this.timeByCategory = timeByCategory; | 698 this.timeByCategory = timeByCategory; |
| 690 /** @type {!Array.<!WebInspector.LayerPaintEvent>} */ | 699 /** @type {!Array.<!WebInspector.LayerPaintEvent>} */ |
| 691 this.paints = []; | 700 this.paints = []; |
| 692 /** @type {number|undefined} */ | 701 /** @type {number|undefined} */ |
| 693 this.mainFrameId = undefined; | 702 this.mainFrameId = undefined; |
| 694 this.triggerTime = triggerTime; | 703 this.triggerTime = triggerTime; |
| 695 } | 704 } |
| OLD | NEW |