| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 1614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1625 if (filmStripFrame) { | 1625 if (filmStripFrame) { |
| 1626 var filmStripPreview = createElementWithClass("img", "timeline-filmstrip
-preview"); | 1626 var filmStripPreview = createElementWithClass("img", "timeline-filmstrip
-preview"); |
| 1627 filmStripFrame.imageDataPromise().then(onGotImageData.bind(null, filmStr
ipPreview)); | 1627 filmStripFrame.imageDataPromise().then(onGotImageData.bind(null, filmStr
ipPreview)); |
| 1628 contentHelper.appendElementRow("", filmStripPreview); | 1628 contentHelper.appendElementRow("", filmStripPreview); |
| 1629 filmStripPreview.addEventListener("click", frameClicked.bind(null, filmS
tripFrame), false); | 1629 filmStripPreview.addEventListener("click", frameClicked.bind(null, filmS
tripFrame), false); |
| 1630 } | 1630 } |
| 1631 var durationInMillis = frame.endTime - frame.startTime; | 1631 var durationInMillis = frame.endTime - frame.startTime; |
| 1632 contentHelper.appendTextRow(WebInspector.UIString("FPS"), Math.floor(1000 /
durationInMillis)); | 1632 contentHelper.appendTextRow(WebInspector.UIString("FPS"), Math.floor(1000 /
durationInMillis)); |
| 1633 contentHelper.appendTextRow(WebInspector.UIString("CPU time"), Number.millis
ToString(frame.cpuTime, true)); | 1633 contentHelper.appendTextRow(WebInspector.UIString("CPU time"), Number.millis
ToString(frame.cpuTime, true)); |
| 1634 | 1634 |
| 1635 if (Runtime.experiments.isEnabled("layersPanel") && frame.layerTree) { | |
| 1636 contentHelper.appendElementRow(WebInspector.UIString("Layer tree"), | |
| 1637 WebInspector.Linkifier.linkifyUsingReveal
er(frame.layerTree, WebInspector.UIString("show"))); | |
| 1638 } | |
| 1639 | |
| 1640 /** | 1635 /** |
| 1641 * @param {!Element} image | 1636 * @param {!Element} image |
| 1642 * @param {?string} data | 1637 * @param {?string} data |
| 1643 */ | 1638 */ |
| 1644 function onGotImageData(image, data) | 1639 function onGotImageData(image, data) |
| 1645 { | 1640 { |
| 1646 if (data) | 1641 if (data) |
| 1647 image.src = "data:image/jpg;base64," + data; | 1642 image.src = "data:image/jpg;base64," + data; |
| 1648 } | 1643 } |
| 1649 | 1644 |
| (...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2145 case warnings.V8Deopt: | 2140 case warnings.V8Deopt: |
| 2146 span.appendChild(WebInspector.linkifyURLAsNode("https://github.com/Googl
eChrome/devtools-docs/issues/53", | 2141 span.appendChild(WebInspector.linkifyURLAsNode("https://github.com/Googl
eChrome/devtools-docs/issues/53", |
| 2147 WebInspector.UIString("Not optimized"), undefined, true)); | 2142 WebInspector.UIString("Not optimized"), undefined, true)); |
| 2148 span.createTextChild(WebInspector.UIString(": %s", eventData["deoptReaso
n"])); | 2143 span.createTextChild(WebInspector.UIString(": %s", eventData["deoptReaso
n"])); |
| 2149 break; | 2144 break; |
| 2150 default: | 2145 default: |
| 2151 console.assert(false, "Unhandled TimelineModel.WarningType"); | 2146 console.assert(false, "Unhandled TimelineModel.WarningType"); |
| 2152 } | 2147 } |
| 2153 return span; | 2148 return span; |
| 2154 } | 2149 } |
| OLD | NEW |