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

Side by Side Diff: Source/devtools/front_end/ui_lazy/TimelineOverviewPane.js

Issue 1180843010: DevTools: Optimize events overview drawing performance (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/devtools/front_end/timeline/TimelineEventOverview.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) 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 this._overviewGrid.setResizeEnabled(false); 48 this._overviewGrid.setResizeEnabled(false);
49 this._overviewGrid.addEventListener(WebInspector.OverviewGrid.Events.WindowC hanged, this._onWindowChanged, this); 49 this._overviewGrid.addEventListener(WebInspector.OverviewGrid.Events.WindowC hanged, this._onWindowChanged, this);
50 this._overviewGrid.addEventListener(WebInspector.OverviewGrid.Events.Click, this._onClick, this); 50 this._overviewGrid.addEventListener(WebInspector.OverviewGrid.Events.Click, this._onClick, this);
51 this._overviewControls = []; 51 this._overviewControls = [];
52 this._markers = new Map(); 52 this._markers = new Map();
53 53
54 this._popoverHelper = new WebInspector.PopoverHelper(this.contentElement, th is._getPopoverAnchor.bind(this), this._showPopover.bind(this), this._onHidePopov er.bind(this)); 54 this._popoverHelper = new WebInspector.PopoverHelper(this.contentElement, th is._getPopoverAnchor.bind(this), this._showPopover.bind(this), this._onHidePopov er.bind(this));
55 this._popoverHelper.setTimeout(0); 55 this._popoverHelper.setTimeout(0);
56 56
57 this._cursorEnabled = false; 57 this._cursorEnabled = false;
58 this._lastWidth = 0;
58 } 59 }
59 60
60 WebInspector.TimelineOverviewPane.Events = { 61 WebInspector.TimelineOverviewPane.Events = {
61 WindowChanged: "WindowChanged" 62 WindowChanged: "WindowChanged"
62 }; 63 };
63 64
64 WebInspector.TimelineOverviewPane.prototype = { 65 WebInspector.TimelineOverviewPane.prototype = {
65 /** 66 /**
66 * @param {!Element} element 67 * @param {!Element} element
67 * @param {!Event} event 68 * @param {!Event} event
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 wasShown: function() 138 wasShown: function()
138 { 139 {
139 this.update(); 140 this.update();
140 }, 141 },
141 142
142 /** 143 /**
143 * @override 144 * @override
144 */ 145 */
145 onResize: function() 146 onResize: function()
146 { 147 {
148 var width = this.element.offsetWidth;
149 if (width === this._lastWidth)
150 return;
151 this._lastWidth = width;
147 this.update(); 152 this.update();
148 }, 153 },
149 154
150 /** 155 /**
151 * @param {!Array.<!WebInspector.TimelineOverview>} overviewControls 156 * @param {!Array.<!WebInspector.TimelineOverview>} overviewControls
152 */ 157 */
153 setOverviewControls: function(overviewControls) 158 setOverviewControls: function(overviewControls)
154 { 159 {
155 for (var i = 0; i < this._overviewControls.length; ++i) 160 for (var i = 0; i < this._overviewControls.length; ++i)
156 this._overviewControls[i].dispose(); 161 this._overviewControls[i].dispose();
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 }, 578 },
574 579
575 resetCanvas: function() 580 resetCanvas: function()
576 { 581 {
577 this._canvas.width = this.element.clientWidth * window.devicePixelRatio; 582 this._canvas.width = this.element.clientWidth * window.devicePixelRatio;
578 this._canvas.height = this.element.clientHeight * window.devicePixelRati o; 583 this._canvas.height = this.element.clientHeight * window.devicePixelRati o;
579 }, 584 },
580 585
581 __proto__: WebInspector.VBox.prototype 586 __proto__: WebInspector.VBox.prototype
582 } 587 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/timeline/TimelineEventOverview.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698