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

Side by Side Diff: tracing/tracing/ui/extras/chrome/cc/layer_tree_quad_stack_view.html

Issue 2771723003: [tracing] Move math utilities from base into their own subdirectory (attempt 2) (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 unified diff | Download patch
OLDNEW
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/color.html"> 8 <link rel="import" href="/tracing/base/color.html">
9 <link rel="import" href="/tracing/base/quad.html"> 9 <link rel="import" href="/tracing/base/math/quad.html">
10 <link rel="import" href="/tracing/base/math/range.html">
10 <link rel="import" href="/tracing/base/raf.html"> 11 <link rel="import" href="/tracing/base/raf.html">
11 <link rel="import" href="/tracing/base/range.html">
12 <link rel="import" href="/tracing/base/unit_scale.html"> 12 <link rel="import" href="/tracing/base/unit_scale.html">
13 <link rel="import" href="/tracing/extras/chrome/cc/debug_colors.html"> 13 <link rel="import" href="/tracing/extras/chrome/cc/debug_colors.html">
14 <link rel="import" href="/tracing/extras/chrome/cc/picture.html"> 14 <link rel="import" href="/tracing/extras/chrome/cc/picture.html">
15 <link rel="import" href="/tracing/extras/chrome/cc/render_pass.html"> 15 <link rel="import" href="/tracing/extras/chrome/cc/render_pass.html">
16 <link rel="import" href="/tracing/extras/chrome/cc/tile.html"> 16 <link rel="import" href="/tracing/extras/chrome/cc/tile.html">
17 <link rel="import" href="/tracing/extras/chrome/cc/util.html"> 17 <link rel="import" href="/tracing/extras/chrome/cc/util.html">
18 <link rel="import" href="/tracing/model/event_set.html"> 18 <link rel="import" href="/tracing/model/event_set.html">
19 <link rel="import" href="/tracing/ui/base/info_bar.html"> 19 <link rel="import" href="/tracing/ui/base/info_bar.html">
20 <link rel="import" href="/tracing/ui/base/quad_stack_view.html"> 20 <link rel="import" href="/tracing/ui/base/quad_stack_view.html">
21 <link rel="import" href="/tracing/ui/base/utils.html"> 21 <link rel="import" href="/tracing/ui/base/utils.html">
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 return; 416 return;
417 } 417 }
418 418
419 419
420 var status = this.computePictureLoadingStatus_(); 420 var status = this.computePictureLoadingStatus_();
421 if (!status.picturesComplete) 421 if (!status.picturesComplete)
422 return; 422 return;
423 423
424 var lthi = this.layerTreeImpl_.layerTreeHostImpl; 424 var lthi = this.layerTreeImpl_.layerTreeHostImpl;
425 var lthiInstance = lthi.objectInstance; 425 var lthiInstance = lthi.objectInstance;
426 var worldViewportRect = tr.b.Rect.fromXYWH( 426 var worldViewportRect = tr.b.math.Rect.fromXYWH(
427 0, 0, 427 0, 0,
428 lthi.deviceViewportSize.width, lthi.deviceViewportSize.height); 428 lthi.deviceViewportSize.width, lthi.deviceViewportSize.height);
429 this.quadStackView_.deviceRect = worldViewportRect; 429 this.quadStackView_.deviceRect = worldViewportRect;
430 if (this.isRenderPassQuads_) 430 if (this.isRenderPassQuads_)
431 this.quadStackView_.quads = this.generateRenderPassQuads(); 431 this.quadStackView_.quads = this.generateRenderPassQuads();
432 else 432 else
433 this.quadStackView_.quads = this.generateLayerQuads(); 433 this.quadStackView_.quads = this.generateLayerQuads();
434 434
435 this.updateWhatRasterizedLinkState_(); 435 this.updateWhatRasterizedLinkState_();
436 436
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 iq.stackingGroupId = layerQuad.stackingGroupId; 695 iq.stackingGroupId = layerQuad.stackingGroupId;
696 quads.push(iq); 696 quads.push(iq);
697 } 697 }
698 }, 698 },
699 699
700 appendAnimationQuads_: function(quads, layer, layerQuad) { 700 appendAnimationQuads_: function(quads, layer, layerQuad) {
701 if (!layer.animationBoundsRect) 701 if (!layer.animationBoundsRect)
702 return; 702 return;
703 703
704 var rect = layer.animationBoundsRect; 704 var rect = layer.animationBoundsRect;
705 var abq = tr.b.Quad.fromRect(rect); 705 var abq = tr.b.math.Quad.fromRect(rect);
706 706
707 abq.backgroundColor = 'rgba(164,191,48,0.5)'; 707 abq.backgroundColor = 'rgba(164,191,48,0.5)';
708 abq.borderColor = 'rgba(205,255,0,0.75)'; 708 abq.borderColor = 'rgba(205,255,0,0.75)';
709 abq.borderWidth = 3.0; 709 abq.borderWidth = 3.0;
710 abq.stackingGroupId = layerQuad.stackingGroupId; 710 abq.stackingGroupId = layerQuad.stackingGroupId;
711 abq.selectionToSetIfClicked = new cc.AnimationRectSelection( 711 abq.selectionToSetIfClicked = new cc.AnimationRectSelection(
712 layer, rect); 712 layer, rect);
713 quads.push(abq); 713 quads.push(abq);
714 }, 714 },
715 715
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 undefined : 877 undefined :
878 tile.scheduledPriority; 878 tile.scheduledPriority;
879 } else if (heatmapType === TILE_HEATMAP_TYPE.USING_GPU_MEMORY) { 879 } else if (heatmapType === TILE_HEATMAP_TYPE.USING_GPU_MEMORY) {
880 if (tile.isSolidColor) 880 if (tile.isSolidColor)
881 return 0.5; 881 return 0.5;
882 return tile.isUsingGpuMemory ? 0 : 1; 882 return tile.isUsingGpuMemory ? 0 : 1;
883 } 883 }
884 }, 884 },
885 885
886 getMinMaxForHeatmap_: function(tiles, heatmapType) { 886 getMinMaxForHeatmap_: function(tiles, heatmapType) {
887 var range = new tr.b.Range(); 887 var range = new tr.b.math.Range();
888 if (heatmapType === TILE_HEATMAP_TYPE.USING_GPU_MEMORY) { 888 if (heatmapType === TILE_HEATMAP_TYPE.USING_GPU_MEMORY) {
889 range.addValue(0); 889 range.addValue(0);
890 range.addValue(1); 890 range.addValue(1);
891 return range; 891 return range;
892 } 892 }
893 893
894 for (var i = 0; i < tiles.length; ++i) { 894 for (var i = 0; i < tiles.length; ++i) {
895 var value = this.getValueForHeatmap_(tiles[i], heatmapType); 895 var value = this.getValueForHeatmap_(tiles[i], heatmapType);
896 if (value === undefined) 896 if (value === undefined)
897 continue; 897 continue;
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
1109 var stackingGroupId = nextStackingGroupId++; 1109 var stackingGroupId = nextStackingGroupId++;
1110 if (this.showBottlenecks) 1110 if (this.showBottlenecks)
1111 this.appendBottleneckQuads_(quads, layer, layerQuad, stackingGroupId); 1111 this.appendBottleneckQuads_(quads, layer, layerQuad, stackingGroupId);
1112 }, this); 1112 }, this);
1113 1113
1114 var tracedInputLatencies = this.layerTreeImpl.tracedInputLatencies; 1114 var tracedInputLatencies = this.layerTreeImpl.tracedInputLatencies;
1115 if (this.showInputEvents && tracedInputLatencies) { 1115 if (this.showInputEvents && tracedInputLatencies) {
1116 for (var i = 0; i < tracedInputLatencies.length; i++) { 1116 for (var i = 0; i < tracedInputLatencies.length; i++) {
1117 var coordinatesArray = tracedInputLatencies[i].args.data.coordinates; 1117 var coordinatesArray = tracedInputLatencies[i].args.data.coordinates;
1118 for (var j = 0; j < coordinatesArray.length; j++) { 1118 for (var j = 0; j < coordinatesArray.length; j++) {
1119 var inputQuad = tr.b.Quad.fromXYWH( 1119 var inputQuad = tr.b.math.Quad.fromXYWH(
1120 coordinatesArray[j].x - 25, 1120 coordinatesArray[j].x - 25,
1121 coordinatesArray[j].y - 25, 1121 coordinatesArray[j].y - 25,
1122 50, 1122 50,
1123 50); 1123 50);
1124 inputQuad.borderColor = 'rgba(0, 0, 0, 0)'; 1124 inputQuad.borderColor = 'rgba(0, 0, 0, 0)';
1125 inputQuad.imageData = this.inputEventImageData_; 1125 inputQuad.imageData = this.inputEventImageData_;
1126 quads.push(inputQuad); 1126 quads.push(inputQuad);
1127 } 1127 }
1128 } 1128 }
1129 } 1129 }
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 event.selection = new tr.model.EventSet(tasks); 1197 event.selection = new tr.model.EventSet(tasks);
1198 this.dispatchEvent(event); 1198 this.dispatchEvent(event);
1199 } 1199 }
1200 }; 1200 };
1201 1201
1202 return { 1202 return {
1203 LayerTreeQuadStackView, 1203 LayerTreeQuadStackView,
1204 }; 1204 };
1205 }); 1205 });
1206 </script> 1206 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/ui/base/utils.html ('k') | tracing/tracing/ui/extras/chrome/cc/picture_debugger.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698