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