Revert "Reland c91b178b07b0d - Delete dead signin code (SigninGlobalError)"
[chromium-blink-merge.git] / gpu / command_buffer / service / BUILD.gn
blob7a2e2b2edb0b4a41330c7ff61d6257b9e73d844b
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 group("service") {
9   if (is_component_build) {
10     public_deps = [
11       "//gpu",
12     ]
13   } else {
14     public_deps = [
15       ":service_sources",
16     ]
17   }
20 source_set("service_sources") {
21   visibility = [
22     "//gpu/*",
23     "//mojo/gles2:gles2",
24   ]
26   sources = [
27     "async_pixel_transfer_delegate.cc",
28     "async_pixel_transfer_delegate.h",
29     "async_pixel_transfer_manager.cc",
30     "async_pixel_transfer_manager.h",
31     "async_pixel_transfer_manager_android.cc",
32     "async_pixel_transfer_manager_idle.cc",
33     "async_pixel_transfer_manager_idle.h",
34     "async_pixel_transfer_manager_linux.cc",
35     "async_pixel_transfer_manager_mac.cc",
36     "async_pixel_transfer_manager_share_group.cc",
37     "async_pixel_transfer_manager_share_group.h",
38     "async_pixel_transfer_manager_stub.cc",
39     "async_pixel_transfer_manager_stub.h",
40     "async_pixel_transfer_manager_sync.cc",
41     "async_pixel_transfer_manager_sync.h",
42     "async_pixel_transfer_manager_win.cc",
43     "buffer_manager.cc",
44     "buffer_manager.h",
45     "cmd_buffer_engine.h",
46     "cmd_parser.cc",
47     "cmd_parser.h",
48     "command_buffer_service.cc",
49     "command_buffer_service.h",
50     "common_decoder.cc",
51     "common_decoder.h",
52     "context_group.cc",
53     "context_group.h",
54     "context_state.cc",
55     "context_state.h",
56     "context_state_autogen.h",
57     "context_state_impl_autogen.h",
58     "error_state.cc",
59     "error_state.h",
60     "feature_info.cc",
61     "feature_info.h",
62     "framebuffer_manager.cc",
63     "framebuffer_manager.h",
64     "gl_context_virtual.cc",
65     "gl_context_virtual.h",
66     "gl_state_restorer_impl.cc",
67     "gl_state_restorer_impl.h",
68     "gl_utils.h",
69     "gles2_cmd_clear_framebuffer.cc",
70     "gles2_cmd_clear_framebuffer.h",
71     "gles2_cmd_copy_texture_chromium.cc",
72     "gles2_cmd_copy_texture_chromium.h",
73     "gles2_cmd_decoder.cc",
74     "gles2_cmd_decoder.h",
75     "gles2_cmd_decoder_autogen.h",
76     "gles2_cmd_validation.cc",
77     "gles2_cmd_validation.h",
78     "gles2_cmd_validation_autogen.h",
79     "gles2_cmd_validation_implementation_autogen.h",
80     "gpu_scheduler.cc",
81     "gpu_scheduler.h",
82     "gpu_state_tracer.cc",
83     "gpu_state_tracer.h",
84     "gpu_switches.cc",
85     "gpu_switches.h",
86     "gpu_tracer.cc",
87     "gpu_tracer.h",
88     "id_manager.cc",
89     "id_manager.h",
90     "image_factory.cc",
91     "image_factory.h",
92     "image_manager.cc",
93     "image_manager.h",
94     "in_process_command_buffer.cc",
95     "in_process_command_buffer.h",
96     "logger.cc",
97     "logger.h",
98     "mailbox_manager.cc",
99     "mailbox_manager.h",
100     "mailbox_manager_impl.cc",
101     "mailbox_manager_impl.h",
102     "mailbox_manager_sync.cc",
103     "mailbox_manager_sync.h",
104     "memory_program_cache.cc",
105     "memory_program_cache.h",
106     "path_manager.cc",
107     "path_manager.h",
108     "program_cache.cc",
109     "program_cache.h",
110     "program_manager.cc",
111     "program_manager.h",
112     "query_manager.cc",
113     "query_manager.h",
114     "renderbuffer_manager.cc",
115     "renderbuffer_manager.h",
116     "shader_manager.cc",
117     "shader_manager.h",
118     "shader_translator.cc",
119     "shader_translator.h",
120     "shader_translator_cache.cc",
121     "shader_translator_cache.h",
122     "stream_texture_manager_in_process_android.cc",
123     "stream_texture_manager_in_process_android.h",
124     "sync_point_manager.cc",
125     "sync_point_manager.h",
126     "texture_definition.cc",
127     "texture_definition.h",
128     "texture_manager.cc",
129     "texture_manager.h",
130     "transfer_buffer_manager.cc",
131     "transfer_buffer_manager.h",
132     "valuebuffer_manager.cc",
133     "valuebuffer_manager.h",
134     "vertex_array_manager.cc",
135     "vertex_array_manager.h",
136     "vertex_attrib_manager.cc",
137     "vertex_attrib_manager.h",
138   ]
140   configs += [
141     "//build/config:precompiled_headers",
142     "//gpu:gpu_implementation",
143     "//third_party/khronos:khronos_headers",
144   ]
146   # Prefer mesa GL headers to system headers, which cause problems on Win.
147   include_dirs = [ "//third_party/mesa/src/include" ]
149   public_deps = [
150     "//gpu/command_buffer/common:common_sources",
151   ]
152   deps = [
153     ":disk_cache_proto",
154     "//base",
155     "//base/third_party/dynamic_annotations",
156     "//crypto",
157     "//gpu/config:config_sources",
158     "//third_party/angle:commit_id",
159     "//third_party/angle:translator",
160     "//third_party/protobuf:protobuf_lite",
161     "//third_party/re2",
162     "//third_party/smhasher:cityhash",
163     "//ui/gfx",
164     "//ui/gfx/geometry",
165     "//ui/gl",
166   ]
168   if (is_win || is_android || (is_linux && use_x11)) {
169     sources += [
170       "async_pixel_transfer_manager_egl.cc",
171       "async_pixel_transfer_manager_egl.h",
172     ]
173   }
175   if (is_mac) {
176     # Required by gles2_cmd_decoder.cc on Mac.
177     libs = [
178       "IOSurface.framework",
179       "OpenGL.framework",
180     ]
181   }
183   if (is_android && !is_debug) {
184     # On Android optimize more since this component can be a bottleneck.
185     configs -= [ "//build/config/compiler:optimize" ]
186     configs += [ "//build/config/compiler:optimize_max" ]
187   }
190 proto_library("disk_cache_proto") {
191   sources = [
192     "disk_cache_proto.proto",
193   ]