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

Side by Side Diff: Source/devtools/front_end/timeline/TimelinePanel.js

Issue 455773002: Create "Paint profiler" experiment (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/devtools/front_end/common/Settings.js ('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 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Intel Inc. All rights reserved. 3 * Copyright (C) 2012 Intel Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 this._capt ureMemorySetting, 397 this._capt ureMemorySetting,
398 WebInspect or.UIString("Capture memory information on every timeline event"))); 398 WebInspect or.UIString("Capture memory information on every timeline event")));
399 this._captureMemorySetting.addChangeListener(this._onModeChanged, this); 399 this._captureMemorySetting.addChangeListener(this._onModeChanged, this);
400 if (WebInspector.experimentsSettings.timelinePowerProfiler.isEnabled()) { 400 if (WebInspector.experimentsSettings.timelinePowerProfiler.isEnabled()) {
401 this._capturePowerSetting = WebInspector.settings.createSetting("tim elineCapturePower", false); 401 this._capturePowerSetting = WebInspector.settings.createSetting("tim elineCapturePower", false);
402 panelStatusBarElement.appendChild(this._createSettingCheckbox(WebIns pector.UIString("Power"), 402 panelStatusBarElement.appendChild(this._createSettingCheckbox(WebIns pector.UIString("Power"),
403 this._ capturePowerSetting, 403 this._ capturePowerSetting,
404 WebIns pector.UIString("Capture power information"))); 404 WebIns pector.UIString("Capture power information")));
405 this._capturePowerSetting.addChangeListener(this._onModeChanged, thi s); 405 this._capturePowerSetting.addChangeListener(this._onModeChanged, thi s);
406 } 406 }
407 if (WebInspector.experimentsSettings.timelineOnTraceEvents.isEnabled()) { 407 if (WebInspector.experimentsSettings.timelineOnTraceEvents.isEnabled() & &
408 WebInspector.experimentsSettings.paintProfiler.isEnabled()) {
408 this._captureLayersAndPicturesSetting = WebInspector.settings.create Setting("timelineCaptureLayersAndPictures", false); 409 this._captureLayersAndPicturesSetting = WebInspector.settings.create Setting("timelineCaptureLayersAndPictures", false);
409 panelStatusBarElement.appendChild(this._createSettingCheckbox(WebIns pector.UIString("Paint"), 410 panelStatusBarElement.appendChild(this._createSettingCheckbox(WebIns pector.UIString("Paint"),
410 this._ captureLayersAndPicturesSetting, 411 this._ captureLayersAndPicturesSetting,
411 WebIns pector.UIString("Capture graphics layer positions and painted pictures"))); 412 WebIns pector.UIString("Capture graphics layer positions and painted pictures")));
412 } 413 }
413 414
414 this._miscStatusBarItems = panelStatusBarElement.createChild("div", "sta tus-bar-item"); 415 this._miscStatusBarItems = panelStatusBarElement.createChild("div", "sta tus-bar-item");
415 416
416 this._filtersContainer = this.element.createChild("div", "timeline-filte rs-header hidden"); 417 this._filtersContainer = this.element.createChild("div", "timeline-filte rs-header hidden");
417 this._filtersContainer.appendChild(this._filterBar.filtersElement()); 418 this._filtersContainer.appendChild(this._filterBar.filtersElement());
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
1004 var title = this._uiUtils.titleForRecord(record); 1005 var title = this._uiUtils.titleForRecord(record);
1005 this._uiUtils.generateDetailsContent(record, this._model, this._deta ilsLinkifier, this.showInDetails.bind(this, title)); 1006 this._uiUtils.generateDetailsContent(record, this._model, this._deta ilsLinkifier, this.showInDetails.bind(this, title));
1006 break; 1007 break;
1007 case WebInspector.TimelineSelection.Type.TraceEvent: 1008 case WebInspector.TimelineSelection.Type.TraceEvent:
1008 var event = /** @type {!WebInspector.TracingModel.Event} */ (this._s election.object()); 1009 var event = /** @type {!WebInspector.TracingModel.Event} */ (this._s election.object());
1009 WebInspector.TracingTimelineUIUtils.buildTraceEventDetails(event, th is._tracingTimelineModel, this._detailsLinkifier, this._appendDetailsTabsForTrac eEventAndShowDetails.bind(this, event)); 1010 WebInspector.TracingTimelineUIUtils.buildTraceEventDetails(event, th is._tracingTimelineModel, this._detailsLinkifier, this._appendDetailsTabsForTrac eEventAndShowDetails.bind(this, event));
1010 break; 1011 break;
1011 case WebInspector.TimelineSelection.Type.Frame: 1012 case WebInspector.TimelineSelection.Type.Frame:
1012 var frame = /** @type {!WebInspector.TimelineFrame} */ (this._select ion.object()); 1013 var frame = /** @type {!WebInspector.TimelineFrame} */ (this._select ion.object());
1013 this.showInDetails(WebInspector.UIString("Frame Statistics"), WebIns pector.TimelineUIUtils.generateDetailsContentForFrame(this._lazyFrameModel, fram e)); 1014 this.showInDetails(WebInspector.UIString("Frame Statistics"), WebIns pector.TimelineUIUtils.generateDetailsContentForFrame(this._lazyFrameModel, fram e));
1014 if (frame.layerTree) { 1015 if (frame.layerTree && WebInspector.experimentsSettings.paintProfile r.isEnabled()) {
1015 var layersView = this._layersView(); 1016 var layersView = this._layersView();
1016 layersView.showLayerTree(frame.layerTree, frame.paints); 1017 layersView.showLayerTree(frame.layerTree, frame.paints);
1017 this._detailsView.appendTab("layers", WebInspector.UIString("Lay ers"), layersView); 1018 this._detailsView.appendTab("layers", WebInspector.UIString("Lay ers"), layersView);
1018 } 1019 }
1019 break; 1020 break;
1020 } 1021 }
1021 }, 1022 },
1022 1023
1023 /** 1024 /**
1024 * @param {!WebInspector.TracingModel.Event} event 1025 * @param {!WebInspector.TracingModel.Event} event
1025 * @param {!Node} content 1026 * @param {!Node} content
1026 */ 1027 */
1027 _appendDetailsTabsForTraceEventAndShowDetails: function(event, content) 1028 _appendDetailsTabsForTraceEventAndShowDetails: function(event, content)
1028 { 1029 {
1029 var title = WebInspector.TracingTimelineUIUtils.styleForTraceEvent(event .name).title; 1030 var title = WebInspector.TracingTimelineUIUtils.styleForTraceEvent(event .name).title;
1030 this.showInDetails(title, content); 1031 this.showInDetails(title, content);
1031 if (event.picture) { 1032 if (event.picture && WebInspector.experimentsSettings.paintProfiler.isEn abled()) {
1032 var paintProfilerView = this._paintProfilerView(); 1033 var paintProfilerView = this._paintProfilerView();
1033 paintProfilerView.setPicture(event.thread.target(), event.picture); 1034 paintProfilerView.setPicture(event.thread.target(), event.picture);
1034 this._detailsView.appendTab("paintProfiler", WebInspector.UIString(" Paint Profiler"), paintProfilerView); 1035 this._detailsView.appendTab("paintProfiler", WebInspector.UIString(" Paint Profiler"), paintProfilerView);
1035 } 1036 }
1036 }, 1037 },
1037 1038
1038 _updateSelectedRangeStats: function() 1039 _updateSelectedRangeStats: function()
1039 { 1040 {
1040 if (this._selection) 1041 if (this._selection)
1041 return; 1042 return;
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
1443 * @param {!WebInspector.TimelineModel.Record} record 1444 * @param {!WebInspector.TimelineModel.Record} record
1444 * @return {boolean} 1445 * @return {boolean}
1445 */ 1446 */
1446 accept: function(record) 1447 accept: function(record)
1447 { 1448 {
1448 return !this._regex || this._uiUtils.testContentMatching(record, this._r egex); 1449 return !this._regex || this._uiUtils.testContentMatching(record, this._r egex);
1449 }, 1450 },
1450 1451
1451 __proto__: WebInspector.TimelineModel.Filter.prototype 1452 __proto__: WebInspector.TimelineModel.Filter.prototype
1452 } 1453 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/common/Settings.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698