| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <!-- | 2 <!-- |
| 3 Copyright (c) 2015 The Chromium Authors. All rights reserved. | 3 Copyright (c) 2015 The Chromium Authors. All rights reserved. |
| 4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
| 5 found in the LICENSE file. | 5 found in the LICENSE file. |
| 6 --> | 6 --> |
| 7 | 7 |
| 8 <link rel="import" href="/tracing/base/sorted_array_utils.html"> | 8 <link rel="import" href="/tracing/base/math/sorted_array_utils.html"> |
| 9 | 9 |
| 10 <script> | 10 <script> |
| 11 'use strict'; | 11 'use strict'; |
| 12 | 12 |
| 13 /** | 13 /** |
| 14 * @fileoverview Class for representing SurfaceFlinger process and its Vsyncs. | 14 * @fileoverview Class for representing SurfaceFlinger process and its Vsyncs. |
| 15 */ | 15 */ |
| 16 tr.exportTo('tr.model.helpers', function() { | 16 tr.exportTo('tr.model.helpers', function() { |
| 17 var findLowIndexInSortedArray = tr.b.findLowIndexInSortedArray; | 17 var findLowIndexInSortedArray = tr.b.math.findLowIndexInSortedArray; |
| 18 | 18 |
| 19 var VSYNC_SF_NAME = 'android.VSYNC-sf'; | 19 var VSYNC_SF_NAME = 'android.VSYNC-sf'; |
| 20 var VSYNC_APP_NAME = 'android.VSYNC-app'; | 20 var VSYNC_APP_NAME = 'android.VSYNC-app'; |
| 21 var VSYNC_FALLBACK_NAME = 'android.VSYNC'; | 21 var VSYNC_FALLBACK_NAME = 'android.VSYNC'; |
| 22 | 22 |
| 23 // when sampling vsync, push samples back by this much to ensure | 23 // when sampling vsync, push samples back by this much to ensure |
| 24 // frame start samples *between* vsyncs | 24 // frame start samples *between* vsyncs |
| 25 var TIMESTAMP_FUDGE_MS = 0.01; | 25 var TIMESTAMP_FUDGE_MS = 0.01; |
| 26 | 26 |
| 27 function getVsyncTimestamps(process, counterName) { | 27 function getVsyncTimestamps(process, counterName) { |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 return undefined; | 100 return undefined; |
| 101 return this.sfVsyncTimestamps_[firstGreaterIndex]; | 101 return this.sfVsyncTimestamps_[firstGreaterIndex]; |
| 102 } | 102 } |
| 103 }; | 103 }; |
| 104 | 104 |
| 105 return { | 105 return { |
| 106 AndroidSurfaceFlinger, | 106 AndroidSurfaceFlinger, |
| 107 }; | 107 }; |
| 108 }); | 108 }); |
| 109 </script> | 109 </script> |
| OLD | NEW |