Demo/bin/Debug/front_end/timeline/TimelinePaintProfilerView.js
(开头部分) 7KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/**
* @constructor
* @param {!WebInspector.TracingTimelineFrameModel} frameModel
* @extends {WebInspector.SplitWidget}
*/
WebInspector.TimelinePaintProfilerView = function(frameModel)
{
WebInspector.SplitWidget.call(this, false, false);
this.element.classList.add("timeline-paint-profiler-view");
this.setSidebarSize(60);
this.setResizable(false);
this._frameModel = frameModel;
this._logAndImageSplitWidget = new WebInspector.SplitWidget(true, false);
this._logAndImageSplitWidget.element.classList.add("timeline-paint-profiler-log-split");
this.setMainWidget(this._logAndImageSplitWidget);
this._imageView = new WebInspector.TimelinePaintImageView();
this._logAndImageSplitWidget.setMainWidget(this._imageView);
this._paintProfilerView = new WebInspector.PaintProfilerView(this._imageView.showImage.bind(this._imageView));
this._paintProfilerView.addEventListener(WebInspector.PaintProfilerView.Events.WindowChanged, this._onWindowChanged, this);
this.setSidebarWidget(this._paintProfilerView);
this._logTreeView = new WebInspector.PaintProfilerCommandLogView();
this._logAndImageSplitWidget.setSidebarWidget(this._logTreeView);
}
WebInspector.TimelinePaintProfilerView.prototype = {
wasShown: function()
{
if (this._updateWhenVisible) {
this._updateWhenVisible = false;
this._update();
}
},
/**
* @param {!WebInspector.Target} target
* @param {!WebInspector.TracingModel.Event} event
* @return {boolean}
*/
setEvent: function(target, event)
{
this._disposeSnapshot();
this._target = target;
this._event = event;
if (this.isShowing())
this._update();
else
this._updateWhenVisible = true;
if (this._event.name === WebInspector.TimelineModel.RecordType.Paint)
return !!event.picture;
if (this._event.name === WebInspector.TimelineModel.RecordType.RasterTask)
return this._frameModel.hasRasterTile(this._event);
后面还有 152 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。