Home | History | Annotate | Download | only in gpu
      1 # Copyright 2014 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 import("//content/content.gni")
      6 
      7 # We don't support x64 prior to Win7 and D3DCompiler_43.dll is not needed on
      8 # Vista+.
      9 need_d3dcompiler = (is_win && cpu_arch == "x86" && directxsdk_exists)
     10 
     11 source_set("gpu") {
     12   visibility = "//content/*"
     13   sources = [
     14     "gpu_main.cc",
     15     "gpu_process.cc",
     16     "gpu_process.h",
     17     "gpu_child_thread.cc",
     18     "gpu_child_thread.h",
     19     "gpu_watchdog_thread.cc",
     20     "gpu_watchdog_thread.h",
     21     "in_process_gpu_thread.cc",
     22     "in_process_gpu_thread.h",
     23   ]
     24 
     25   configs += [ "//content:content_implementation" ]
     26 
     27   deps = [
     28     "//base",
     29     "//content:export",
     30     "//mojo/public/interfaces/service_provider",
     31     "//skia",
     32     "//ui/gl",
     33   ]
     34 
     35   if (is_win) {
     36     configs += [
     37       "//third_party/khronos:khronos_headers",
     38       "//third_party/wtl:wtl_includes",
     39     ]
     40     libs = [ "setupapi.lib" ]
     41     deps += [
     42       "//third_party/angle:libEGL",
     43       "//third_party/angle:libGLESv2",
     44     ]
     45   }
     46 
     47   if (need_d3dcompiler) {
     48     deps += [ ":extract_d3dcompiler" ]
     49   }
     50 
     51   if (is_chromeos && cpu_arch != "arm") {
     52     configs += [ "//third_party/libva/libva_config" ]
     53   }
     54 }
     55 
     56 if (need_d3dcompiler) {
     57   action("extract_d3dcompiler") {
     58     visibility = ":*"
     59     script = "//build/extract_from_cab.py"
     60 
     61     cabfile = "//third_party/directxsdk/files/Redist/Jun2010_D3DCompiler_43_x86.cab"
     62     dllfile = "D3DCompiler_43.dll"
     63 
     64     source_prereqs = [ cabfile ]
     65     outputs = [ "$root_out_dir/$dllfile" ]
     66 
     67     args = [
     68       rebase_path(cabfile, root_build_dir),
     69       dllfile,
     70       rebase_path(root_out_dir, root_build_dir),
     71     ]
     72   }
     73 }
     74