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

Side by Side Diff: Source/devtools/front_end/timeline/Layers3DView.js

Issue 1113813002: [DevTools] Rename View to Widget. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 5 years, 7 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) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 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 20 matching lines...) Expand all
31 /** 31 /**
32 * @constructor 32 * @constructor
33 * @extends {WebInspector.VBox} 33 * @extends {WebInspector.VBox}
34 * @param {!WebInspector.LayerViewHost} layerViewHost 34 * @param {!WebInspector.LayerViewHost} layerViewHost
35 * @implements {WebInspector.LayerView} 35 * @implements {WebInspector.LayerView}
36 */ 36 */
37 WebInspector.Layers3DView = function(layerViewHost) 37 WebInspector.Layers3DView = function(layerViewHost)
38 { 38 {
39 WebInspector.VBox.call(this); 39 WebInspector.VBox.call(this);
40 this.element.classList.add("layers-3d-view"); 40 this.element.classList.add("layers-3d-view");
41 this._emptyView = new WebInspector.EmptyView(WebInspector.UIString("Layer in formation is not yet available.")); 41 this._emptyWidget = new WebInspector.EmptyWidget(WebInspector.UIString("Laye r information is not yet available."));
42 42
43 this._layerViewHost = layerViewHost; 43 this._layerViewHost = layerViewHost;
44 this._layerViewHost.registerView(this); 44 this._layerViewHost.registerView(this);
45 45
46 this._transformController = new WebInspector.TransformController(this.elemen t); 46 this._transformController = new WebInspector.TransformController(this.elemen t);
47 this._transformController.addEventListener(WebInspector.TransformController. Events.TransformChanged, this._update, this); 47 this._transformController.addEventListener(WebInspector.TransformController. Events.TransformChanged, this._update, this);
48 this._initToolbar(); 48 this._initToolbar();
49 49
50 this._canvasElement = this.element.createChild("canvas"); 50 this._canvasElement = this.element.createChild("canvas");
51 this._canvasElement.tabIndex = 0; 51 this._canvasElement.tabIndex = 0;
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 this._drawRectangle(vertices, this._gl.LINE_LOOP, rect.borderColor); 637 this._drawRectangle(vertices, this._gl.LINE_LOOP, rect.borderColor);
638 }, 638 },
639 639
640 _update: function() 640 _update: function()
641 { 641 {
642 if (!this.isShowing()) { 642 if (!this.isShowing()) {
643 this._needsUpdate = true; 643 this._needsUpdate = true;
644 return; 644 return;
645 } 645 }
646 if (!this._layerTree || !this._layerTree.root()) { 646 if (!this._layerTree || !this._layerTree.root()) {
647 this._emptyView.show(this.element); 647 this._emptyWidget.show(this.element);
648 return; 648 return;
649 } 649 }
650 this._emptyView.detach(); 650 this._emptyWidget.detach();
651 651
652 var gl = this._initGLIfNecessary(); 652 var gl = this._initGLIfNecessary();
653 this._resizeCanvas(); 653 this._resizeCanvas();
654 this._calculateDepthsAndVisibility(); 654 this._calculateDepthsAndVisibility();
655 this._calculateRects(); 655 this._calculateRects();
656 this._updateTransformAndConstraints(); 656 this._updateTransformAndConstraints();
657 657
658 this._textureManager.setScale(Number.constrain(0.1, 1, this._scale)); 658 this._textureManager.setScale(Number.constrain(0.1, 1, this._scale));
659 gl.viewport(0, 0, gl.viewportWidth, gl.viewportHeight); 659 gl.viewport(0, 0, gl.viewportWidth, gl.viewportHeight);
660 gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); 660 gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
1069 */ 1069 */
1070 WebInspector.LayerTextureManager.Tile = function(snapshot, rect, traceEvent) 1070 WebInspector.LayerTextureManager.Tile = function(snapshot, rect, traceEvent)
1071 { 1071 {
1072 this.snapshot = snapshot; 1072 this.snapshot = snapshot;
1073 this.rect = rect; 1073 this.rect = rect;
1074 this.traceEvent = traceEvent; 1074 this.traceEvent = traceEvent;
1075 this.scale = 0; 1075 this.scale = 0;
1076 /** @type {?WebGLTexture} */ 1076 /** @type {?WebGLTexture} */
1077 this.texture = null; 1077 this.texture = null;
1078 } 1078 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/timeline/LayerDetailsView.js ('k') | Source/devtools/front_end/timeline/TimelineFlameChart.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698