blob: 57b6a35dd3d9518ace7c17390cb174e5794c0725 [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_preferences.cc",
52 "gpu_preferences.h",
53 "gpu_switches.cc",
54 "gpu_switches.h",
55 "image_factory.cc",
56 "image_factory.h",
57 "image_manager.cc",
58 "image_manager.h",
Antoine Labour40b0ca42018-01-03 20:15:3459 "mailbox_manager.h",
Antoine Labour95431c62017-12-19 17:02:2860 "memory_tracking.h",
61 "scheduler.cc",
62 "scheduler.h",
63 "sequence_id.h",
64 "sync_point_manager.cc",
65 "sync_point_manager.h",
Antoine Labour40b0ca42018-01-03 20:15:3466 "texture_base.cc",
67 "texture_base.h",
Antoine Labour95431c62017-12-19 17:02:2868 "transfer_buffer_manager.cc",
69 "transfer_buffer_manager.h",
70 ]
71
72 configs += [
73 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
74 "//build/config/compiler:no_size_t_to_int_warning",
75 "//build/config:precompiled_headers",
76 "//gpu:gpu_implementation",
77 "//third_party/khronos:khronos_headers",
78 ]
79
80 public_deps = [
81 "//gpu/command_buffer/common:common_sources",
82 ]
83 deps = [
84 "//base",
85 "//base/third_party/dynamic_annotations",
86 "//gpu/command_buffer/client:client_sources",
87 "//gpu/config:config_sources",
88 "//gpu/ipc/common:surface_handle_type",
Scott Violeta35f9a42018-03-22 22:00:4489 "//media:media_buildflags",
Antoine Labour95431c62017-12-19 17:02:2890 "//ui/gfx",
91 "//ui/gfx/geometry",
92 "//ui/gl",
93 ]
94
95 if (is_android && !is_debug) {
96 # On Android optimize more since this component can be a bottleneck.
97 configs -= [ "//build/config/compiler:default_optimization" ]
98 configs += [ "//build/config/compiler:optimize_max" ]
99 }
100}
101
102target(link_target_type, "gles2_sources") {
103 # External code should depend on this via //gpu/command_buffer/service:gles2
104 # above rather than depending on this directly or the component build will
105 # break.
106 visibility = [ "//gpu/*" ]
107
108 sources = [
[email protected]c1372a62014-05-21 19:42:31109 "buffer_manager.cc",
satoruxc5bd7a32015-02-18 01:54:52110 "buffer_manager.h",
geofflang851a4812016-09-14 19:20:29111 "client_service_map.h",
[email protected]c1372a62014-05-21 19:42:31112 "context_group.cc",
satoruxc5bd7a32015-02-18 01:54:52113 "context_group.h",
114 "context_state.cc",
[email protected]c1372a62014-05-21 19:42:31115 "context_state.h",
116 "context_state_autogen.h",
117 "context_state_impl_autogen.h",
Jonathan Backer1d807a42018-01-08 20:45:54118 "decoder_context.h",
[email protected]c1372a62014-05-21 19:42:31119 "error_state.cc",
120 "error_state.h",
[email protected]c1372a62014-05-21 19:42:31121 "feature_info.cc",
satoruxc5bd7a32015-02-18 01:54:52122 "feature_info.h",
tobiasjsfc199b472015-08-22 00:39:06123 "framebuffer_completeness_cache.cc",
124 "framebuffer_completeness_cache.h",
[email protected]c1372a62014-05-21 19:42:31125 "framebuffer_manager.cc",
satoruxc5bd7a32015-02-18 01:54:52126 "framebuffer_manager.h",
[email protected]c1372a62014-05-21 19:42:31127 "gl_context_virtual.cc",
128 "gl_context_virtual.h",
129 "gl_state_restorer_impl.cc",
130 "gl_state_restorer_impl.h",
junov0cad1f42016-01-07 21:48:51131 "gl_utils.cc",
[email protected]c1372a62014-05-21 19:42:31132 "gl_utils.h",
adrian.belgun8a992f12016-06-17 16:29:05133 "gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc",
134 "gles2_cmd_apply_framebuffer_attachment_cmaa_intel.h",
satoruxc5bd7a32015-02-18 01:54:52135 "gles2_cmd_clear_framebuffer.cc",
136 "gles2_cmd_clear_framebuffer.h",
geofflangb205ab62016-06-13 21:24:44137 "gles2_cmd_copy_tex_image.cc",
138 "gles2_cmd_copy_tex_image.h",
satoruxc5bd7a32015-02-18 01:54:52139 "gles2_cmd_copy_texture_chromium.cc",
140 "gles2_cmd_copy_texture_chromium.h",
141 "gles2_cmd_decoder.cc",
142 "gles2_cmd_decoder.h",
143 "gles2_cmd_decoder_autogen.h",
geofflang6aa8dd22016-05-24 21:35:33144 "gles2_cmd_decoder_passthrough.cc",
145 "gles2_cmd_decoder_passthrough.h",
geofflangd00f0b22016-06-03 16:34:29146 "gles2_cmd_decoder_passthrough_doer_prototypes.h",
147 "gles2_cmd_decoder_passthrough_doers.cc",
148 "gles2_cmd_decoder_passthrough_handlers.cc",
149 "gles2_cmd_decoder_passthrough_handlers_autogen.cc",
yunchao.hefd791692016-09-18 07:27:05150 "gles2_cmd_srgb_converter.cc",
151 "gles2_cmd_srgb_converter.h",
satoruxc5bd7a32015-02-18 01:54:52152 "gles2_cmd_validation.cc",
153 "gles2_cmd_validation.h",
154 "gles2_cmd_validation_autogen.h",
155 "gles2_cmd_validation_implementation_autogen.h",
Jonathan Backer016bd97e2018-03-14 15:26:39156 "gles2_query_manager.cc",
157 "gles2_query_manager.h",
Klaus Weidnere66cc7d2017-12-09 17:26:30158 "gpu_fence_manager.cc",
159 "gpu_fence_manager.h",
[email protected]c1372a62014-05-21 19:42:31160 "gpu_state_tracer.cc",
161 "gpu_state_tracer.h",
satoruxc5bd7a32015-02-18 01:54:52162 "gpu_tracer.cc",
163 "gpu_tracer.h",
[email protected]c1372a62014-05-21 19:42:31164 "id_manager.cc",
satoruxc5bd7a32015-02-18 01:54:52165 "id_manager.h",
zmo6c468ba2016-05-04 20:00:51166 "indexed_buffer_binding_host.cc",
167 "indexed_buffer_binding_host.h",
[email protected]c1372a62014-05-21 19:42:31168 "logger.cc",
169 "logger.h",
Antoine Labour40b0ca42018-01-03 20:15:34170 "mailbox_manager_factory.cc",
171 "mailbox_manager_factory.h",
sieversb727d532014-10-24 19:11:34172 "mailbox_manager_impl.cc",
173 "mailbox_manager_impl.h",
174 "mailbox_manager_sync.cc",
175 "mailbox_manager_sync.h",
[email protected]c1372a62014-05-21 19:42:31176 "memory_program_cache.cc",
satoruxc5bd7a32015-02-18 01:54:52177 "memory_program_cache.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]c1372a62014-05-21 19:42:31218 "vertex_array_manager.cc",
satoruxc5bd7a32015-02-18 01:54:52219 "vertex_array_manager.h",
[email protected]c1372a62014-05-21 19:42:31220 "vertex_attrib_manager.cc",
satoruxc5bd7a32015-02-18 01:54:52221 "vertex_attrib_manager.h",
[email protected]c1372a62014-05-21 19:42:31222 ]
223
brettw8f2fd172015-03-16 22:14:18224 configs += [
brettwbc8b2a22015-07-28 18:24:42225 "//build/config:precompiled_headers",
Antoine Labour83a0aed12018-01-10 04:52:38226 "//gpu:gpu_gles2_implementation",
brettw8f2fd172015-03-16 22:14:18227 "//third_party/khronos:khronos_headers",
228 ]
[email protected]c1372a62014-05-21 19:42:31229
ckocagilfc8d7f232014-09-30 19:31:43230 # Prefer mesa GL headers to system headers, which cause problems on Win.
231 include_dirs = [ "//third_party/mesa/src/include" ]
232
brettw7dab582e2014-09-20 01:44:11233 public_deps = [
Antoine Labour83a0aed12018-01-10 04:52:38234 "//gpu/command_buffer/common",
Antoine Labour95431c62017-12-19 17:02:28235 "//gpu/command_buffer/common:gles2_sources",
Jonathan Backer9267bf1ec2018-03-06 19:56:50236 "//gpu/command_buffer/common:raster_sources",
brettw7dab582e2014-09-20 01:44:11237 ]
[email protected]c1372a62014-05-21 19:42:31238 deps = [
239 ":disk_cache_proto",
Antoine Labour83a0aed12018-01-10 04:52:38240 ":service",
[email protected]c1372a62014-05-21 19:42:31241 "//base",
242 "//base/third_party/dynamic_annotations",
Adrienne Walker436a7752017-08-28 23:33:09243 "//cc/paint",
Antoine Labour83a0aed12018-01-10 04:52:38244 "//gpu/command_buffer/client",
brettw09039c12016-03-18 03:22:46245 "//gpu/command_buffer/common:gles2_utils",
Antoine Labour83a0aed12018-01-10 04:52:38246 "//gpu/config",
sadrul763bd592016-09-27 14:33:44247 "//gpu/ipc/common:surface_handle_type",
geofflang398fb212016-07-13 16:27:42248 "//third_party/angle:angle_image_util",
jmadilldc26192a2015-08-04 12:44:16249 "//third_party/angle:commit_id",
[email protected]d5ba08c2014-06-18 07:01:08250 "//third_party/angle:translator",
[email protected]c1372a62014-05-21 19:42:31251 "//third_party/protobuf:protobuf_lite",
252 "//third_party/re2",
253 "//third_party/smhasher:cityhash",
Eric Karld625a732017-08-03 22:47:31254 "//third_party/zlib",
[email protected]c1372a62014-05-21 19:42:31255 "//ui/gfx",
256 "//ui/gfx/geometry",
John Bauman91f2d572017-07-29 00:24:14257 "//ui/gfx/ipc/color",
[email protected]c1372a62014-05-21 19:42:31258 "//ui/gl",
kylechar5b9dec12016-05-16 15:40:57259 "//ui/gl/init",
[email protected]c1372a62014-05-21 19:42:31260 ]
261
jiangj2bd42fd2015-04-18 13:29:06262 if (is_mac) {
263 # Required by gles2_cmd_decoder.cc on Mac.
264 libs = [
265 "IOSurface.framework",
266 "OpenGL.framework",
267 ]
268 }
269
[email protected]c1372a62014-05-21 19:42:31270 if (is_android && !is_debug) {
271 # On Android optimize more since this component can be a bottleneck.
brettw4cab0f12015-09-14 21:40:01272 configs -= [ "//build/config/compiler:default_optimization" ]
[email protected]c1372a62014-05-21 19:42:31273 configs += [ "//build/config/compiler:optimize_max" ]
274 }
275}
276
277proto_library("disk_cache_proto") {
scottmg34fb7e52014-12-03 23:27:24278 sources = [
279 "disk_cache_proto.proto",
280 ]
[email protected]c1372a62014-05-21 19:42:31281}