# Copyright (c) 2012 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.


"""
This file defines the configurations in which bench_pictures should be run
on various platforms. The buildbots read these configurations from the
bench_pictures_cfg dictionary. Everything else in this file exists to help in
constructing that dictionary.

This code is executed directly on the buildbot so that convenient things like
variables and loops can be used to avoid unnecessary verbosity. With great power
comes great responsibility; don't put any nasty code here. To reiterate, code in
this file will be directly executed on the build slaves.
"""


import os
import sys


if 'import_path' in globals():
  sys.path.append(import_path)


from bench_pictures_cfg_helper import *


# Default tile sizes
DEFAULT_TILE_X = '256'
DEFAULT_TILE_Y = '256'

# Default viewport size
DEFAULT_VIEWPORT_X = 1000
DEFAULT_VIEWPORT_Y = 1000

# Default scale factor for scaled configs.
DEFAULT_SCALE = 1.1

# Configs to run on most bots
default_configs = [
  # Viewport CPU and GPU
  ViewportBitmapConfig(DEFAULT_VIEWPORT_X, DEFAULT_VIEWPORT_Y),
  ViewportGPUConfig(DEFAULT_VIEWPORT_X, DEFAULT_VIEWPORT_Y),

  # Scaled viewport, CPU and GPU
  ViewportBitmapConfig(DEFAULT_VIEWPORT_X, DEFAULT_VIEWPORT_Y,
                       scale=str(DEFAULT_SCALE)),
  ViewportGPUConfig(DEFAULT_VIEWPORT_X, DEFAULT_VIEWPORT_Y,
                    scale=str(DEFAULT_SCALE)),

  # Record
  RecordConfig(),
  RecordGridConfig(DEFAULT_TILE_X, DEFAULT_TILE_Y),
]

default_no_gpu = [cfg for cfg in default_configs if cfg['config'] != 'gpu']


msaa4 = Config(config='msaa4', viewport=[str(DEFAULT_VIEWPORT_X),
                                         str(DEFAULT_VIEWPORT_Y)])

msaa16 = Config(config='msaa16', viewport=[str(DEFAULT_VIEWPORT_X),
                                           str(DEFAULT_VIEWPORT_Y)])

viewport_angle = Config(config='angle',
                        viewport=[DEFAULT_TILE_X, DEFAULT_TILE_Y])

# This dictionary defines the sets of configs for all platforms. Each config is
# a dictionary of key/value pairs directly corresponding to the command-line
# flags passed to bench_pictures.
bench_pictures_cfg = {
  'angle': [viewport_angle, msaa4],
  'debug': [ViewportBitmapConfig(DEFAULT_VIEWPORT_X, DEFAULT_VIEWPORT_Y)],
  'default': default_configs,
  'no_gpu': default_no_gpu,
  'nexus_s': default_no_gpu,
  'xoom': default_configs,
  'galaxy_nexus': default_configs,
  'nexus_4': default_configs + [msaa4],
  'nexus_7': default_configs,
  'nexus_10': default_configs + [msaa4],
  'razr_i': default_configs + [msaa4],
  'intel_rhb': default_configs + [msaa4],
  'default_msaa16': default_configs + [msaa16],
}
