cc: Fix MSAA when threaded GPU rasterization is enabled.
[chromium-blink-merge.git] / chrome / renderer / BUILD.gn
blob4cb703b1b0053912f5a8a9557515bc15b4f00fbe
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.
5 import("//build/config/features.gni")
6 import("//tools/grit/grit_rule.gni")
8 gypi_values = exec_script("//build/gypi_to_gn.py",
9                           [ rebase_path("../chrome_renderer.gypi") ],
10                           "scope",
11                           [ "../chrome_renderer.gypi" ])
13 # GYP version: chrome/chrome_resources.gyp:chrome_resources
14 # (generate_renderer_resources action)
15 grit("resources") {
16   source = "resources/renderer_resources.grd"
17   output_dir = "$root_gen_dir/chrome"
18   output_name = "renderer_resources"
19   outputs = [
20     "grit/renderer_resources.h",
21     "renderer_resources_100_percent.pak",
22     "renderer_resources_200_percent.pak",
23     "renderer_resources_300_percent.pak",
24   ]
27 static_library("renderer") {
28   sources = rebase_path(gypi_values.chrome_renderer_sources, ".", "..")
30   defines = []
32   deps = [
33     "//base/allocator",
34     "//chrome/common",
35     "//chrome/common/net",
36     "//chrome:resources",
37     "//chrome:strings",
38     "//components/autofill/content/renderer",
39     "//components/cdm/renderer",
40     "//components/data_reduction_proxy/core/common",
41     "//components/network_hints/renderer",
42     "//components/error_page/renderer",
43     "//components/password_manager/content/renderer",
44     "//components/plugins/renderer",
45     "//components/printing/renderer:printing_renderer",
46     "//components/startup_metric_utils",
47     "//components/translate/content/renderer",
48     "//components/translate/core/common",
49     "//components/translate/core/language_detection",
50     "//components/visitedlink/renderer",
51     "//components/web_cache/renderer",
52     "//content/app/resources",
53     "//content/app/strings",
54     "//content/public/renderer",
55     "//net",
56     "//skia",
57     "//storage/common",
58     "//third_party/WebKit/public:blink",
59     "//third_party/WebKit/public:resources",
60     "//third_party/icu",
61     "//third_party/npapi",
62     "//third_party/re2",
63     "//third_party/widevine/cdm:version_h",
64     "//ui/surface",
65     "//v8:v8",
66   ]
68   if (enable_nacl) {
69     deps += [
70       #'../components/nacl.gyp:nacl',  TODO(GYP)
71       #'../components/nacl.gyp:nacl_renderer',  TODO(GYP)
72     ]
73   }
75   if (enable_plugins) {
76     sources +=
77         rebase_path(gypi_values.chrome_renderer_plugin_sources, ".", "..")
78     deps += [
79       "//components/pdf/renderer",
80       "//ppapi/host",
81       "//ppapi/proxy",
82       "//ppapi/proxy:ipc",
83       "//ppapi/shared_impl",
84     ]
85   }
87   if (safe_browsing_mode == 1) {
88     sources += rebase_path(gypi_values.chrome_renderer_safe_browsing_sources,
89                            ".",
90                            "..")
91     sources +=
92         rebase_path(gypi_values.chrome_renderer_basic_safe_browsing_sources,
93                     ".",
94                     "..")
95     defines += [ "FULL_SAFE_BROWSING" ]
96     deps += [
97       "//chrome/common/safe_browsing:proto",
98       "//third_party/smhasher:murmurhash3",
99     ]
100   }
101   if (safe_browsing_mode == 2) {
102     sources +=
103         rebase_path(gypi_values.chrome_renderer_basic_safe_browsing_sources,
104                     ".",
105                     "..")
106     defines += [ "MOBILE_SAFE_BROWSING" ]
107   }
109   if (enable_extensions) {
110     sources +=
111         rebase_path(gypi_values.chrome_renderer_extensions_sources, ".", "..")
112     deps += [
113       # TODO(hclam): See crbug.com/298380 for details.
114       # We should isolate the APIs needed by the renderer.
115       "//chrome/common/extensions/api",
116       "//extensions:extensions_resources",
117       "//extensions/renderer",
118       "//media/cast:net",
119       "//media/cast:sender",
120       "//media/cast/logging/proto",
121     ]
122     if (!enable_webrtc) {
123       sources -= [
124         "media/cast_rtp_stream.cc",
125         "media/cast_rtp_stream.h",
126       ]
127     }
128   }
129   if (enable_webrtc) {
130     sources +=
131         rebase_path(gypi_values.chrome_renderer_webrtc_sources, ".", "..")
132   }
133   if (enable_extensions && enable_webrtc) {
134     sources +=
135         rebase_path(gypi_values.chrome_renderer_webrtc_extensions_sources,
136                     ".",
137                     "..")
138   }
139   if (enable_spellcheck) {
140     sources +=
141         rebase_path(gypi_values.chrome_renderer_spellchecker_sources, ".", "..")
142     deps += [ "//third_party/hunspell" ]
143   }
145   if (enable_basic_printing || enable_print_preview) {
146     deps += [ "//printing" ]
147     sources +=
148         rebase_path(gypi_values.chrome_renderer_printing_sources, ".", "..")
149     if (enable_print_preview) {
150       sources += rebase_path(gypi_values.chrome_renderer_full_printing_sources,
151                              ".",
152                              "..")
153     }
154   }
156   if (is_mac) {
157     deps += [ "//third_party/mach_override" ]
158   }
159   if (is_win) {
160     deps += [
161       "//chrome_elf",
162       "//third_party/wtl",
163     ]
164   }
165   if (!is_android) {
166     sources +=
167         rebase_path(gypi_values.chrome_renderer_non_android_sources, ".", "..")
168   }
171 # In GYP this is part of test_support_common.
172 source_set("test_support") {
173   testonly = true
174   visibility = [ "//chrome/test:test_support" ]
176   sources = [
177     "chrome_mock_render_thread.cc",
178     "chrome_mock_render_thread.h",
179     "safe_browsing/mock_feature_extractor_clock.cc",
180     "safe_browsing/mock_feature_extractor_clock.h",
181     "safe_browsing/test_utils.cc",
182     "safe_browsing/test_utils.h",
183   ]
185   deps = [
186     ":renderer",
187     "//content/test:test_support",
188     "//testing/gmock",
189     "//testing/gtest",
190   ]
192   if (enable_print_preview) {
193     deps += [ "//chrome/service" ]
194   }
196   if (enable_webrtc) {
197     sources += [
198       "media/mock_webrtc_logging_message_filter.cc",
199       "media/mock_webrtc_logging_message_filter.h",
200     ]
201   }