| Index: tracing/tracing/extras/chrome/cc/animation.html
|
| diff --git a/tracing/tracing/extras/chrome/cc/animation.html b/tracing/tracing/extras/chrome/cc/animation.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..93c37a9ea0f6189b3b862aa6b0c8820cc918afa4
|
| --- /dev/null
|
| +++ b/tracing/tracing/extras/chrome/cc/animation.html
|
| @@ -0,0 +1,59 @@
|
| +<!DOCTYPE html>
|
| +<!--
|
| +Copyright (c) 2013 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.
|
| +-->
|
| +
|
| +<link rel="import" href="/tracing/extras/chrome/chrome_model_helper.html">
|
| +<link rel="import" href="/tracing/model/async_slice.html">
|
| +<link rel="import" href="/tracing/model/event_set.html">
|
| +
|
| +<script>
|
| +'use strict';
|
| +
|
| +tr.exportTo('tr.e.cc', function() {
|
| + function Animation() {
|
| + tr.model.AsyncSlice.apply(this, arguments);
|
| + this.associatedEvents_ = undefined;
|
| + }
|
| +
|
| + Animation.prototype = {
|
| + __proto__: tr.model.AsyncSlice.prototype,
|
| +
|
| + get associatedEvents() {
|
| + if (!this.associatedEvents_)
|
| + this.findAssociatedEvents_();
|
| + return this.associatedEvents_;
|
| + },
|
| +
|
| + findAssociatedEvents_: function() {
|
| + this.associatedEvents_ = new tr.model.EventSet();
|
| + var modelIndices = this.startThread.parent.model.modelIndices;
|
| + var flowEvents = modelIndices.getFlowEventsWithId(this.id);
|
| +
|
| + if (flowEvents.length === 0)
|
| + return;
|
| +
|
| + flowEvents.forEach(function(flowEvent) {
|
| + this.associatedEvents_.push(flowEvent);
|
| + if (flowEvent.startSlice)
|
| + this.associatedEvents_.addEventSet(
|
| + flowEvent.startSlice.entireHierarchy);
|
| + if (flowEvent.endSlice)
|
| + this.associatedEvents_.addEventSet(
|
| + flowEvent.endSlice.entireHierarchy);
|
| + }, this);
|
| + }
|
| + };
|
| +
|
| + tr.model.AsyncSlice.register(Animation, {
|
| + typeNames: ['Animation'],
|
| + categoryParts: ['blink.animations']
|
| + });
|
| +
|
| + return {
|
| + Animation: Animation
|
| + };
|
| +});
|
| +</script>
|
|
|