OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "gpu/config/gpu_info_collector.h" | 5 #include "gpu/config/gpu_info_collector.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/android/build_info.h" | 10 #include "base/android/build_info.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 proc = base::GetFunctionPointerFromNativeLibrary(gles_library, name); | 97 proc = base::GetFunctionPointerFromNativeLibrary(gles_library, name); |
98 if (proc) | 98 if (proc) |
99 return proc; | 99 return proc; |
100 proc = eglGetProcAddressFn(name); | 100 proc = eglGetProcAddressFn(name); |
101 if (proc) | 101 if (proc) |
102 return proc; | 102 return proc; |
103 LOG(FATAL) << "Failed to look up " << name; | 103 LOG(FATAL) << "Failed to look up " << name; |
104 return (void *)nullptr; | 104 return (void *)nullptr; |
105 }; | 105 }; |
106 | 106 |
107 #define LOOKUP_FUNC(x) auto x##Fn = reinterpret_cast<gfx::x##Proc>(get_func(#x)) | 107 #define LOOKUP_FUNC(x) auto x##Fn = reinterpret_cast<gl::x##Proc>(get_func(#x)) |
108 | 108 |
109 LOOKUP_FUNC(eglGetError); | 109 LOOKUP_FUNC(eglGetError); |
110 LOOKUP_FUNC(eglQueryString); | 110 LOOKUP_FUNC(eglQueryString); |
111 LOOKUP_FUNC(eglGetCurrentContext); | 111 LOOKUP_FUNC(eglGetCurrentContext); |
112 LOOKUP_FUNC(eglGetCurrentDisplay); | 112 LOOKUP_FUNC(eglGetCurrentDisplay); |
113 LOOKUP_FUNC(eglGetCurrentSurface); | 113 LOOKUP_FUNC(eglGetCurrentSurface); |
114 LOOKUP_FUNC(eglGetDisplay); | 114 LOOKUP_FUNC(eglGetDisplay); |
115 LOOKUP_FUNC(eglInitialize); | 115 LOOKUP_FUNC(eglInitialize); |
116 LOOKUP_FUNC(eglChooseConfig); | 116 LOOKUP_FUNC(eglChooseConfig); |
117 LOOKUP_FUNC(eglCreateContext); | 117 LOOKUP_FUNC(eglCreateContext); |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 gpu_info->gpu.device_string = gpu_info->gl_renderer; | 290 gpu_info->gpu.device_string = gpu_info->gl_renderer; |
291 return kCollectInfoSuccess; | 291 return kCollectInfoSuccess; |
292 } | 292 } |
293 | 293 |
294 void MergeGPUInfo(GPUInfo* basic_gpu_info, | 294 void MergeGPUInfo(GPUInfo* basic_gpu_info, |
295 const GPUInfo& context_gpu_info) { | 295 const GPUInfo& context_gpu_info) { |
296 MergeGPUInfoGL(basic_gpu_info, context_gpu_info); | 296 MergeGPUInfoGL(basic_gpu_info, context_gpu_info); |
297 } | 297 } |
298 | 298 |
299 } // namespace gpu | 299 } // namespace gpu |
OLD | NEW |