Rewrite AndroidSyncSettings to be significantly simpler.
[chromium-blink-merge.git] / gpu / command_buffer / service / BUILD.gn
blobee92509bb3ab456ede45cef8b770a348afa84174
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/ui.gni")
6 import("//third_party/protobuf/proto_library.gni")
8 source_set("service") {
9   sources = [
10     "async_pixel_transfer_delegate.cc",
11     "async_pixel_transfer_delegate.h",
12     "async_pixel_transfer_manager.cc",
13     "async_pixel_transfer_manager.h",
14     "async_pixel_transfer_manager_android.cc",
15     "async_pixel_transfer_manager_idle.cc",
16     "async_pixel_transfer_manager_idle.h",
17     "async_pixel_transfer_manager_linux.cc",
18     "async_pixel_transfer_manager_mac.cc",
19     "async_pixel_transfer_manager_share_group.cc",
20     "async_pixel_transfer_manager_share_group.h",
21     "async_pixel_transfer_manager_stub.cc",
22     "async_pixel_transfer_manager_stub.h",
23     "async_pixel_transfer_manager_sync.cc",
24     "async_pixel_transfer_manager_sync.h",
25     "async_pixel_transfer_manager_win.cc",
26     "buffer_manager.cc",
27     "buffer_manager.h",
28     "cmd_buffer_engine.h",
29     "cmd_parser.cc",
30     "cmd_parser.h",
31     "command_buffer_service.cc",
32     "command_buffer_service.h",
33     "common_decoder.cc",
34     "common_decoder.h",
35     "context_group.cc",
36     "context_group.h",
37     "context_state.cc",
38     "context_state.h",
39     "context_state_autogen.h",
40     "context_state_impl_autogen.h",
41     "error_state.cc",
42     "error_state.h",
43     "feature_info.cc",
44     "feature_info.h",
45     "framebuffer_manager.cc",
46     "framebuffer_manager.h",
47     "gl_context_virtual.cc",
48     "gl_context_virtual.h",
49     "gl_state_restorer_impl.cc",
50     "gl_state_restorer_impl.h",
51     "gl_utils.h",
52     "gles2_cmd_clear_framebuffer.cc",
53     "gles2_cmd_clear_framebuffer.h",
54     "gles2_cmd_copy_texture_chromium.cc",
55     "gles2_cmd_copy_texture_chromium.h",
56     "gles2_cmd_decoder.cc",
57     "gles2_cmd_decoder.h",
58     "gles2_cmd_decoder_autogen.h",
59     "gles2_cmd_validation.cc",
60     "gles2_cmd_validation.h",
61     "gles2_cmd_validation_autogen.h",
62     "gles2_cmd_validation_implementation_autogen.h",
63     "gpu_scheduler.cc",
64     "gpu_scheduler.h",
65     "gpu_scheduler_mock.h",
66     "gpu_state_tracer.cc",
67     "gpu_state_tracer.h",
68     "gpu_switches.cc",
69     "gpu_switches.h",
70     "gpu_tracer.cc",
71     "gpu_tracer.h",
72     "id_manager.cc",
73     "id_manager.h",
74     "image_factory.cc",
75     "image_factory.h",
76     "image_manager.cc",
77     "image_manager.h",
78     "in_process_command_buffer.cc",
79     "in_process_command_buffer.h",
80     "logger.cc",
81     "logger.h",
82     "mailbox_manager.h",
83     "mailbox_manager_impl.cc",
84     "mailbox_manager_impl.h",
85     "mailbox_manager_sync.cc",
86     "mailbox_manager_sync.h",
87     "memory_program_cache.cc",
88     "memory_program_cache.h",
89     "mocks.h",
90     "program_cache.cc",
91     "program_cache.h",
92     "program_manager.cc",
93     "program_manager.h",
94     "query_manager.cc",
95     "query_manager.h",
96     "renderbuffer_manager.cc",
97     "renderbuffer_manager.h",
98     "shader_manager.cc",
99     "shader_manager.h",
100     "shader_translator.cc",
101     "shader_translator.h",
102     "shader_translator_cache.cc",
103     "shader_translator_cache.h",
104     "stream_texture_manager_in_process_android.cc",
105     "stream_texture_manager_in_process_android.h",
106     "sync_point_manager.cc",
107     "sync_point_manager.h",
108     "texture_definition.cc",
109     "texture_definition.h",
110     "texture_manager.cc",
111     "texture_manager.h",
112     "transfer_buffer_manager.cc",
113     "transfer_buffer_manager.h",
114     "valuebuffer_manager.cc",
115     "valuebuffer_manager.h",
116     "vertex_array_manager.cc",
117     "vertex_array_manager.h",
118     "vertex_attrib_manager.cc",
119     "vertex_attrib_manager.h",
120   ]
122   defines = [ "GPU_IMPLEMENTATION" ]
124   configs += [ "//third_party/khronos:khronos_headers" ]
126   # Prefer mesa GL headers to system headers, which cause problems on Win.
127   include_dirs = [ "//third_party/mesa/src/include" ]
129   public_deps = [
130     "//gpu/command_buffer/common",
131   ]
132   deps = [
133     ":disk_cache_proto",
134     "//base",
135     "//base/third_party/dynamic_annotations",
136     "//crypto",
137     "//third_party/angle:translator",
138     "//third_party/protobuf:protobuf_lite",
139     "//third_party/re2",
140     "//third_party/smhasher:cityhash",
141     "//ui/gfx",
142     "//ui/gfx/geometry",
143     "//ui/gl",
144   ]
146   if (ui_compositor_image_transport) {
147     include_dirs += [ "//third_party/khronos" ]
148   }
150   if (is_win || is_android || (is_linux && use_x11)) {
151     sources += [
152       "async_pixel_transfer_manager_egl.cc",
153       "async_pixel_transfer_manager_egl.h",
154     ]
155   }
157   if (is_android && !is_debug) {
158     # On Android optimize more since this component can be a bottleneck.
159     configs -= [ "//build/config/compiler:optimize" ]
160     configs += [ "//build/config/compiler:optimize_max" ]
161   }
164 proto_library("disk_cache_proto") {
165   sources = [
166     "disk_cache_proto.proto",
167   ]