-->
<link rel="import" href="/tracing/analysis/generic_object_view.html">
-<link rel="import" href="/tracing/analysis/analyze_selection.html">
-<link rel="import" href="/tracing/analysis/analysis_results.html">
+
<script>
'use strict';
throw new Error('Not implemented');
},
- /**
- * If the selected item(s) is visible on the pending tree in a way that
- * should be highlighted, returns the quad for the item on the pending tree.
- * Otherwise, returns undefined.
- */
- get quadIfPending() {
- throw new Error('Not implemented');
- },
- /**
- * If the selected item(s) is visible on the active tree in a way that
- * should be highlighted, returns the quad for the item on the active tree.
- * Otherwise, returns undefined.
- */
- get quadIfActive() {
- throw new Error('Not implemented');
- },
-
- /**
- * A stable string describing what is selected. Used to determine a stable
- * color of the highlight quads for this selection.
- */
- get title() {
- throw new Error('Not implemented');
+ get highlightsByLayerId() {
+ return {};
},
/**
return undefined;
},
- get quadIfPending() {
- return undefined;
- },
-
- get quadIfActive() {
- return undefined;
- },
-
get layer() {
return this.layer_;
},
return this.tile_.layerId;
},
- get layerRect() {
- return this.tile_.layerRect;
+ get highlightsByLayerId() {
+ var highlights = {}
+ highlights[this.tile_.layerId] = [
+ {
+ colorKey: this.tile_.objectInstance.typeName,
+ rect: this.tile_.layerRect
+ }
+ ];
+ return highlights;
},
createAnalysis: function() {
return analysis;
},
- get title() {
- return this.tile_.objectInstance.typeName;
- },
-
findEquivalent: function(lthi) {
var tileInstance = this.tile_.tileInstance;
if (lthi.ts < tileInstance.creationTs ||
return this.layer_.layerId;
},
- get layerRect() {
- return this.rect_;
+
+ get highlightsByLayerId() {
+ var highlights = {}
+ highlights[this.layer_.layerId] = [
+ {
+ colorKey: this.rectType_,
+ rect: this.rect_
+ }
+ ];
+ return highlights;
},
createAnalysis: function() {
return analysis;
},
- get title() {
- return this.rectType_;
- },
-
findEquivalent: function(lthi) {
return undefined;
}
analysis.label = 'Animation Bounds of layer ' + this.layer_.layerId;
analysis.object = this.rect_;
return analysis;
- },
-
- get title() {
- return 'AnimationRectSelection';
- }
- };
-
- /**
- * @constructor
- */
- function RasterTaskSelection(rasterTask) {
- this.rasterTask_ = rasterTask;
- }
-
- RasterTaskSelection.prototype = {
- __proto__: Selection.prototype,
-
- get specicifity() {
- return 3;
- },
-
- get tile() {
- return cc.getTileFromRasterTaskSlice(this.rasterTask_);
- },
-
- get associatedLayerId() {
- return this.tile.layerId;
- },
-
- get layerRect() {
- return this.tile.layerRect;
- },
-
- createAnalysis: function() {
- var sel = new tracing.Selection();
- sel.push(this.rasterTask_);
- var analysis = new tracing.analysis.AnalysisResults();
- tracing.analysis.analyzeSelection(analysis, sel);
- return analysis;
- },
-
- get title() {
- return this.rasterTask_.title;
- },
-
- findEquivalent: function(lthi) {
- // Raster tasks are only valid in one LTHI.
- return undefined;
}
};
TileSelection: TileSelection,
LayerRectSelection: LayerRectSelection,
AnimationRectSelection: AnimationRectSelection,
- RasterTaskSelection: RasterTaskSelection
};
});
</script>