blob: 770f24a68064475d2cfccc74f0297aa5c9e7e113 [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 = [
23 "//gpu",
24 ]
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 Labour95431c62017-12-19 17:02:2844 "command_buffer_service.cc",
45 "command_buffer_service.h",
46 "common_decoder.cc",
47 "common_decoder.h",
48 "gpu_preferences.cc",
49 "gpu_preferences.h",
50 "gpu_switches.cc",
51 "gpu_switches.h",
52 "image_factory.cc",
53 "image_factory.h",
54 "image_manager.cc",
55 "image_manager.h",
56 "memory_tracking.h",
57 "scheduler.cc",
58 "scheduler.h",
59 "sequence_id.h",
60 "sync_point_manager.cc",
61 "sync_point_manager.h",
62 "transfer_buffer_manager.cc",
63 "transfer_buffer_manager.h",
64 ]
65
66 configs += [
67 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
68 "//build/config/compiler:no_size_t_to_int_warning",
69 "//build/config:precompiled_headers",
70 "//gpu:gpu_implementation",
71 "//third_party/khronos:khronos_headers",
72 ]
73
74 public_deps = [
75 "//gpu/command_buffer/common:common_sources",
76 ]
77 deps = [
78 "//base",
79 "//base/third_party/dynamic_annotations",
80 "//gpu/command_buffer/client:client_sources",
81 "//gpu/config:config_sources",
82 "//gpu/ipc/common:surface_handle_type",
83 "//media:media_features",
84 "//ui/gfx",
85 "//ui/gfx/geometry",
86 "//ui/gl",
87 ]
88
89 if (is_android && !is_debug) {
90 # On Android optimize more since this component can be a bottleneck.
91 configs -= [ "//build/config/compiler:default_optimization" ]
92 configs += [ "//build/config/compiler:optimize_max" ]
93 }
94}
95
96target(link_target_type, "gles2_sources") {
97 # External code should depend on this via //gpu/command_buffer/service:gles2
98 # above rather than depending on this directly or the component build will
99 # break.
100 visibility = [ "//gpu/*" ]
101
102 sources = [
[email protected]c1372a62014-05-21 19:42:31103 "buffer_manager.cc",
satoruxc5bd7a32015-02-18 01:54:52104 "buffer_manager.h",
geofflang851a4812016-09-14 19:20:29105 "client_service_map.h",
Antoine Laboure7e2da62017-05-25 00:28:26106 "command_buffer_direct.cc",
107 "command_buffer_direct.h",
[email protected]c1372a62014-05-21 19:42:31108 "context_group.cc",
satoruxc5bd7a32015-02-18 01:54:52109 "context_group.h",
110 "context_state.cc",
[email protected]c1372a62014-05-21 19:42:31111 "context_state.h",
112 "context_state_autogen.h",
113 "context_state_impl_autogen.h",
[email protected]c1372a62014-05-21 19:42:31114 "error_state.cc",
115 "error_state.h",
[email protected]c1372a62014-05-21 19:42:31116 "feature_info.cc",
satoruxc5bd7a32015-02-18 01:54:52117 "feature_info.h",
tobiasjsfc199b472015-08-22 00:39:06118 "framebuffer_completeness_cache.cc",
119 "framebuffer_completeness_cache.h",
[email protected]c1372a62014-05-21 19:42:31120 "framebuffer_manager.cc",
satoruxc5bd7a32015-02-18 01:54:52121 "framebuffer_manager.h",
[email protected]c1372a62014-05-21 19:42:31122 "gl_context_virtual.cc",
123 "gl_context_virtual.h",
124 "gl_state_restorer_impl.cc",
125 "gl_state_restorer_impl.h",
junov0cad1f42016-01-07 21:48:51126 "gl_utils.cc",
[email protected]c1372a62014-05-21 19:42:31127 "gl_utils.h",
adrian.belgun8a992f12016-06-17 16:29:05128 "gles2_cmd_apply_framebuffer_attachment_cmaa_intel.cc",
129 "gles2_cmd_apply_framebuffer_attachment_cmaa_intel.h",
satoruxc5bd7a32015-02-18 01:54:52130 "gles2_cmd_clear_framebuffer.cc",
131 "gles2_cmd_clear_framebuffer.h",
geofflangb205ab62016-06-13 21:24:44132 "gles2_cmd_copy_tex_image.cc",
133 "gles2_cmd_copy_tex_image.h",
satoruxc5bd7a32015-02-18 01:54:52134 "gles2_cmd_copy_texture_chromium.cc",
135 "gles2_cmd_copy_texture_chromium.h",
136 "gles2_cmd_decoder.cc",
137 "gles2_cmd_decoder.h",
138 "gles2_cmd_decoder_autogen.h",
geofflang6aa8dd22016-05-24 21:35:33139 "gles2_cmd_decoder_passthrough.cc",
140 "gles2_cmd_decoder_passthrough.h",
geofflangd00f0b22016-06-03 16:34:29141 "gles2_cmd_decoder_passthrough_doer_prototypes.h",
142 "gles2_cmd_decoder_passthrough_doers.cc",
143 "gles2_cmd_decoder_passthrough_handlers.cc",
144 "gles2_cmd_decoder_passthrough_handlers_autogen.cc",
yunchao.hefd791692016-09-18 07:27:05145 "gles2_cmd_srgb_converter.cc",
146 "gles2_cmd_srgb_converter.h",
satoruxc5bd7a32015-02-18 01:54:52147 "gles2_cmd_validation.cc",
148 "gles2_cmd_validation.h",
149 "gles2_cmd_validation_autogen.h",
150 "gles2_cmd_validation_implementation_autogen.h",
Klaus Weidnere66cc7d2017-12-09 17:26:30151 "gpu_fence_manager.cc",
152 "gpu_fence_manager.h",
[email protected]c1372a62014-05-21 19:42:31153 "gpu_state_tracer.cc",
154 "gpu_state_tracer.h",
satoruxc5bd7a32015-02-18 01:54:52155 "gpu_tracer.cc",
156 "gpu_tracer.h",
[email protected]c1372a62014-05-21 19:42:31157 "id_manager.cc",
satoruxc5bd7a32015-02-18 01:54:52158 "id_manager.h",
zmo6c468ba2016-05-04 20:00:51159 "indexed_buffer_binding_host.cc",
160 "indexed_buffer_binding_host.h",
[email protected]c1372a62014-05-21 19:42:31161 "logger.cc",
162 "logger.h",
boliu8e814cb2015-07-13 20:47:46163 "mailbox_manager.cc",
[email protected]c1372a62014-05-21 19:42:31164 "mailbox_manager.h",
sieversb727d532014-10-24 19:11:34165 "mailbox_manager_impl.cc",
166 "mailbox_manager_impl.h",
167 "mailbox_manager_sync.cc",
168 "mailbox_manager_sync.h",
[email protected]c1372a62014-05-21 19:42:31169 "memory_program_cache.cc",
satoruxc5bd7a32015-02-18 01:54:52170 "memory_program_cache.h",
Jamie Madill2d47d482017-07-28 15:23:24171 "passthrough_program_cache.cc",
172 "passthrough_program_cache.h",
kkinnunenb959a8462015-07-14 11:08:34173 "path_manager.cc",
174 "path_manager.h",
[email protected]c1372a62014-05-21 19:42:31175 "program_cache.cc",
satoruxc5bd7a32015-02-18 01:54:52176 "program_cache.h",
177 "program_manager.cc",
178 "program_manager.h",
179 "query_manager.cc",
180 "query_manager.h",
Jonathan Backer7f90dfb662017-12-18 16:52:04181 "raster_decoder.cc",
182 "raster_decoder.h",
satoruxc5bd7a32015-02-18 01:54:52183 "renderbuffer_manager.cc",
184 "renderbuffer_manager.h",
bajones5141d032015-12-07 21:13:39185 "sampler_manager.cc",
186 "sampler_manager.h",
ericrkdc5eeaa2017-05-19 02:23:50187 "service_discardable_manager.cc",
188 "service_discardable_manager.h",
Eric Karl16711ec2017-11-18 00:58:11189 "service_transfer_cache.cc",
190 "service_transfer_cache.h",
geofflangdf7fff2d42016-11-11 00:34:03191 "service_utils.cc",
192 "service_utils.h",
[email protected]c1372a62014-05-21 19:42:31193 "shader_manager.cc",
satoruxc5bd7a32015-02-18 01:54:52194 "shader_manager.h",
[email protected]c1372a62014-05-21 19:42:31195 "shader_translator.cc",
satoruxc5bd7a32015-02-18 01:54:52196 "shader_translator.h",
[email protected]c1372a62014-05-21 19:42:31197 "shader_translator_cache.cc",
satoruxc5bd7a32015-02-18 01:54:52198 "shader_translator_cache.h",
[email protected]c1372a62014-05-21 19:42:31199 "texture_definition.cc",
satoruxc5bd7a32015-02-18 01:54:52200 "texture_definition.h",
[email protected]c1372a62014-05-21 19:42:31201 "texture_manager.cc",
satoruxc5bd7a32015-02-18 01:54:52202 "texture_manager.h",
zmo6c468ba2016-05-04 20:00:51203 "transform_feedback_manager.cc",
204 "transform_feedback_manager.h",
[email protected]c1372a62014-05-21 19:42:31205 "vertex_array_manager.cc",
satoruxc5bd7a32015-02-18 01:54:52206 "vertex_array_manager.h",
[email protected]c1372a62014-05-21 19:42:31207 "vertex_attrib_manager.cc",
satoruxc5bd7a32015-02-18 01:54:52208 "vertex_attrib_manager.h",
[email protected]c1372a62014-05-21 19:42:31209 ]
210
brettw8f2fd172015-03-16 22:14:18211 configs += [
brettwbc8b2a22015-07-28 18:24:42212 "//build/config:precompiled_headers",
brettw8f2fd172015-03-16 22:14:18213 "//gpu:gpu_implementation",
214 "//third_party/khronos:khronos_headers",
215 ]
[email protected]c1372a62014-05-21 19:42:31216
ckocagilfc8d7f232014-09-30 19:31:43217 # Prefer mesa GL headers to system headers, which cause problems on Win.
218 include_dirs = [ "//third_party/mesa/src/include" ]
219
brettw7dab582e2014-09-20 01:44:11220 public_deps = [
brettw542f7532015-04-06 22:35:45221 "//gpu/command_buffer/common:common_sources",
Antoine Labour95431c62017-12-19 17:02:28222 "//gpu/command_buffer/common:gles2_sources",
brettw7dab582e2014-09-20 01:44:11223 ]
[email protected]c1372a62014-05-21 19:42:31224 deps = [
225 ":disk_cache_proto",
Antoine Labour95431c62017-12-19 17:02:28226 ":service_sources",
[email protected]c1372a62014-05-21 19:42:31227 "//base",
228 "//base/third_party/dynamic_annotations",
Adrienne Walker436a7752017-08-28 23:33:09229 "//cc/paint",
brettw09039c12016-03-18 03:22:46230 "//gpu/command_buffer/client:client_sources",
231 "//gpu/command_buffer/common:gles2_utils",
tfarina15525c42015-04-28 19:04:16232 "//gpu/config:config_sources",
sadrul763bd592016-09-27 14:33:44233 "//gpu/ipc/common:surface_handle_type",
geofflang398fb212016-07-13 16:27:42234 "//third_party/angle:angle_image_util",
jmadilldc26192a2015-08-04 12:44:16235 "//third_party/angle:commit_id",
[email protected]d5ba08c2014-06-18 07:01:08236 "//third_party/angle:translator",
[email protected]c1372a62014-05-21 19:42:31237 "//third_party/protobuf:protobuf_lite",
238 "//third_party/re2",
239 "//third_party/smhasher:cityhash",
Eric Karld625a732017-08-03 22:47:31240 "//third_party/zlib",
[email protected]c1372a62014-05-21 19:42:31241 "//ui/gfx",
242 "//ui/gfx/geometry",
John Bauman91f2d572017-07-29 00:24:14243 "//ui/gfx/ipc/color",
[email protected]c1372a62014-05-21 19:42:31244 "//ui/gl",
kylechar5b9dec12016-05-16 15:40:57245 "//ui/gl/init",
[email protected]c1372a62014-05-21 19:42:31246 ]
247
jiangj2bd42fd2015-04-18 13:29:06248 if (is_mac) {
249 # Required by gles2_cmd_decoder.cc on Mac.
250 libs = [
251 "IOSurface.framework",
252 "OpenGL.framework",
253 ]
254 }
255
[email protected]c1372a62014-05-21 19:42:31256 if (is_android && !is_debug) {
257 # On Android optimize more since this component can be a bottleneck.
brettw4cab0f12015-09-14 21:40:01258 configs -= [ "//build/config/compiler:default_optimization" ]
[email protected]c1372a62014-05-21 19:42:31259 configs += [ "//build/config/compiler:optimize_max" ]
260 }
261}
262
263proto_library("disk_cache_proto") {
scottmg34fb7e52014-12-03 23:27:24264 sources = [
265 "disk_cache_proto.proto",
266 ]
[email protected]c1372a62014-05-21 19:42:31267}