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

Side by Side Diff: Source/devtools/front_end/timeline/Layers3DView.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) 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 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 }, 574 },
575 575
576 _drawViewportAndChrome: function() 576 _drawViewportAndChrome: function()
577 { 577 {
578 var viewport = this._layerTree.viewportSize(); 578 var viewport = this._layerTree.viewportSize();
579 if (!viewport) 579 if (!viewport)
580 return; 580 return;
581 581
582 var drawChrome = this._showChromeSetting.get() && this._chromeTextures.l ength >= 3 && this._chromeTextures.indexOf(undefined) < 0; 582 var drawChrome = this._showChromeSetting.get() && this._chromeTextures.l ength >= 3 && this._chromeTextures.indexOf(undefined) < 0;
583 var z = (this._maxDepth + 1) * WebInspector.Layers3DView.LayerSpacing; 583 var z = (this._maxDepth + 1) * WebInspector.Layers3DView.LayerSpacing;
584 var borderWidth = Math.round(WebInspector.Layers3DView.ViewportBorderWid th * this._scale); 584 var borderWidth = Math.ceil(WebInspector.Layers3DView.ViewportBorderWidt h * this._scale);
585 var vertices = [viewport.width, 0, z, viewport.width, viewport.height, z , 0, viewport.height, z, 0, 0, z]; 585 var vertices = [viewport.width, 0, z, viewport.width, viewport.height, z , 0, viewport.height, z, 0, 0, z];
586 this._gl.lineWidth(borderWidth); 586 this._gl.lineWidth(borderWidth);
587 this._drawRectangle(vertices, drawChrome ? this._gl.LINE_STRIP : this._g l.LINE_LOOP, WebInspector.Layers3DView.ViewportBorderColor); 587 this._drawRectangle(vertices, drawChrome ? this._gl.LINE_STRIP : this._g l.LINE_LOOP, WebInspector.Layers3DView.ViewportBorderColor);
588 588
589 if (!drawChrome) 589 if (!drawChrome)
590 return; 590 return;
591 591
592 var borderAdjustment = WebInspector.Layers3DView.ViewportBorderWidth / 2 ; 592 var borderAdjustment = WebInspector.Layers3DView.ViewportBorderWidth / 2 ;
593 var viewportWidth = this._layerTree.viewportSize().width + 2 * borderAdj ustment; 593 var viewportWidth = this._layerTree.viewportSize().width + 2 * borderAdj ustment;
594 var chromeHeight = this._chromeTextures[0].image.naturalHeight; 594 var chromeHeight = this._chromeTextures[0].image.naturalHeight;
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
1123 */ 1123 */
1124 WebInspector.LayerTextureManager.Tile = function(snapshot, rect, traceEvent) 1124 WebInspector.LayerTextureManager.Tile = function(snapshot, rect, traceEvent)
1125 { 1125 {
1126 this.snapshot = snapshot; 1126 this.snapshot = snapshot;
1127 this.rect = rect; 1127 this.rect = rect;
1128 this.traceEvent = traceEvent; 1128 this.traceEvent = traceEvent;
1129 this.scale = 0; 1129 this.scale = 0;
1130 /** @type {?WebGLTexture} */ 1130 /** @type {?WebGLTexture} */
1131 this.texture = null; 1131 this.texture = null;
1132 } 1132 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/timeline/LayerDetailsView.js ('k') | Source/devtools/front_end/timeline/TimelineLayersView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698