[email protected] | c1372a6 | 2014-05-21 19:42:31 | [diff] [blame] | 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("//build/config/ui.gni") |
| 6 | import("//third_party/protobuf/proto_library.gni") |
| 7 | |
brettw | 542f753 | 2015-04-06 22:35:45 | [diff] [blame] | 8 | group("service") { |
| 9 | if (is_component_build) { |
| 10 | public_deps = [ |
| 11 | "//gpu", |
| 12 | ] |
| 13 | } else { |
| 14 | public_deps = [ |
| 15 | ":service_sources", |
| 16 | ] |
| 17 | } |
| 18 | } |
| 19 | |
Antoine Labour | 95431c6 | 2017-12-19 17:02:28 | [diff] [blame] | 20 | group("gles2") { |
| 21 | if (is_component_build) { |
| 22 | public_deps = [ |
Antoine Labour | 83a0aed1 | 2018-01-10 04:52:38 | [diff] [blame] | 23 | "//gpu:gles2", |
Antoine Labour | 95431c6 | 2017-12-19 17:02:28 | [diff] [blame] | 24 | ] |
| 25 | } else { |
| 26 | public_deps = [ |
| 27 | ":gles2_sources", |
| 28 | ] |
| 29 | } |
| 30 | } |
| 31 | |
brucedawson | 6e53a2e1 | 2016-07-23 19:35:47 | [diff] [blame] | 32 | if (is_component_build) { |
| 33 | link_target_type = "source_set" |
| 34 | } else { |
| 35 | link_target_type = "static_library" |
| 36 | } |
| 37 | target(link_target_type, "service_sources") { |
brettw | b78fc9e | 2016-03-25 21:02:51 | [diff] [blame] | 38 | # External code should depend on this via //gpu/command_buffer/service above |
| 39 | # rather than depending on this directly or the component build will break. |
| 40 | visibility = [ "//gpu/*" ] |
brettw | 542f753 | 2015-04-06 22:35:45 | [diff] [blame] | 41 | |
[email protected] | c1372a6 | 2014-05-21 19:42:31 | [diff] [blame] | 42 | sources = [ |
Antoine Labour | e0990c1c | 2017-05-17 21:05:56 | [diff] [blame] | 43 | "async_api_interface.h", |
Antoine Labour | 83a0aed1 | 2018-01-10 04:52:38 | [diff] [blame] | 44 | "command_buffer_direct.cc", |
| 45 | "command_buffer_direct.h", |
Antoine Labour | 95431c6 | 2017-12-19 17:02:28 | [diff] [blame] | 46 | "command_buffer_service.cc", |
| 47 | "command_buffer_service.h", |
| 48 | "common_decoder.cc", |
| 49 | "common_decoder.h", |
Antoine Labour | 83a0aed1 | 2018-01-10 04:52:38 | [diff] [blame] | 50 | "decoder_client.h", |
Antoine Labour | 95431c6 | 2017-12-19 17:02:28 | [diff] [blame] | 51 | "gpu_switches.cc", |
| 52 | "gpu_switches.h", |
| 53 | "image_factory.cc", |
| 54 | "image_factory.h", |
| 55 | "image_manager.cc", |
| 56 | "image_manager.h", |
Antoine Labour | 40b0ca4 | 2018-01-03 20:15:34 | [diff] [blame] | 57 | "mailbox_manager.h", |
Antoine Labour | 95431c6 | 2017-12-19 17:02:28 | [diff] [blame] | 58 | "memory_tracking.h", |
| 59 | "scheduler.cc", |
| 60 | "scheduler.h", |
| 61 | "sequence_id.h", |
| 62 | "sync_point_manager.cc", |
| 63 | "sync_point_manager.h", |
Antoine Labour | 40b0ca4 | 2018-01-03 20:15:34 | [diff] [blame] | 64 | "texture_base.cc", |
| 65 | "texture_base.h", |
Antoine Labour | 95431c6 | 2017-12-19 17:02:28 | [diff] [blame] | 66 | "transfer_buffer_manager.cc", |
| 67 | "transfer_buffer_manager.h", |
| 68 | ] |
| 69 | |
| 70 | configs += [ |
| 71 | # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
| 72 | "//build/config/compiler:no_size_t_to_int_warning", |
| 73 | "//build/config:precompiled_headers", |
| 74 | "//gpu:gpu_implementation", |
| 75 | "//third_party/khronos:khronos_headers", |
| 76 | ] |
| 77 | |
| 78 | public_deps = [ |
| 79 | "//gpu/command_buffer/common:common_sources", |
| 80 | ] |
| 81 | deps = [ |
| 82 | "//base", |
| 83 | "//base/third_party/dynamic_annotations", |
| 84 | "//gpu/command_buffer/client:client_sources", |
| 85 | "//gpu/config:config_sources", |
| 86 | "//gpu/ipc/common:surface_handle_type", |
Antoine Labour | 95431c6 | 2017-12-19 17:02:28 | [diff] [blame] | 87 | "//ui/gfx", |
| 88 | "//ui/gfx/geometry", |
| 89 | "//ui/gl", |
| 90 | ] |
| 91 | |
| 92 | if (is_android && !is_debug) { |
| 93 | # On Android optimize more since this component can be a bottleneck. |
| 94 | configs -= [ "//build/config/compiler:default_optimization" ] |
| 95 | configs += [ "//build/config/compiler:optimize_max" ] |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | target(link_target_type, "gles2_sources") { |
| 100 | # External code should depend on this via //gpu/command_buffer/service:gles2 |
| 101 | # above rather than depending on this directly or the component build will |
| 102 | # break. |
| 103 | visibility = [ "//gpu/*" ] |
| 104 | |
| 105 | sources = [ |
[email protected] | 00c8a6c | 2018-06-05 02:22:41 | [diff] [blame] | 106 | "abstract_texture.h", |
[email protected] | c1372a6 | 2014-05-21 19:42:31 | [diff] [blame] | 107 | "buffer_manager.cc", |
satorux | c5bd7a3 | 2015-02-18 01:54:52 | [diff] [blame] | 108 | "buffer_manager.h", |
geofflang | 851a481 | 2016-09-14 19:20:29 | [diff] [blame] | 109 | "client_service_map.h", |
[email protected] | c1372a6 | 2014-05-21 19:42:31 | [diff] [blame] | 110 | "context_group.cc", |
satorux | c5bd7a3 | 2015-02-18 01:54:52 | [diff] [blame] | 111 | "context_group.h", |
| 112 | "context_state.cc", |
[email protected] | c1372a6 | 2014-05-21 19:42:31 | [diff] [blame] | 113 | "context_state.h", |
| 114 | "context_state_autogen.h", |
| 115 | "context_state_impl_autogen.h", |
Jonathan Backer | 1d807a4 | 2018-01-08 20:45:54 | [diff] [blame] | 116 | "decoder_context.h", |
[email protected] | c1372a6 | 2014-05-21 19:42:31 | [diff] [blame] | 117 | "error_state.cc", |
| 118 | "error_state.h", |
[email protected] | c1372a6 | 2014-05-21 19:42:31 | [diff] [blame] | 119 | "feature_info.cc", |
satorux | c5bd7a3 | 2015-02-18 01:54:52 | [diff] [blame] | 120 | "feature_info.h", |
tobiasjs | fc199b47 | 2015-08-22 00:39:06 | [diff] [blame] | 121 | "framebuffer_completeness_cache.cc", |
| 122 | "framebuffer_completeness_cache.h", |
[email protected] | c1372a6 | 2014-05-21 19:42:31 | [diff] [blame] | 123 | "framebuffer_manager.cc", |
satorux | c5bd7a3 | 2015-02-18 01:54:52 | [diff] [blame] | 124 | "framebuffer_manager.h", |
[email protected] | c1372a6 | 2014-05-21 19:42:31 | [diff] [blame] | 125 | "gl_context_virtual.cc", |
| 126 | "gl_context_virtual.h", |
| 127 | "gl_state_restorer_impl.cc", |
| 128 | "gl_state_restorer_impl.h", |
junov | 0cad1f4 | 2016-01-07 21:48:51 | [diff] [blame] | 129 | "gl_utils.cc", |
[email protected] | c1372a6 | 2014-05-21 19:42:31 | [diff] [blame] | 130 | "gl_utils.h", |
adrian.belgun | 8a992f1 | 2016-06-17 16:29:05 | [diff] [blame] | 131 | "gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc", |
| 132 | "gles2_cmd_apply_framebuffer_attachment_cmaa_intel.h", |
satorux | c5bd7a3 | 2015-02-18 01:54:52 | [diff] [blame] | 133 | "gles2_cmd_clear_framebuffer.cc", |
| 134 | "gles2_cmd_clear_framebuffer.h", |
geofflang | b205ab6 | 2016-06-13 21:24:44 | [diff] [blame] | 135 | "gles2_cmd_copy_tex_image.cc", |
| 136 | "gles2_cmd_copy_tex_image.h", |
satorux | c5bd7a3 | 2015-02-18 01:54:52 | [diff] [blame] | 137 | "gles2_cmd_copy_texture_chromium.cc", |
| 138 | "gles2_cmd_copy_texture_chromium.h", |
| 139 | "gles2_cmd_decoder.cc", |
| 140 | "gles2_cmd_decoder.h", |
| 141 | "gles2_cmd_decoder_autogen.h", |
geofflang | 6aa8dd2 | 2016-05-24 21:35:33 | [diff] [blame] | 142 | "gles2_cmd_decoder_passthrough.cc", |
| 143 | "gles2_cmd_decoder_passthrough.h", |
geofflang | d00f0b2 | 2016-06-03 16:34:29 | [diff] [blame] | 144 | "gles2_cmd_decoder_passthrough_doer_prototypes.h", |
| 145 | "gles2_cmd_decoder_passthrough_doers.cc", |
| 146 | "gles2_cmd_decoder_passthrough_handlers.cc", |
| 147 | "gles2_cmd_decoder_passthrough_handlers_autogen.cc", |
yunchao.he | fd79169 | 2016-09-18 07:27:05 | [diff] [blame] | 148 | "gles2_cmd_srgb_converter.cc", |
| 149 | "gles2_cmd_srgb_converter.h", |
satorux | c5bd7a3 | 2015-02-18 01:54:52 | [diff] [blame] | 150 | "gles2_cmd_validation.cc", |
| 151 | "gles2_cmd_validation.h", |
| 152 | "gles2_cmd_validation_autogen.h", |
| 153 | "gles2_cmd_validation_implementation_autogen.h", |
Jonathan Backer | 016bd97e | 2018-03-14 15:26:39 | [diff] [blame] | 154 | "gles2_query_manager.cc", |
| 155 | "gles2_query_manager.h", |
Klaus Weidner | e66cc7d | 2017-12-09 17:26:30 | [diff] [blame] | 156 | "gpu_fence_manager.cc", |
| 157 | "gpu_fence_manager.h", |
[email protected] | c1372a6 | 2014-05-21 19:42:31 | [diff] [blame] | 158 | "gpu_state_tracer.cc", |
| 159 | "gpu_state_tracer.h", |
satorux | c5bd7a3 | 2015-02-18 01:54:52 | [diff] [blame] | 160 | "gpu_tracer.cc", |
| 161 | "gpu_tracer.h", |
[email protected] | c1372a6 | 2014-05-21 19:42:31 | [diff] [blame] | 162 | "id_manager.cc", |
satorux | c5bd7a3 | 2015-02-18 01:54:52 | [diff] [blame] | 163 | "id_manager.h", |
zmo | 6c468ba | 2016-05-04 20:00:51 | [diff] [blame] | 164 | "indexed_buffer_binding_host.cc", |
| 165 | "indexed_buffer_binding_host.h", |
[email protected] | c1372a6 | 2014-05-21 19:42:31 | [diff] [blame] | 166 | "logger.cc", |
| 167 | "logger.h", |
Antoine Labour | 40b0ca4 | 2018-01-03 20:15:34 | [diff] [blame] | 168 | "mailbox_manager_factory.cc", |
| 169 | "mailbox_manager_factory.h", |
sievers | b727d53 | 2014-10-24 19:11:34 | [diff] [blame] | 170 | "mailbox_manager_impl.cc", |
| 171 | "mailbox_manager_impl.h", |
| 172 | "mailbox_manager_sync.cc", |
| 173 | "mailbox_manager_sync.h", |
[email protected] | c1372a6 | 2014-05-21 19:42:31 | [diff] [blame] | 174 | "memory_program_cache.cc", |
satorux | c5bd7a3 | 2015-02-18 01:54:52 | [diff] [blame] | 175 | "memory_program_cache.h", |
Ted Meyer | 110bd3e | 2018-06-26 02:14:15 | [diff] [blame^] | 176 | "passthrough_abstract_texture_impl.cc", |
| 177 | "passthrough_abstract_texture_impl.h", |
Jamie Madill | 2d47d48 | 2017-07-28 15:23:24 | [diff] [blame] | 178 | "passthrough_program_cache.cc", |
| 179 | "passthrough_program_cache.h", |
kkinnunen | b959a846 | 2015-07-14 11:08:34 | [diff] [blame] | 180 | "path_manager.cc", |
| 181 | "path_manager.h", |
[email protected] | c1372a6 | 2014-05-21 19:42:31 | [diff] [blame] | 182 | "program_cache.cc", |
satorux | c5bd7a3 | 2015-02-18 01:54:52 | [diff] [blame] | 183 | "program_cache.h", |
| 184 | "program_manager.cc", |
| 185 | "program_manager.h", |
| 186 | "query_manager.cc", |
| 187 | "query_manager.h", |
Jonathan Backer | 9267bf1ec | 2018-03-06 19:56:50 | [diff] [blame] | 188 | "raster_cmd_validation.cc", |
| 189 | "raster_cmd_validation.h", |
| 190 | "raster_cmd_validation_autogen.h", |
| 191 | "raster_cmd_validation_implementation_autogen.h", |
Jonathan Backer | 7f90dfb66 | 2017-12-18 16:52:04 | [diff] [blame] | 192 | "raster_decoder.cc", |
| 193 | "raster_decoder.h", |
satorux | c5bd7a3 | 2015-02-18 01:54:52 | [diff] [blame] | 194 | "renderbuffer_manager.cc", |
| 195 | "renderbuffer_manager.h", |
bajones | 5141d03 | 2015-12-07 21:13:39 | [diff] [blame] | 196 | "sampler_manager.cc", |
| 197 | "sampler_manager.h", |
ericrk | dc5eeaa | 2017-05-19 02:23:50 | [diff] [blame] | 198 | "service_discardable_manager.cc", |
| 199 | "service_discardable_manager.h", |
Khushal | a8d5064 | 2018-05-03 01:29:06 | [diff] [blame] | 200 | "service_font_manager.cc", |
| 201 | "service_font_manager.h", |
Eric Karl | 16711ec | 2017-11-18 00:58:11 | [diff] [blame] | 202 | "service_transfer_cache.cc", |
| 203 | "service_transfer_cache.h", |
geofflang | df7fff2d4 | 2016-11-11 00:34:03 | [diff] [blame] | 204 | "service_utils.cc", |
| 205 | "service_utils.h", |
[email protected] | c1372a6 | 2014-05-21 19:42:31 | [diff] [blame] | 206 | "shader_manager.cc", |
satorux | c5bd7a3 | 2015-02-18 01:54:52 | [diff] [blame] | 207 | "shader_manager.h", |
[email protected] | c1372a6 | 2014-05-21 19:42:31 | [diff] [blame] | 208 | "shader_translator.cc", |
satorux | c5bd7a3 | 2015-02-18 01:54:52 | [diff] [blame] | 209 | "shader_translator.h", |
[email protected] | c1372a6 | 2014-05-21 19:42:31 | [diff] [blame] | 210 | "shader_translator_cache.cc", |
satorux | c5bd7a3 | 2015-02-18 01:54:52 | [diff] [blame] | 211 | "shader_translator_cache.h", |
[email protected] | c1372a6 | 2014-05-21 19:42:31 | [diff] [blame] | 212 | "texture_definition.cc", |
satorux | c5bd7a3 | 2015-02-18 01:54:52 | [diff] [blame] | 213 | "texture_definition.h", |
[email protected] | c1372a6 | 2014-05-21 19:42:31 | [diff] [blame] | 214 | "texture_manager.cc", |
satorux | c5bd7a3 | 2015-02-18 01:54:52 | [diff] [blame] | 215 | "texture_manager.h", |
zmo | 6c468ba | 2016-05-04 20:00:51 | [diff] [blame] | 216 | "transform_feedback_manager.cc", |
| 217 | "transform_feedback_manager.h", |
[email protected] | 00c8a6c | 2018-06-05 02:22:41 | [diff] [blame] | 218 | "validating_abstract_texture_impl.cc", |
| 219 | "validating_abstract_texture_impl.h", |
[email protected] | c1372a6 | 2014-05-21 19:42:31 | [diff] [blame] | 220 | "vertex_array_manager.cc", |
satorux | c5bd7a3 | 2015-02-18 01:54:52 | [diff] [blame] | 221 | "vertex_array_manager.h", |
[email protected] | c1372a6 | 2014-05-21 19:42:31 | [diff] [blame] | 222 | "vertex_attrib_manager.cc", |
satorux | c5bd7a3 | 2015-02-18 01:54:52 | [diff] [blame] | 223 | "vertex_attrib_manager.h", |
[email protected] | c1372a6 | 2014-05-21 19:42:31 | [diff] [blame] | 224 | ] |
| 225 | |
brettw | 8f2fd17 | 2015-03-16 22:14:18 | [diff] [blame] | 226 | configs += [ |
brettw | bc8b2a2 | 2015-07-28 18:24:42 | [diff] [blame] | 227 | "//build/config:precompiled_headers", |
Antoine Labour | 83a0aed1 | 2018-01-10 04:52:38 | [diff] [blame] | 228 | "//gpu:gpu_gles2_implementation", |
Khushal | 8a9bb7e | 2018-06-15 00:33:11 | [diff] [blame] | 229 | "//gpu:raster_implementation", |
brettw | 8f2fd17 | 2015-03-16 22:14:18 | [diff] [blame] | 230 | "//third_party/khronos:khronos_headers", |
| 231 | ] |
[email protected] | c1372a6 | 2014-05-21 19:42:31 | [diff] [blame] | 232 | |
ckocagil | fc8d7f23 | 2014-09-30 19:31:43 | [diff] [blame] | 233 | # Prefer mesa GL headers to system headers, which cause problems on Win. |
| 234 | include_dirs = [ "//third_party/mesa/src/include" ] |
| 235 | |
brettw | 7dab582e | 2014-09-20 01:44:11 | [diff] [blame] | 236 | public_deps = [ |
Antoine Labour | 83a0aed1 | 2018-01-10 04:52:38 | [diff] [blame] | 237 | "//gpu/command_buffer/common", |
Antoine Labour | 95431c6 | 2017-12-19 17:02:28 | [diff] [blame] | 238 | "//gpu/command_buffer/common:gles2_sources", |
Jonathan Backer | 9267bf1ec | 2018-03-06 19:56:50 | [diff] [blame] | 239 | "//gpu/command_buffer/common:raster_sources", |
brettw | 7dab582e | 2014-09-20 01:44:11 | [diff] [blame] | 240 | ] |
[email protected] | c1372a6 | 2014-05-21 19:42:31 | [diff] [blame] | 241 | deps = [ |
| 242 | ":disk_cache_proto", |
Antoine Labour | 83a0aed1 | 2018-01-10 04:52:38 | [diff] [blame] | 243 | ":service", |
[email protected] | c1372a6 | 2014-05-21 19:42:31 | [diff] [blame] | 244 | "//base", |
| 245 | "//base/third_party/dynamic_annotations", |
Adrienne Walker | 436a775 | 2017-08-28 23:33:09 | [diff] [blame] | 246 | "//cc/paint", |
Antoine Labour | 83a0aed1 | 2018-01-10 04:52:38 | [diff] [blame] | 247 | "//gpu/command_buffer/client", |
brettw | 09039c1 | 2016-03-18 03:22:46 | [diff] [blame] | 248 | "//gpu/command_buffer/common:gles2_utils", |
Antoine Labour | 83a0aed1 | 2018-01-10 04:52:38 | [diff] [blame] | 249 | "//gpu/config", |
sadrul | 763bd59 | 2016-09-27 14:33:44 | [diff] [blame] | 250 | "//gpu/ipc/common:surface_handle_type", |
geofflang | 398fb21 | 2016-07-13 16:27:42 | [diff] [blame] | 251 | "//third_party/angle:angle_image_util", |
jmadill | dc26192a | 2015-08-04 12:44:16 | [diff] [blame] | 252 | "//third_party/angle:commit_id", |
[email protected] | d5ba08c | 2014-06-18 07:01:08 | [diff] [blame] | 253 | "//third_party/angle:translator", |
[email protected] | c1372a6 | 2014-05-21 19:42:31 | [diff] [blame] | 254 | "//third_party/protobuf:protobuf_lite", |
| 255 | "//third_party/re2", |
| 256 | "//third_party/smhasher:cityhash", |
Eric Karl | d625a73 | 2017-08-03 22:47:31 | [diff] [blame] | 257 | "//third_party/zlib", |
[email protected] | c1372a6 | 2014-05-21 19:42:31 | [diff] [blame] | 258 | "//ui/gfx", |
| 259 | "//ui/gfx/geometry", |
John Bauman | 91f2d57 | 2017-07-29 00:24:14 | [diff] [blame] | 260 | "//ui/gfx/ipc/color", |
[email protected] | c1372a6 | 2014-05-21 19:42:31 | [diff] [blame] | 261 | "//ui/gl", |
kylechar | 5b9dec1 | 2016-05-16 15:40:57 | [diff] [blame] | 262 | "//ui/gl/init", |
[email protected] | c1372a6 | 2014-05-21 19:42:31 | [diff] [blame] | 263 | ] |
| 264 | |
jiangj | 2bd42fd | 2015-04-18 13:29:06 | [diff] [blame] | 265 | if (is_mac) { |
| 266 | # Required by gles2_cmd_decoder.cc on Mac. |
| 267 | libs = [ |
| 268 | "IOSurface.framework", |
| 269 | "OpenGL.framework", |
| 270 | ] |
| 271 | } |
| 272 | |
[email protected] | c1372a6 | 2014-05-21 19:42:31 | [diff] [blame] | 273 | if (is_android && !is_debug) { |
| 274 | # On Android optimize more since this component can be a bottleneck. |
brettw | 4cab0f1 | 2015-09-14 21:40:01 | [diff] [blame] | 275 | configs -= [ "//build/config/compiler:default_optimization" ] |
[email protected] | c1372a6 | 2014-05-21 19:42:31 | [diff] [blame] | 276 | configs += [ "//build/config/compiler:optimize_max" ] |
| 277 | } |
| 278 | } |
| 279 | |
| 280 | proto_library("disk_cache_proto") { |
scottmg | 34fb7e5 | 2014-12-03 23:27:24 | [diff] [blame] | 281 | sources = [ |
| 282 | "disk_cache_proto.proto", |
| 283 | ] |
[email protected] | c1372a6 | 2014-05-21 19:42:31 | [diff] [blame] | 284 | } |