Home | History | Annotate | Download | only in surface
      1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
      2 # Use of this source code is governed by a BSD-style license that can be
      3 # found in the LICENSE file.
      4 
      5 {
      6   'variables': {
      7     'chromium_code': 1,
      8   },
      9 
     10   'target_defaults': {
     11     'conditions': [
     12       ['use_x11 == 1', {
     13         'include_dirs': [
     14           '<(DEPTH)/third_party/khronos',
     15         ],
     16       }],
     17       # TODO(ncarter): Does hlsl compilation belong in a shared location?
     18       ['OS == "win"', {
     19         'include_dirs': [
     20           '<(INTERMEDIATE_DIR)/hlsl',
     21         ],
     22         'rules': [
     23           {
     24             'variables': {
     25               'fxc': '<(windows_sdk_path)/bin/x86/fxc.exe',
     26               'h_file': '<(INTERMEDIATE_DIR)/hlsl/<(RULE_INPUT_ROOT)_hlsl_compiled.h',
     27               'cc_file': '<(INTERMEDIATE_DIR)/hlsl/<(RULE_INPUT_ROOT)_hlsl_compiled.cc',
     28             },
     29             'rule_name': 'compile_hlsl',
     30             'extension': 'hlsl',
     31             'inputs': [
     32               '<(fxc)',
     33               'compile_hlsl.py'
     34             ],
     35             'outputs': [
     36               '<(h_file)',
     37               '<(cc_file)',
     38             ],
     39             'action': [
     40               'python',
     41               'compile_hlsl.py',
     42               '--shader_compiler_tool', '<(fxc)',
     43               '--output_h_file', '<(h_file)',
     44               '--output_cc_file', '<(cc_file)',
     45               '--input_hlsl_file', '<(RULE_INPUT_PATH)',
     46             ],
     47             'msvs_cygwin_shell': 0,
     48             'message': 'Generating shaders from <(RULE_INPUT_PATH)',
     49             'process_outputs_as_sources': 1,
     50           },
     51         ],
     52       }],
     53     ],
     54   },
     55   'targets': [
     56     {
     57       'target_name': 'surface',
     58       'type': '<(component)',
     59       'dependencies': [
     60         '<(DEPTH)/base/base.gyp:base',
     61         '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
     62         '<(DEPTH)/media/media.gyp:media',
     63         '<(DEPTH)/skia/skia.gyp:skia',
     64         '<(DEPTH)/ui/events/events.gyp:events_base',
     65         '<(DEPTH)/ui/gfx/gfx.gyp:gfx',
     66         '<(DEPTH)/ui/gl/gl.gyp:gl',
     67         '<(DEPTH)/ui/ui.gyp:ui',
     68       ],
     69       'sources': [
     70         'accelerated_surface_mac.cc',
     71         'accelerated_surface_mac.h',
     72         'accelerated_surface_transformer_win.cc',
     73         'accelerated_surface_transformer_win.h',
     74         'accelerated_surface_transformer_win.hlsl',
     75         'accelerated_surface_win.cc',
     76         'accelerated_surface_win.h',
     77         'd3d9_utils_win.cc',
     78         'd3d9_utils_win.h',
     79         'surface_export.h',
     80         'surface_switches.h',
     81         'surface_switches.cc',
     82         'transport_dib.h',
     83         'transport_dib.cc',
     84         'transport_dib_gtk.cc',
     85         'transport_dib_posix.cc',
     86         'transport_dib_win.cc',
     87       ],
     88       'defines': [
     89         'SURFACE_IMPLEMENTATION',
     90       ],
     91     },
     92   ],
     93   'conditions': [
     94     ['OS == "win"', {
     95       'targets': [
     96         {
     97           'target_name': 'surface_gpu_tests',
     98           'type': '<(gtest_target_type)',
     99           'dependencies': [
    100             '<(DEPTH)/base/base.gyp:base',
    101             '<(DEPTH)/base/base.gyp:run_all_unittests',
    102             '<(DEPTH)/media/media.gyp:media',
    103             '<(DEPTH)/skia/skia.gyp:skia',
    104             '<(DEPTH)/testing/gtest.gyp:gtest',
    105             '<(DEPTH)/ui/events/events.gyp:events_base',
    106             '<(DEPTH)/ui/gfx/gfx.gyp:gfx',
    107             '<(DEPTH)/ui/ui.gyp:ui',
    108             'surface',
    109           ],
    110           'sources': [
    111             'accelerated_surface_transformer_win_unittest.cc',
    112           ],
    113         },
    114       ],
    115     }],
    116   ],
    117 }
    118