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

Side by Side Diff: Source/devtools/front_end/sdk/LayerTreeModel.js

Issue 670503002: Timeline: add layer details view (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 19 matching lines...) Expand all
30 30
31 /** @typedef {!{ 31 /** @typedef {!{
32 bounds: {height: number, width: number}, 32 bounds: {height: number, width: number},
33 children: Array.<!WebInspector.TracingLayerPayload>, 33 children: Array.<!WebInspector.TracingLayerPayload>,
34 layer_id: number, 34 layer_id: number,
35 position: Array.<number>, 35 position: Array.<number>,
36 scroll_offset: Array.<number>, 36 scroll_offset: Array.<number>,
37 layer_quad: Array.<number>, 37 layer_quad: Array.<number>,
38 draws_content: number, 38 draws_content: number,
39 transform: Array.<number>, 39 transform: Array.<number>,
40 owner_node: number 40 owner_node: number,
41 compositing_reasons: Array.<string>
41 }} 42 }}
42 */ 43 */
43 WebInspector.TracingLayerPayload; 44 WebInspector.TracingLayerPayload;
44 45
45 /** 46 /**
46 * @constructor 47 * @constructor
47 * @extends {WebInspector.SDKModel} 48 * @extends {WebInspector.SDKModel}
48 */ 49 */
49 WebInspector.LayerTreeModel = function(target) 50 WebInspector.LayerTreeModel = function(target)
50 { 51 {
(...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 this._layerId = String(payload.layer_id); 880 this._layerId = String(payload.layer_id);
880 this._offsetX = payload.position[0]; 881 this._offsetX = payload.position[0];
881 this._offsetY = payload.position[1]; 882 this._offsetY = payload.position[1];
882 this._width = payload.bounds.width; 883 this._width = payload.bounds.width;
883 this._height = payload.bounds.height; 884 this._height = payload.bounds.height;
884 this._children = []; 885 this._children = [];
885 this._parentLayerId = null; 886 this._parentLayerId = null;
886 this._parent = null; 887 this._parent = null;
887 this._quad = payload.layer_quad || []; 888 this._quad = payload.layer_quad || [];
888 this._createScrollRects(payload); 889 this._createScrollRects(payload);
890 this._compositingReasons = payload.compositing_reasons || [];
889 }, 891 },
890 892
891 /** 893 /**
892 * @return {string} 894 * @return {string}
893 */ 895 */
894 id: function() 896 id: function()
895 { 897 {
896 return this._layerId; 898 return this._layerId;
897 }, 899 },
898 900
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
1081 this._scrollRects.push(this._scrollRectsFromParams(payload.wheel_eve nt_handler_region, WebInspector.LayerTreeModel.ScrollRectType.WheelEventHandler. name)); 1083 this._scrollRects.push(this._scrollRectsFromParams(payload.wheel_eve nt_handler_region, WebInspector.LayerTreeModel.ScrollRectType.WheelEventHandler. name));
1082 if (payload.scroll_event_handler_region) 1084 if (payload.scroll_event_handler_region)
1083 this._scrollRects.push(this._scrollRectsFromParams(payload.scroll_ev ent_handler_region, WebInspector.LayerTreeModel.ScrollRectType.RepaintsOnScroll. name)); 1085 this._scrollRects.push(this._scrollRectsFromParams(payload.scroll_ev ent_handler_region, WebInspector.LayerTreeModel.ScrollRectType.RepaintsOnScroll. name));
1084 }, 1086 },
1085 1087
1086 /** 1088 /**
1087 * @param {function(!Array.<string>)} callback 1089 * @param {function(!Array.<string>)} callback
1088 */ 1090 */
1089 requestCompositingReasons: function(callback) 1091 requestCompositingReasons: function(callback)
1090 { 1092 {
1091 var wrappedCallback = InspectorBackend.wrapClientCallback(callback, "Lay erTreeAgent.reasonsForCompositingLayer(): ", undefined, []); 1093 callback(this._compositingReasons);
1092 LayerTreeAgent.compositingReasons(this.id(), wrappedCallback);
1093 }, 1094 },
1094 1095
1095 /** 1096 /**
1096 * @param {function(!WebInspector.PaintProfilerSnapshot=)} callback 1097 * @param {function(!WebInspector.PaintProfilerSnapshot=)} callback
1097 */ 1098 */
1098 requestSnapshot: function(callback) 1099 requestSnapshot: function(callback)
1099 { 1100 {
1100 var wrappedCallback = InspectorBackend.wrapClientCallback(callback, "Lay erTreeAgent.makeSnapshot(): ", WebInspector.PaintProfilerSnapshot); 1101 var wrappedCallback = InspectorBackend.wrapClientCallback(callback, "Lay erTreeAgent.makeSnapshot(): ", WebInspector.PaintProfilerSnapshot);
1101 LayerTreeAgent.makeSnapshot(this.id(), wrappedCallback); 1102 LayerTreeAgent.makeSnapshot(this.id(), wrappedCallback);
1102 } 1103 }
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
1172 1173
1173 /** 1174 /**
1174 * @param {!LayerTreeAgent.LayerId} layerId 1175 * @param {!LayerTreeAgent.LayerId} layerId
1175 * @param {!DOMAgent.Rect} clipRect 1176 * @param {!DOMAgent.Rect} clipRect
1176 */ 1177 */
1177 layerPainted: function(layerId, clipRect) 1178 layerPainted: function(layerId, clipRect)
1178 { 1179 {
1179 this._layerTreeModel._layerPainted(layerId, clipRect); 1180 this._layerTreeModel._layerPainted(layerId, clipRect);
1180 } 1181 }
1181 } 1182 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/layers/module.json ('k') | Source/devtools/front_end/timeline/LayerDetailsView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698