// 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.

'use strict';

// A single LTHI sort of manually created from a Google search for cats.
var g_catLTHIEvents = [
  {
    'name': 'cc::Picture',
    'args': {
      'snapshot': {
        'params': {
          'opaque_rect': [
            -15,
            -15,
            0,
            0
          ],
          'layer_rect': [
            -15,
            -15,
            1260,
            1697
          ]
        },
        'skp64': ' ' // @suppress longLineCheck
      }
    },
    'pid': 1,
    'ts': 100,
    'cat': 'disabled-by-default-cc.debug',
    'tid': 1,
    'ph': 'O',
    'id': 'PICTURE_1'
  },
  {
    'name': 'AnalyzeTask',
    'args': {
      'data': {
        'source_frame_number': 107,
        'tile_id': {
          'id_ref': 'TILE_1'
        },
        'resolution': 'HIGH_RESOLUTION',
        'is_tile_in_pending_tree_now_bin': true
      }
    },
    'pid': 1,
    'ts': 101,
    'cat': 'cc',
    'tid': 1,
    'ph': 'B'
  },
  {
    'name': 'AnalyzeTask',
    'args': {},
    'pid': 1,
    'ts': 105,
    'cat': 'cc',
    'tid': 1,
    'ph': 'E'
  },
  {
    'name': 'RasterTask',
    'args': {
      'data': {
        'source_frame_number': 107,
        'tile_id': {
          'id_ref': 'TILE_1'
        },
        'resolution': 'HIGH_RESOLUTION',
        'is_tile_in_pending_tree_now_bin': true
      }
    },
    'pid': 1,
    'ts': 110,
    'cat': 'cc',
    'tid': 1,
    'ph': 'B'
  },
  {
    'name': 'RasterTask',
    'args': {},
    'pid': 1,
    'ts': 150,
    'cat': 'cc',
    'tid': 1,
    'ph': 'E'
  },
  {
    'name': 'RasterTask',
    'args': {
      'data': {
        'source_frame_number': 107,
        'tile_id': {
          'id_ref': 'TILE_2'
        },
        'resolution': 'HIGH_RESOLUTION',
        'is_tile_in_pending_tree_now_bin': true
      }
    },
    'pid': 1,
    'ts': 170,
    'cat': 'cc',
    'tid': 1,
    'ph': 'B'
  },
  {
    'name': 'RasterTask',
    'args': {},
    'pid': 1,
    'ts': 180,
    'cat': 'cc',
    'tid': 1,
    'ph': 'E'
  },
  {
    'name': 'cc::LayerTreeHostImpl',
    'args': {
      'snapshot': {
        'device_viewport_size': {
          'width': 2460,
          'height': 1606
        },
        'active_tree': {
          'source_frame_number': 7,
          'root_layer': {
            'tilings': [
              {
                'content_scale': 2,
                'content_bounds': {
                  'width': 2460,
                  'height': 3334
                },
                'num_tiles': 1
              },
              {
                'content_scale': 0.25,
                'content_bounds': {
                  'width': 308,
                  'height': 417
                },
                'num_tiles': 1
              }
            ],
            'coverage_tiles': [
              {
                'geometry_rect': [0, 0, 256, 256],
                'tile': {
                  'id_ref': 'TILE_1'
                }
              },
              {
                'geometry_rect': [256, 0, 256, 256]
              },
              {
                'geometry_rect': [512, 0, 256, 256]
              },
              {
                'geometry_rect': [0, 256, 256, 512]
              },
              {
                'geometry_rect': [256, 256, 512, 512]
              }
            ],
            'gpu_memory_usage': 22069248,
            'draws_content': 1,
            'layer_id': 6,
            'invalidation': [],
            'bounds': {
              'width': 1230,
              'height': 1667
            },
            'children': [
              {
                'tilings': [
                  {
                    'content_scale': 2,
                    'content_bounds': {
                      'width': 200,
                      'height': 100
                    },
                    'num_tiles': 1
                  }
                ],
                'gpu_memory_usage': 128000,
                'draws_content': 1,
                'layer_id': 7,
                'invalidation': [],
                'bounds': {
                  'width': 100,
                  'height': 50
                },
                'children': [
                ],
                'ideal_contents_scale': 2,
                'layer_quad': [
                  0,
                  0,
                  200,
                  0,
                  200,
                  100,
                  0,
                  100
                ],
                'pictures': [
                ],
                'id': 'cc::PictureLayerImpl/LAYER_2'
              }
            ],
            'ideal_contents_scale': 2,
            'layer_quad': [
              0,
              -1022,
              2460,
              -1022,
              2460,
              2312,
              0,
              2312
            ],
            'pictures': [
              {
                'id_ref': 'PICTURE_1'
              }
            ],
            'id': 'cc::PictureLayerImpl/LAYER_1'
          },
          'render_surface_layer_list': [
            {'id_ref': 'LAYER_1'},
            {'id_ref': 'LAYER_2'}
          ],
          'id': 'cc::LayerTreeImpl/0x7d246ee0'
        },
        'tiles': [
          {
            'active_priority': {
              'time_to_visible_in_seconds': 0,
              'resolution': 'HIGH_RESOLUTION',
              'distance_to_visible_in_pixels': 0
            },
            'pending_priority': {
              'time_to_visible_in_seconds': 3.4028234663852886e+38,
              'resolution': 'NON_IDEAL_RESOLUTION',
              'distance_to_visible_in_pixels': 3.4028234663852886e+38
            },
            'managed_state': {
              'resolution': 'HIGH_RESOLUTION',
              'is_solid_color': false,
              'is_using_gpu_memory': true,
              'has_resource': true,
              'scheduled_priority': 10,
              'distance_to_visible': 0,
              'gpu_memory_usage': 1024000
            },
            'layer_id': '6',
            'picture_pile': {
              'id_ref': 'PICTURE_1'
            },
            'contents_scale': 2,
            'content_rect': [0, 0, 1024, 1024],
            'id': 'cc::Tile/TILE_1'
          },
          {
            'active_priority': {
              'time_to_visible_in_seconds': 0,
              'resolution': 'HIGH_RESOLUTION',
              'distance_to_visible_in_pixels': 0
            },
            'pending_priority': {
              'time_to_visible_in_seconds': 3.4028234663852886e+38,
              'resolution': 'NON_IDEAL_RESOLUTION',
              'distance_to_visible_in_pixels': 3.4028234663852886e+38
            },
            'managed_state': {
              'resolution': 'HIGH_RESOLUTION',
              'is_solid_color': false,
              'is_using_gpu_memory': true,
              'has_resource': true,
              'scheduled_priority': 12,
              'distance_to_visible': 0,
              'gpu_memory_usage': 1024000
            },
            'layer_id': '6',
            'picture_pile': {
              'id_ref': 'PICTURE_1'
            },
            'contents_scale': 2,
            'content_rect': [0, 1024, 1024, 1024],
            'id': 'cc::Tile/TILE_2'
          }
        ]
      }
    },
    'pid': 1,
    'ts': 500,
    'cat': 'disabled-by-default-cc.debug',
    'tid': 28163,
    'ph': 'O',
    'id': 'LTHI_1'
  },
  {
    'name': 'cc::DisplayItemList',
    'args': {
      'snapshot': {
        'params': {
          'layer_rect': [
            -15,
            -15,
            1260,
            1697
          ],
          'items': [
            'BeginClipDisplayItem',
            'EndClipDisplayItem'
          ]
        },
        'skp64': '[base 64 encoded skia picture]'
      }
    },
    'pid': 1,
    'ts': 300,
    'cat': 'disabled-by-default-cc.debug',
    'tid': 1,
    'ph': 'O',
    'id': 'PICTURE_3'
  }
];
