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

Unified Diff: tracing/tracing/model/helpers/android_surface_flinger.html

Issue 2776653002: [ESLint] Fix violations when enabling curly rule in eslint. (Closed)
Patch Set: rebase Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: tracing/tracing/model/helpers/android_surface_flinger.html
diff --git a/tracing/tracing/model/helpers/android_surface_flinger.html b/tracing/tracing/model/helpers/android_surface_flinger.html
index 41f9fc791456641d074bd27a3640213f26835a09..e008fcb04235b3efda49357980f3044579f68078 100644
--- a/tracing/tracing/model/helpers/android_surface_flinger.html
+++ b/tracing/tracing/model/helpers/android_surface_flinger.html
@@ -26,11 +26,13 @@ tr.exportTo('tr.model.helpers', function() {
function getVsyncTimestamps(process, counterName) {
var vsync = process.counters[counterName];
- if (!vsync)
+ if (!vsync) {
vsync = process.counters[VSYNC_FALLBACK_NAME];
+ }
- if (vsync && vsync.numSeries === 1 && vsync.numSamples > 1)
+ if (vsync && vsync.numSeries === 1 && vsync.numSamples > 1) {
return vsync.series[0].timestamps;
+ }
return undefined;
}
@@ -59,13 +61,15 @@ tr.exportTo('tr.model.helpers', function() {
// newer versions - main thread, lowercase name, preceeding forward slash
if (mainThread && mainThread.name &&
- /surfaceflinger/.test(mainThread.name))
+ /surfaceflinger/.test(mainThread.name)) {
return new AndroidSurfaceFlinger(process, mainThread);
+ }
// older versions - another thread is named SurfaceFlinger
var primaryThreads = process.findAllThreadsNamed('SurfaceFlinger');
- if (primaryThreads.length === 1)
+ if (primaryThreads.length === 1) {
return new AndroidSurfaceFlinger(process, primaryThreads[0]);
+ }
return undefined;
};
@@ -75,29 +79,31 @@ tr.exportTo('tr.model.helpers', function() {
},
getFrameKickoff: function(timestamp) {
- if (!this.hasVsyncs)
+ if (!this.hasVsyncs) {
throw new Error('cannot query vsync info without vsyncs');
+ }
var firstGreaterIndex =
findLowIndexInSortedArray(this.appVsyncTimestamps_,
function(x) { return x; },
timestamp + TIMESTAMP_FUDGE_MS);
- if (firstGreaterIndex < 1)
- return undefined;
+ if (firstGreaterIndex < 1) return undefined;
return this.appVsyncTimestamps_[firstGreaterIndex - 1];
},
getFrameDeadline: function(timestamp) {
- if (!this.hasVsyncs)
+ if (!this.hasVsyncs) {
throw new Error('cannot query vsync info without vsyncs');
+ }
var firstGreaterIndex =
findLowIndexInSortedArray(this.sfVsyncTimestamps_,
function(x) { return x; },
timestamp + this.deadlineDelayMs_);
- if (firstGreaterIndex >= this.sfVsyncTimestamps_.length)
+ if (firstGreaterIndex >= this.sfVsyncTimestamps_.length) {
return undefined;
+ }
return this.sfVsyncTimestamps_[firstGreaterIndex];
}
};
« no previous file with comments | « tracing/tracing/model/helpers/android_model_helper_test.html ('k') | tracing/tracing/model/helpers/chrome_browser_helper.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698