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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChart.js

Issue 2486853002: Timeline: remove TimelineModel inferred properties from TracingModel.Event (Closed)
Patch Set: Created 4 years, 1 month 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 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 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 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 /** @type {!WebInspector.TimelineIRModel.Phases} */ (this._entryData[e ntryIndex])); 707 /** @type {!WebInspector.TimelineIRModel.Phases} */ (this._entryData[e ntryIndex]));
708 context.fillStyle = color; 708 context.fillStyle = color;
709 context.fillRect(barX, barY, barWidth - 1, 2); 709 context.fillRect(barX, barY, barWidth - 1, 2);
710 context.fillRect(barX, barY - 3, 2, 3); 710 context.fillRect(barX, barY - 3, 2, 3);
711 context.fillRect(barX + barWidth - 3, barY - 3, 2, 3); 711 context.fillRect(barX + barWidth - 3, barY - 3, 2, 3);
712 return false; 712 return false;
713 } 713 }
714 714
715 if (type === WebInspector.TimelineFlameChartEntryType.Event) { 715 if (type === WebInspector.TimelineFlameChartEntryType.Event) {
716 var event = /** @type {!WebInspector.TracingModel.Event} */ (this._entryDa ta[entryIndex]); 716 var event = /** @type {!WebInspector.TracingModel.Event} */ (this._entryDa ta[entryIndex]);
717 if (event.hasCategory(WebInspector.TimelineModel.Category.LatencyInfo) && event.timeWaitingForMainThread) { 717 if (event.hasCategory(WebInspector.TimelineModel.Category.LatencyInfo)) {
718 context.fillStyle = 'hsla(0, 70%, 60%, 1)'; 718 var timeWaitingForMainThread = WebInspector.TimelineData.forEvent(event) ;
719 var width = Math.floor(unclippedBarX - barX + event.timeWaitingForMainTh read * timeToPixels); 719 if (timeWaitingForMainThread) {
720 context.fillRect(barX, barY + barHeight - 3, width, 2); 720 context.fillStyle = 'hsla(0, 70%, 60%, 1)';
721 var width = Math.floor(unclippedBarX - barX + timeWaitingForMainThread * timeToPixels);
722 context.fillRect(barX, barY + barHeight - 3, width, 2);
723 }
721 } 724 }
722 if (event.warning) 725 if (event.warning)
723 paintWarningDecoration(barX, barWidth - 1.5); 726 paintWarningDecoration(barX, barWidth - 1.5);
724 } 727 }
725 728
726 /** 729 /**
727 * @param {number} x 730 * @param {number} x
728 * @param {number} width 731 * @param {number} width
729 */ 732 */
730 function paintWarningDecoration(x, width) { 733 function paintWarningDecoration(x, width) {
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
1435 WebInspector.TimelineFlameChartView.Selection = class { 1438 WebInspector.TimelineFlameChartView.Selection = class {
1436 /** 1439 /**
1437 * @param {!WebInspector.TimelineSelection} selection 1440 * @param {!WebInspector.TimelineSelection} selection
1438 * @param {number} entryIndex 1441 * @param {number} entryIndex
1439 */ 1442 */
1440 constructor(selection, entryIndex) { 1443 constructor(selection, entryIndex) {
1441 this.timelineSelection = selection; 1444 this.timelineSelection = selection;
1442 this.entryIndex = entryIndex; 1445 this.entryIndex = entryIndex;
1443 } 1446 }
1444 }; 1447 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698