Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / trace-viewer / src / cc / layer_impl.js
index f9b9bce..01d8730 100644 (file)
@@ -4,13 +4,13 @@
 
 'use strict';
 
-base.require('base.rect');
-base.require('cc.constants');
-base.require('cc.region');
-base.require('cc.tile_coverage_rect');
-base.require('tracing.trace_model.object_instance');
+tvcm.require('tvcm.rect');
+tvcm.require('cc.constants');
+tvcm.require('cc.region');
+tvcm.require('cc.tile_coverage_rect');
+tvcm.require('tracing.trace_model.object_instance');
 
-base.exportTo('cc', function() {
+tvcm.exportTo('cc', function() {
   var constants = cc.constants;
   var ObjectSnapshot = tracing.trace_model.ObjectSnapshot;
 
@@ -47,10 +47,17 @@ base.exportTo('cc', function() {
                  'layoutRects']);
 
       // Leave bounds in both places.
-      this.bounds = base.Rect.fromXYWH(
+      this.bounds = tvcm.Rect.fromXYWH(
           0, 0,
           this.args.bounds.width, this.args.bounds.height);
 
+      if (this.args.animationBounds) {
+        // AnimationBounds[2] and [5] are the Z-component of the box.
+        this.animationBounds = tvcm.Rect.fromXYWH(
+            this.args.animationBounds[0], this.args.animationBounds[1],
+            this.args.animationBounds[3], this.args.animationBounds[4]);
+      }
+
       for (var i = 0; i < this.children.length; i++)
         this.children[i].parentLayer = this;
       if (this.maskLayer)