Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / gpu / command_buffer / client / BUILD.gn
blobd3e9b425900a57f97f795450bb99764a6ddd9e61
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 source_set("client") {
6   sources = [
7     "cmd_buffer_helper.cc",
8     "cmd_buffer_helper.h",
9     "fenced_allocator.cc",
10     "fenced_allocator.h",
11     "gpu_control.h",
12     "mapped_memory.cc",
13     "mapped_memory.h",
14     "ring_buffer.cc",
15     "ring_buffer.h",
16     "transfer_buffer.cc",
17     "transfer_buffer.h",
18   ]
20   defines = [ "GPU_IMPLEMENTATION" ]
22   if (is_win) {
23     # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
24     cflags = [ "/wd4267" ]  # size_t to int truncation.
25   }
27   all_dependent_configs = [ "//third_party/khronos:khronos_headers" ]
29   deps = [
30     "//gpu/command_buffer/common",
31   ]
34 group("gles2_cmd_helper") {
35   if (is_component_build) {
36     deps = [ "//gpu" ]
37   } else {
38     deps = [ ":gles2_cmd_helper_sources" ]
39   }
42 source_set("gles2_cmd_helper_sources") {
43   visibility = [ ":gles2_cmd_helper", "//gpu" ]
44   sources = [
45     "gles2_cmd_helper.cc",
46     "gles2_cmd_helper.h",
47     "gles2_cmd_helper_autogen.h",
48   ]
50   defines = [ "GPU_IMPLEMENTATION" ]
52   if (is_win) {
53     # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
54     cflags = [ "/wd4267" ]  # size_t to int truncation.
55   }
57   deps = [ ":client" ]
60 gles2_c_lib_source_files = [
61   "gles2_c_lib.cc",
62   "gles2_c_lib_autogen.h",
63   "gles2_c_lib_export.h",
64   "gles2_lib.h",
65   "gles2_lib.cc",
68 gles2_implementation_source_files = [
69   "buffer_tracker.cc",
70   "buffer_tracker.h",
71   "client_context_state.h",
72   "client_context_state.cc",
73   "client_context_state_autogen.h",
74   "client_context_state_impl_autogen.h",
75   "gles2_impl_export.h",
76   "gles2_implementation_autogen.h",
77   "gles2_implementation.cc",
78   "gles2_implementation.h",
79   "gles2_implementation_impl_autogen.h",
80   "gles2_interface.h",
81   "gles2_trace_implementation_autogen.h",
82   "gles2_trace_implementation.cc",
83   "gles2_trace_implementation.h",
84   "gles2_trace_implementation_impl_autogen.h",
85   "gpu_memory_buffer_factory.h",
86   "gpu_memory_buffer_tracker.cc",
87   "gpu_memory_buffer_tracker.h",
88   "program_info_manager.cc",
89   "program_info_manager.h",
90   "query_tracker.cc",
91   "query_tracker.h",
92   "share_group.cc",
93   "share_group.h",
94   "vertex_array_object_manager.cc",
95   "vertex_array_object_manager.h",
98 # Library emulates GLES2 using command_buffers.
99 component("gles2_implementation") {
100   sources = gles2_implementation_source_files
102   defines = [ "GLES2_IMPL_IMPLEMENTATION" ]
103   all_dependent_configs = [ "//third_party/khronos:khronos_headers" ]
105   if (is_win) {
106     # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
107     cflags = [ "/wd4267" ]  # size_t to int truncation.
108   }
110   deps = [
111     ":gles2_cmd_helper",
112     "//base",
113     "//gpu/command_buffer/common",
114     "//ui/gfx/geometry",
115     "//ui/gl",
116   ]
119 # Library emulates GLES2 using command_buffers.
120 component("gles2_implementation_client_side_arrays") {
121   sources = gles2_implementation_source_files
123   defines = [
124     "GLES2_IMPL_IMPLEMENTATION",
125     "GLES2_SUPPORT_CLIENT_SIDE_ARRAYS=1",
126   ]
127   all_dependent_configs = [ "//third_party/khronos:khronos_headers" ]
129   if (is_win) {
130     # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
131     cflags = [ "/wd4267" ]  # size_t to int truncation.
132   }
134   deps = [
135     ":gles2_cmd_helper",
136     "//base",
137     "//gpu/command_buffer/common",
138     "//ui/gfx/geometry",
139     "//ui/gl",
140   ]
143 component("gl_in_process_context") {
144   sources = [
145     "gl_in_process_context.h",
146     "gl_in_process_context.cc",
147     "gl_in_process_context_export.h",
148   ]
150   defines = [ "GL_IN_PROCESS_CONTEXT_IMPLEMENTATION" ]
152   deps = [
153     ":gles2_implementation",
154     "//gpu",
155     "//gpu/command_buffer/common:gles2_utils",
156     "//base",
157     "//base/third_party/dynamic_annotations",
158     "//ui/gfx/geometry",
159     "//ui/gl",
160   ]
163 component("gles2_c_lib") {
164   sources = gles2_c_lib_source_files
165   defines = [ "GLES2_C_LIB_IMPLEMENTATION" ]
167   if (is_win) {
168     # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
169     cflags = [ "/wd4267" ]  # size_t to int truncation.
170   }
172   deps = [
173     ":client",
174     "//base",
175     "//base/third_party/dynamic_annotations",
176     "//gpu/command_buffer/common",
177   ]