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

Side by Side Diff: tracing/tracing/extras/chrome/cc/raster_task.html

Issue 2776653002: [ESLint] Fix violations when enabling curly rule in eslint. (Closed)
Patch Set: rebase Created 3 years, 8 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright (c) 2013 The Chromium Authors. All rights reserved. 3 Copyright (c) 2013 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 <link rel="import" href="/tracing/extras/chrome/cc/tile.html"> 7 <link rel="import" href="/tracing/extras/chrome/cc/tile.html">
8 8
9 <script> 9 <script>
10 'use strict'; 10 'use strict';
(...skipping 11 matching lines...) Expand all
22 var knownAnalysisTaskNames = [ 22 var knownAnalysisTaskNames = [
23 'TileManager::RunAnalyzeTask', 23 'TileManager::RunAnalyzeTask',
24 'RasterWorkerPoolTaskImpl::RunAnalysisOnThread', 24 'RasterWorkerPoolTaskImpl::RunAnalysisOnThread',
25 'RasterWorkerPoolTaskImpl::Analyze', 25 'RasterWorkerPoolTaskImpl::Analyze',
26 'RasterTaskImpl::Analyze', 26 'RasterTaskImpl::Analyze',
27 'cc::AnalyzeTask', 27 'cc::AnalyzeTask',
28 'AnalyzeTask' 28 'AnalyzeTask'
29 ]; 29 ];
30 30
31 function getTileFromRasterTaskSlice(slice) { 31 function getTileFromRasterTaskSlice(slice) {
32 if (!(isSliceDoingRasterization(slice) || isSliceDoingAnalysis(slice))) 32 if (!(isSliceDoingRasterization(slice) || isSliceDoingAnalysis(slice))) {
33 return undefined; 33 return undefined;
34 }
34 35
35 var tileData; 36 var tileData;
36 if (slice.args.data) 37 if (slice.args.data) {
37 tileData = slice.args.data; 38 tileData = slice.args.data;
38 else 39 } else {
39 tileData = slice.args.tileData; 40 tileData = slice.args.tileData;
40 if (tileData === undefined) 41 }
41 return undefined; 42 if (tileData === undefined) return undefined;
42 if (tileData.tile_id) 43 if (tileData.tile_id) return tileData.tile_id;
43 return tileData.tile_id;
44 44
45 var tile = tileData.tileId; 45 var tile = tileData.tileId;
46 if (!(tile instanceof tr.e.cc.TileSnapshot)) 46 if (!(tile instanceof tr.e.cc.TileSnapshot)) {
47 return undefined; 47 return undefined;
48 }
48 return tileData.tileId; 49 return tileData.tileId;
49 } 50 }
50 51
51 function isSliceDoingRasterization(slice) { 52 function isSliceDoingRasterization(slice) {
52 return knownRasterTaskNames.includes(slice.title); 53 return knownRasterTaskNames.includes(slice.title);
53 } 54 }
54 55
55 function isSliceDoingAnalysis(slice) { 56 function isSliceDoingAnalysis(slice) {
56 return knownAnalysisTaskNames.includes(slice.title); 57 return knownAnalysisTaskNames.includes(slice.title);
57 } 58 }
58 59
59 return { 60 return {
60 getTileFromRasterTaskSlice: getTileFromRasterTaskSlice, 61 getTileFromRasterTaskSlice: getTileFromRasterTaskSlice,
61 isSliceDoingRasterization: isSliceDoingRasterization, 62 isSliceDoingRasterization: isSliceDoingRasterization,
62 isSliceDoingAnalysis: isSliceDoingAnalysis 63 isSliceDoingAnalysis: isSliceDoingAnalysis
63 }; 64 };
64 }); 65 });
65 </script> 66 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/extras/chrome/cc/picture_test.html ('k') | tracing/tracing/extras/chrome/cc/region.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698