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. 4 5source_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 ] 19 20 defines = [ "GPU_IMPLEMENTATION" ] 21 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 } 26 27 all_dependent_configs = [ "//third_party/khronos:khronos_headers" ] 28 29 deps = [ 30 "//gpu/command_buffer/common", 31 ] 32} 33 34group("gles2_cmd_helper") { 35 if (is_component_build) { 36 deps = [ "//gpu" ] 37 } else { 38 deps = [ ":gles2_cmd_helper_sources" ] 39 } 40} 41 42source_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 ] 49 50 defines = [ "GPU_IMPLEMENTATION" ] 51 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 } 56 57 deps = [ ":client" ] 58} 59 60gles2_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", 66] 67 68gles2_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_trace_implementation_autogen.h", 81 "gles2_trace_implementation.cc", 82 "gles2_trace_implementation.h", 83 "gles2_trace_implementation_impl_autogen.h", 84 "gpu_memory_buffer_factory.h", 85 "gpu_memory_buffer_tracker.cc", 86 "gpu_memory_buffer_tracker.h", 87 "program_info_manager.cc", 88 "program_info_manager.h", 89 "query_tracker.cc", 90 "query_tracker.h", 91 "share_group.cc", 92 "share_group.h", 93 "vertex_array_object_manager.cc", 94 "vertex_array_object_manager.h", 95] 96 97# Provides GLES2 interface, but does not cause any implementation to be linked 98# in. Useful when a target uses the interface, but permits its users to choose 99# an implementation. 100source_set("gles2_interface") { 101 sources = [ "gles2_interface.h" ] 102 public_configs = [ "//third_party/khronos:khronos_headers" ] 103 deps = [ 104 "//base", 105 ] 106} 107 108# Library emulates GLES2 using command_buffers. 109component("gles2_implementation") { 110 sources = gles2_implementation_source_files 111 112 defines = [ "GLES2_IMPL_IMPLEMENTATION" ] 113 all_dependent_configs = [ "//third_party/khronos:khronos_headers" ] 114 115 if (is_win) { 116 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 117 cflags = [ "/wd4267" ] # size_t to int truncation. 118 } 119 120 deps = [ 121 ":gles2_cmd_helper", 122 ":gles2_interface", 123 "//base", 124 "//gpu/command_buffer/common", 125 "//ui/gfx/geometry", 126 "//ui/gl", 127 ] 128} 129 130# Library emulates GLES2 using command_buffers. 131component("gles2_implementation_client_side_arrays") { 132 sources = gles2_implementation_source_files 133 134 defines = [ 135 "GLES2_IMPL_IMPLEMENTATION", 136 "GLES2_SUPPORT_CLIENT_SIDE_ARRAYS=1", 137 ] 138 all_dependent_configs = [ "//third_party/khronos:khronos_headers" ] 139 140 if (is_win) { 141 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 142 cflags = [ "/wd4267" ] # size_t to int truncation. 143 } 144 145 deps = [ 146 ":gles2_cmd_helper", 147 ":gles2_interface", 148 "//base", 149 "//gpu/command_buffer/common", 150 "//ui/gfx/geometry", 151 "//ui/gl", 152 ] 153} 154 155component("gl_in_process_context") { 156 sources = [ 157 "gl_in_process_context.h", 158 "gl_in_process_context.cc", 159 "gl_in_process_context_export.h", 160 ] 161 162 defines = [ "GL_IN_PROCESS_CONTEXT_IMPLEMENTATION" ] 163 164 deps = [ 165 ":gles2_implementation", 166 "//gpu", 167 "//gpu/command_buffer/common:gles2_utils", 168 "//base", 169 "//base/third_party/dynamic_annotations", 170 "//ui/gfx/geometry", 171 "//ui/gl", 172 ] 173} 174 175component("gles2_c_lib") { 176 sources = gles2_c_lib_source_files 177 defines = [ "GLES2_C_LIB_IMPLEMENTATION" ] 178 179 if (is_win) { 180 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 181 cflags = [ "/wd4267" ] # size_t to int truncation. 182 } 183 184 deps = [ 185 ":client", 186 ":gles2_interface", 187 "//base", 188 "//base/third_party/dynamic_annotations", 189 "//gpu/command_buffer/common", 190 ] 191} 192 193