Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / gpu / command_buffer / client / BUILD.gn
blobbbb7c0b99d1de1309dbc17f71a92ff2c804b229b
1 # Copyright (c) 2013 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 # The files here go into the "gpu" component in a component build (with
6 # "command_buffer_client" and "gles2_cmd_helper" just forwarding) and goes into
7 # separate static libraries in non-component build. This needs to match the
8 # GYP build which was likely an attempt to make larger components to help with
9 # loading.
10 group("client") {
11   if (is_component_build) {
12     public_deps = [
13       "//gpu",
14     ]
15   } else {
16     public_deps = [
17       ":client_sources",
18     ]
19   }
22 group("gles2_cmd_helper") {
23   if (is_component_build) {
24     public_deps = [
25       "//gpu",
26     ]
27   } else {
28     public_deps = [
29       ":gles2_cmd_helper_sources",
30     ]
31   }
34 source_set("client_sources") {
35   visibility = [ "//gpu/*" ]
37   sources = [
38     "cmd_buffer_helper.cc",
39     "cmd_buffer_helper.h",
40     "fenced_allocator.cc",
41     "fenced_allocator.h",
42     "gpu_control.h",
43     "gpu_memory_buffer_manager.cc",
44     "gpu_memory_buffer_manager.h",
45     "mapped_memory.cc",
46     "mapped_memory.h",
47     "ring_buffer.cc",
48     "ring_buffer.h",
49     "transfer_buffer.cc",
50     "transfer_buffer.h",
51   ]
53   configs += [
54     # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
55     "//build/config/compiler:no_size_t_to_int_warning",
56     "//gpu:gpu_implementation",
57   ]
59   all_dependent_configs = [ "//third_party/khronos:khronos_headers" ]
61   deps = [
62     "//gpu/command_buffer/common:common_sources",
63   ]
66 source_set("gles2_cmd_helper_sources") {
67   visibility = [ "//gpu/*" ]
68   sources = [
69     "gles2_cmd_helper.cc",
70     "gles2_cmd_helper.h",
71     "gles2_cmd_helper_autogen.h",
72   ]
74   configs += [
75     # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
76     "//build/config/compiler:no_size_t_to_int_warning",
77     "//gpu:gpu_implementation",
78   ]
80   deps = [
81     ":client_sources",
82   ]
85 gles2_c_lib_source_files = [
86   "gles2_c_lib.cc",
87   "gles2_c_lib_autogen.h",
88   "gles2_c_lib_export.h",
89   "gles2_lib.cc",
90   "gles2_lib.h",
93 gles2_implementation_source_files = [
94   "buffer_tracker.cc",
95   "buffer_tracker.h",
96   "client_context_state.cc",
97   "client_context_state.h",
98   "client_context_state_autogen.h",
99   "client_context_state_impl_autogen.h",
100   "gles2_impl_export.h",
101   "gles2_implementation.cc",
102   "gles2_implementation.h",
103   "gles2_implementation_autogen.h",
104   "gles2_implementation_impl_autogen.h",
105   "gles2_trace_implementation.cc",
106   "gles2_trace_implementation.h",
107   "gles2_trace_implementation_autogen.h",
108   "gles2_trace_implementation_impl_autogen.h",
109   "gpu_switches.cc",
110   "gpu_switches.h",
111   "program_info_manager.cc",
112   "program_info_manager.h",
113   "query_tracker.cc",
114   "query_tracker.h",
115   "share_group.cc",
116   "share_group.h",
117   "vertex_array_object_manager.cc",
118   "vertex_array_object_manager.h",
121 # Provides GLES2 interface, but does not cause any implementation to be linked
122 # in. Useful when a target uses the interface, but permits its users to choose
123 # an implementation.
124 source_set("gles2_interface") {
125   sources = [
126     "gles2_interface.h",
127   ]
128   public_configs = [ "//third_party/khronos:khronos_headers" ]
129   deps = [
130     "//base",
131   ]
134 # Library emulates GLES2 using command_buffers.
135 component("gles2_implementation") {
136   sources = gles2_implementation_source_files
138   # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
139   configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
141   defines = [ "GLES2_IMPL_IMPLEMENTATION" ]
142   all_dependent_configs = [ "//third_party/khronos:khronos_headers" ]
144   deps = [
145     ":gles2_cmd_helper",
146     ":gles2_interface",
147     "//base",
148     "//gpu/command_buffer/common:gles2_utils",
149     "//ui/gfx/geometry",
150   ]
153 # Library emulates GLES2 using command_buffers.
154 component("gles2_implementation_no_check") {
155   sources = gles2_implementation_source_files
157   # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
158   configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
160   defines = [
161     "GLES2_IMPL_IMPLEMENTATION",
162     "GLES2_CONFORMANCE_TESTS=1",
163   ]
165   deps = [
166     ":gles2_cmd_helper",
167     "//base",
168     "//gpu/command_buffer/common:gles2_utils",
169     "//ui/gfx",
170     "//ui/gfx/geometry",
171   ]
174 component("gl_in_process_context") {
175   sources = [
176     "gl_in_process_context.cc",
177     "gl_in_process_context.h",
178     "gl_in_process_context_export.h",
179   ]
181   defines = [ "GL_IN_PROCESS_CONTEXT_IMPLEMENTATION" ]
183   deps = [
184     ":gles2_implementation",
185     "//gpu",
186     "//gpu/command_buffer/common:gles2_utils",
187     "//base",
188     "//base/third_party/dynamic_annotations",
189     "//ui/gfx/geometry",
190     "//ui/gl",
191   ]
194 component("gles2_c_lib") {
195   sources = gles2_c_lib_source_files
196   defines = [ "GLES2_C_LIB_IMPLEMENTATION" ]
198   # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
199   configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
201   deps = [
202     ":client",
203     ":gles2_interface",
204     "//base",
205     "//base/third_party/dynamic_annotations",
206     "//gpu/command_buffer/common",
207   ]
210 # GYP version: gpu/gpu.gyp:gles2_c_lib_nocheck
211 # Same as gles2_c_lib except with no parameter checking. Required for
212 # OpenGL ES 2.0 conformance tests.
213 component("gles2_c_lib_nocheck") {
214   sources = gles2_c_lib_source_files
216   defines = [
217     "GLES2_C_LIB_IMPLEMENTATION",
218     "GLES2_CONFORMANCE_TESTS=1",
219   ]
220   deps = [
221     ":client",
222     ":gles2_implementation_no_check",
223     ":gles2_interface",
224     "//base",
225     "//base/third_party/dynamic_annotations",
226     "//gpu/command_buffer/common",
227   ]