blob: 8ecfe120a950cdbacf56fff77773da1405f9cb11 [file] [log] [blame]
[email protected]c1372a62014-05-21 19:42:311# 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
5import("//build/config/ui.gni")
6import("//third_party/protobuf/proto_library.gni")
7
brettw542f7532015-04-06 22:35:458group("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 Labour95431c62017-12-19 17:02:2820group("gles2") {
21 if (is_component_build) {
22 public_deps = [
Antoine Labour83a0aed12018-01-10 04:52:3823 "//gpu:gles2",
Antoine Labour95431c62017-12-19 17:02:2824 ]
25 } else {
26 public_deps = [
27 ":gles2_sources",
28 ]
29 }
30}
31
brucedawson6e53a2e12016-07-23 19:35:4732if (is_component_build) {
33 link_target_type = "source_set"
34} else {
35 link_target_type = "static_library"
36}
37target(link_target_type, "service_sources") {
brettwb78fc9e2016-03-25 21:02:5138 # 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/*" ]
brettw542f7532015-04-06 22:35:4541
[email protected]c1372a62014-05-21 19:42:3142 sources = [
Antoine Laboure0990c1c2017-05-17 21:05:5643 "async_api_interface.h",
Antoine Labour83a0aed12018-01-10 04:52:3844 "command_buffer_direct.cc",
45 "command_buffer_direct.h",
Antoine Labour95431c62017-12-19 17:02:2846 "command_buffer_service.cc",
47 "command_buffer_service.h",
48 "common_decoder.cc",
49 "common_decoder.h",
Antoine Labour83a0aed12018-01-10 04:52:3850 "decoder_client.h",
Antoine Labour95431c62017-12-19 17:02:2851 "gpu_switches.cc",
52 "gpu_switches.h",
53 "image_factory.cc",
54 "image_factory.h",
55 "image_manager.cc",
56 "image_manager.h",
Antoine Labour40b0ca42018-01-03 20:15:3457 "mailbox_manager.h",
Antoine Labour95431c62017-12-19 17:02:2858 "memory_tracking.h",
59 "scheduler.cc",
60 "scheduler.h",
61 "sequence_id.h",
62 "sync_point_manager.cc",
63 "sync_point_manager.h",
Antoine Labour40b0ca42018-01-03 20:15:3464 "texture_base.cc",
65 "texture_base.h",
Antoine Labour95431c62017-12-19 17:02:2866 "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 Labour95431c62017-12-19 17:02:2887 "//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
99target(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]00c8a6c2018-06-05 02:22:41106 "abstract_texture.h",
[email protected]c1372a62014-05-21 19:42:31107 "buffer_manager.cc",
satoruxc5bd7a32015-02-18 01:54:52108 "buffer_manager.h",
geofflang851a4812016-09-14 19:20:29109 "client_service_map.h",
[email protected]c1372a62014-05-21 19:42:31110 "context_group.cc",
satoruxc5bd7a32015-02-18 01:54:52111 "context_group.h",
112 "context_state.cc",
[email protected]c1372a62014-05-21 19:42:31113 "context_state.h",
114 "context_state_autogen.h",
115 "context_state_impl_autogen.h",
Jonathan Backer1d807a42018-01-08 20:45:54116 "decoder_context.h",
[email protected]c1372a62014-05-21 19:42:31117 "error_state.cc",
118 "error_state.h",
[email protected]c1372a62014-05-21 19:42:31119 "feature_info.cc",
satoruxc5bd7a32015-02-18 01:54:52120 "feature_info.h",
tobiasjsfc199b472015-08-22 00:39:06121 "framebuffer_completeness_cache.cc",
122 "framebuffer_completeness_cache.h",
[email protected]c1372a62014-05-21 19:42:31123 "framebuffer_manager.cc",
satoruxc5bd7a32015-02-18 01:54:52124 "framebuffer_manager.h",
[email protected]c1372a62014-05-21 19:42:31125 "gl_context_virtual.cc",
126 "gl_context_virtual.h",
127 "gl_state_restorer_impl.cc",
128 "gl_state_restorer_impl.h",
junov0cad1f42016-01-07 21:48:51129 "gl_utils.cc",
[email protected]c1372a62014-05-21 19:42:31130 "gl_utils.h",
adrian.belgun8a992f12016-06-17 16:29:05131 "gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc",
132 "gles2_cmd_apply_framebuffer_attachment_cmaa_intel.h",
satoruxc5bd7a32015-02-18 01:54:52133 "gles2_cmd_clear_framebuffer.cc",
134 "gles2_cmd_clear_framebuffer.h",
geofflangb205ab62016-06-13 21:24:44135 "gles2_cmd_copy_tex_image.cc",
136 "gles2_cmd_copy_tex_image.h",
satoruxc5bd7a32015-02-18 01:54:52137 "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",
geofflang6aa8dd22016-05-24 21:35:33142 "gles2_cmd_decoder_passthrough.cc",
143 "gles2_cmd_decoder_passthrough.h",
geofflangd00f0b22016-06-03 16:34:29144 "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.hefd791692016-09-18 07:27:05148 "gles2_cmd_srgb_converter.cc",
149 "gles2_cmd_srgb_converter.h",
satoruxc5bd7a32015-02-18 01:54:52150 "gles2_cmd_validation.cc",
151 "gles2_cmd_validation.h",
152 "gles2_cmd_validation_autogen.h",
153 "gles2_cmd_validation_implementation_autogen.h",
Jonathan Backer016bd97e2018-03-14 15:26:39154 "gles2_query_manager.cc",
155 "gles2_query_manager.h",
Klaus Weidnere66cc7d2017-12-09 17:26:30156 "gpu_fence_manager.cc",
157 "gpu_fence_manager.h",
[email protected]c1372a62014-05-21 19:42:31158 "gpu_state_tracer.cc",
159 "gpu_state_tracer.h",
satoruxc5bd7a32015-02-18 01:54:52160 "gpu_tracer.cc",
161 "gpu_tracer.h",
[email protected]c1372a62014-05-21 19:42:31162 "id_manager.cc",
satoruxc5bd7a32015-02-18 01:54:52163 "id_manager.h",
zmo6c468ba2016-05-04 20:00:51164 "indexed_buffer_binding_host.cc",
165 "indexed_buffer_binding_host.h",
[email protected]c1372a62014-05-21 19:42:31166 "logger.cc",
167 "logger.h",
Antoine Labour40b0ca42018-01-03 20:15:34168 "mailbox_manager_factory.cc",
169 "mailbox_manager_factory.h",
sieversb727d532014-10-24 19:11:34170 "mailbox_manager_impl.cc",
171 "mailbox_manager_impl.h",
172 "mailbox_manager_sync.cc",
173 "mailbox_manager_sync.h",
[email protected]c1372a62014-05-21 19:42:31174 "memory_program_cache.cc",
satoruxc5bd7a32015-02-18 01:54:52175 "memory_program_cache.h",
Ted Meyer110bd3e2018-06-26 02:14:15176 "passthrough_abstract_texture_impl.cc",
177 "passthrough_abstract_texture_impl.h",
Jamie Madill2d47d482017-07-28 15:23:24178 "passthrough_program_cache.cc",
179 "passthrough_program_cache.h",
kkinnunenb959a8462015-07-14 11:08:34180 "path_manager.cc",
181 "path_manager.h",
[email protected]c1372a62014-05-21 19:42:31182 "program_cache.cc",
satoruxc5bd7a32015-02-18 01:54:52183 "program_cache.h",
184 "program_manager.cc",
185 "program_manager.h",
186 "query_manager.cc",
187 "query_manager.h",
Jonathan Backer9267bf1ec2018-03-06 19:56:50188 "raster_cmd_validation.cc",
189 "raster_cmd_validation.h",
190 "raster_cmd_validation_autogen.h",
191 "raster_cmd_validation_implementation_autogen.h",
Jonathan Backer7f90dfb662017-12-18 16:52:04192 "raster_decoder.cc",
193 "raster_decoder.h",
satoruxc5bd7a32015-02-18 01:54:52194 "renderbuffer_manager.cc",
195 "renderbuffer_manager.h",
bajones5141d032015-12-07 21:13:39196 "sampler_manager.cc",
197 "sampler_manager.h",
ericrkdc5eeaa2017-05-19 02:23:50198 "service_discardable_manager.cc",
199 "service_discardable_manager.h",
Khushala8d50642018-05-03 01:29:06200 "service_font_manager.cc",
201 "service_font_manager.h",
Eric Karl16711ec2017-11-18 00:58:11202 "service_transfer_cache.cc",
203 "service_transfer_cache.h",
geofflangdf7fff2d42016-11-11 00:34:03204 "service_utils.cc",
205 "service_utils.h",
[email protected]c1372a62014-05-21 19:42:31206 "shader_manager.cc",
satoruxc5bd7a32015-02-18 01:54:52207 "shader_manager.h",
[email protected]c1372a62014-05-21 19:42:31208 "shader_translator.cc",
satoruxc5bd7a32015-02-18 01:54:52209 "shader_translator.h",
[email protected]c1372a62014-05-21 19:42:31210 "shader_translator_cache.cc",
satoruxc5bd7a32015-02-18 01:54:52211 "shader_translator_cache.h",
[email protected]c1372a62014-05-21 19:42:31212 "texture_definition.cc",
satoruxc5bd7a32015-02-18 01:54:52213 "texture_definition.h",
[email protected]c1372a62014-05-21 19:42:31214 "texture_manager.cc",
satoruxc5bd7a32015-02-18 01:54:52215 "texture_manager.h",
zmo6c468ba2016-05-04 20:00:51216 "transform_feedback_manager.cc",
217 "transform_feedback_manager.h",
[email protected]00c8a6c2018-06-05 02:22:41218 "validating_abstract_texture_impl.cc",
219 "validating_abstract_texture_impl.h",
[email protected]c1372a62014-05-21 19:42:31220 "vertex_array_manager.cc",
satoruxc5bd7a32015-02-18 01:54:52221 "vertex_array_manager.h",
[email protected]c1372a62014-05-21 19:42:31222 "vertex_attrib_manager.cc",
satoruxc5bd7a32015-02-18 01:54:52223 "vertex_attrib_manager.h",
[email protected]c1372a62014-05-21 19:42:31224 ]
225
brettw8f2fd172015-03-16 22:14:18226 configs += [
brettwbc8b2a22015-07-28 18:24:42227 "//build/config:precompiled_headers",
Antoine Labour83a0aed12018-01-10 04:52:38228 "//gpu:gpu_gles2_implementation",
Khushal8a9bb7e2018-06-15 00:33:11229 "//gpu:raster_implementation",
brettw8f2fd172015-03-16 22:14:18230 "//third_party/khronos:khronos_headers",
231 ]
[email protected]c1372a62014-05-21 19:42:31232
ckocagilfc8d7f232014-09-30 19:31:43233 # Prefer mesa GL headers to system headers, which cause problems on Win.
234 include_dirs = [ "//third_party/mesa/src/include" ]
235
brettw7dab582e2014-09-20 01:44:11236 public_deps = [
Antoine Labour83a0aed12018-01-10 04:52:38237 "//gpu/command_buffer/common",
Antoine Labour95431c62017-12-19 17:02:28238 "//gpu/command_buffer/common:gles2_sources",
Jonathan Backer9267bf1ec2018-03-06 19:56:50239 "//gpu/command_buffer/common:raster_sources",
brettw7dab582e2014-09-20 01:44:11240 ]
[email protected]c1372a62014-05-21 19:42:31241 deps = [
242 ":disk_cache_proto",
Antoine Labour83a0aed12018-01-10 04:52:38243 ":service",
[email protected]c1372a62014-05-21 19:42:31244 "//base",
245 "//base/third_party/dynamic_annotations",
Adrienne Walker436a7752017-08-28 23:33:09246 "//cc/paint",
Antoine Labour83a0aed12018-01-10 04:52:38247 "//gpu/command_buffer/client",
brettw09039c12016-03-18 03:22:46248 "//gpu/command_buffer/common:gles2_utils",
Antoine Labour83a0aed12018-01-10 04:52:38249 "//gpu/config",
sadrul763bd592016-09-27 14:33:44250 "//gpu/ipc/common:surface_handle_type",
geofflang398fb212016-07-13 16:27:42251 "//third_party/angle:angle_image_util",
jmadilldc26192a2015-08-04 12:44:16252 "//third_party/angle:commit_id",
[email protected]d5ba08c2014-06-18 07:01:08253 "//third_party/angle:translator",
[email protected]c1372a62014-05-21 19:42:31254 "//third_party/protobuf:protobuf_lite",
255 "//third_party/re2",
256 "//third_party/smhasher:cityhash",
Eric Karld625a732017-08-03 22:47:31257 "//third_party/zlib",
[email protected]c1372a62014-05-21 19:42:31258 "//ui/gfx",
259 "//ui/gfx/geometry",
John Bauman91f2d572017-07-29 00:24:14260 "//ui/gfx/ipc/color",
[email protected]c1372a62014-05-21 19:42:31261 "//ui/gl",
kylechar5b9dec12016-05-16 15:40:57262 "//ui/gl/init",
[email protected]c1372a62014-05-21 19:42:31263 ]
264
jiangj2bd42fd2015-04-18 13:29:06265 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]c1372a62014-05-21 19:42:31273 if (is_android && !is_debug) {
274 # On Android optimize more since this component can be a bottleneck.
brettw4cab0f12015-09-14 21:40:01275 configs -= [ "//build/config/compiler:default_optimization" ]
[email protected]c1372a62014-05-21 19:42:31276 configs += [ "//build/config/compiler:optimize_max" ]
277 }
278}
279
280proto_library("disk_cache_proto") {
scottmg34fb7e52014-12-03 23:27:24281 sources = [
282 "disk_cache_proto.proto",
283 ]
[email protected]c1372a62014-05-21 19:42:31284}