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