Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Side by Side Diff: ui/gl/gl_bindings_autogen_wgl.cc

Issue 1061733002: Remove windows/mac/ios specific code from //ui (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: fix default try set Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/gl/gl_bindings_autogen_wgl.h ('k') | ui/gl/gl_context_cgl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4 //
5 // This file is auto-generated from
6 // ui/gl/generate_bindings.py
7 // It's formatted by clang-format using chromium coding style:
8 // clang-format -i -style=chromium filename
9 // DO NOT EDIT!
10
11 #include <string>
12
13 #include "base/trace_event/trace_event.h"
14 #include "ui/gl/gl_bindings.h"
15 #include "ui/gl/gl_context.h"
16 #include "ui/gl/gl_enums.h"
17 #include "ui/gl/gl_implementation.h"
18 #include "ui/gl/gl_version_info.h"
19 #include "ui/gl/gl_wgl_api_implementation.h"
20
21 namespace gfx {
22
23 static bool g_debugBindingsInitialized;
24 DriverWGL g_driver_wgl;
25
26 void DriverWGL::InitializeStaticBindings() {
27 fn.wglChoosePixelFormatARBFn = 0;
28 fn.wglCopyContextFn =
29 reinterpret_cast<wglCopyContextProc>(GetGLProcAddress("wglCopyContext"));
30 fn.wglCreateContextFn = reinterpret_cast<wglCreateContextProc>(
31 GetGLProcAddress("wglCreateContext"));
32 fn.wglCreateLayerContextFn = reinterpret_cast<wglCreateLayerContextProc>(
33 GetGLProcAddress("wglCreateLayerContext"));
34 fn.wglCreatePbufferARBFn = 0;
35 fn.wglDeleteContextFn = reinterpret_cast<wglDeleteContextProc>(
36 GetGLProcAddress("wglDeleteContext"));
37 fn.wglDestroyPbufferARBFn = 0;
38 fn.wglGetCurrentContextFn = reinterpret_cast<wglGetCurrentContextProc>(
39 GetGLProcAddress("wglGetCurrentContext"));
40 fn.wglGetCurrentDCFn = reinterpret_cast<wglGetCurrentDCProc>(
41 GetGLProcAddress("wglGetCurrentDC"));
42 fn.wglGetExtensionsStringARBFn =
43 reinterpret_cast<wglGetExtensionsStringARBProc>(
44 GetGLProcAddress("wglGetExtensionsStringARB"));
45 fn.wglGetExtensionsStringEXTFn =
46 reinterpret_cast<wglGetExtensionsStringEXTProc>(
47 GetGLProcAddress("wglGetExtensionsStringEXT"));
48 fn.wglGetPbufferDCARBFn = 0;
49 fn.wglMakeCurrentFn =
50 reinterpret_cast<wglMakeCurrentProc>(GetGLProcAddress("wglMakeCurrent"));
51 fn.wglQueryPbufferARBFn = 0;
52 fn.wglReleasePbufferDCARBFn = 0;
53 fn.wglShareListsFn =
54 reinterpret_cast<wglShareListsProc>(GetGLProcAddress("wglShareLists"));
55 fn.wglSwapIntervalEXTFn = 0;
56 fn.wglSwapLayerBuffersFn = reinterpret_cast<wglSwapLayerBuffersProc>(
57 GetGLProcAddress("wglSwapLayerBuffers"));
58 std::string extensions(GetPlatformExtensions());
59 extensions += " ";
60 ALLOW_UNUSED_LOCAL(extensions);
61
62 ext.b_WGL_ARB_extensions_string =
63 extensions.find("WGL_ARB_extensions_string ") != std::string::npos;
64 ext.b_WGL_ARB_pbuffer =
65 extensions.find("WGL_ARB_pbuffer ") != std::string::npos;
66 ext.b_WGL_ARB_pixel_format =
67 extensions.find("WGL_ARB_pixel_format ") != std::string::npos;
68 ext.b_WGL_EXT_extensions_string =
69 extensions.find("WGL_EXT_extensions_string ") != std::string::npos;
70 ext.b_WGL_EXT_swap_control =
71 extensions.find("WGL_EXT_swap_control ") != std::string::npos;
72
73 debug_fn.wglChoosePixelFormatARBFn = 0;
74 if (ext.b_WGL_ARB_pixel_format) {
75 fn.wglChoosePixelFormatARBFn =
76 reinterpret_cast<wglChoosePixelFormatARBProc>(
77 GetGLProcAddress("wglChoosePixelFormatARB"));
78 DCHECK(fn.wglChoosePixelFormatARBFn);
79 }
80
81 debug_fn.wglCreatePbufferARBFn = 0;
82 if (ext.b_WGL_ARB_pbuffer) {
83 fn.wglCreatePbufferARBFn = reinterpret_cast<wglCreatePbufferARBProc>(
84 GetGLProcAddress("wglCreatePbufferARB"));
85 DCHECK(fn.wglCreatePbufferARBFn);
86 }
87
88 debug_fn.wglDestroyPbufferARBFn = 0;
89 if (ext.b_WGL_ARB_pbuffer) {
90 fn.wglDestroyPbufferARBFn = reinterpret_cast<wglDestroyPbufferARBProc>(
91 GetGLProcAddress("wglDestroyPbufferARB"));
92 DCHECK(fn.wglDestroyPbufferARBFn);
93 }
94
95 debug_fn.wglGetPbufferDCARBFn = 0;
96 if (ext.b_WGL_ARB_pbuffer) {
97 fn.wglGetPbufferDCARBFn = reinterpret_cast<wglGetPbufferDCARBProc>(
98 GetGLProcAddress("wglGetPbufferDCARB"));
99 DCHECK(fn.wglGetPbufferDCARBFn);
100 }
101
102 debug_fn.wglQueryPbufferARBFn = 0;
103 if (ext.b_WGL_ARB_pbuffer) {
104 fn.wglQueryPbufferARBFn = reinterpret_cast<wglQueryPbufferARBProc>(
105 GetGLProcAddress("wglQueryPbufferARB"));
106 DCHECK(fn.wglQueryPbufferARBFn);
107 }
108
109 debug_fn.wglReleasePbufferDCARBFn = 0;
110 if (ext.b_WGL_ARB_pbuffer) {
111 fn.wglReleasePbufferDCARBFn = reinterpret_cast<wglReleasePbufferDCARBProc>(
112 GetGLProcAddress("wglReleasePbufferDCARB"));
113 DCHECK(fn.wglReleasePbufferDCARBFn);
114 }
115
116 debug_fn.wglSwapIntervalEXTFn = 0;
117 if (ext.b_WGL_EXT_swap_control) {
118 fn.wglSwapIntervalEXTFn = reinterpret_cast<wglSwapIntervalEXTProc>(
119 GetGLProcAddress("wglSwapIntervalEXT"));
120 DCHECK(fn.wglSwapIntervalEXTFn);
121 }
122
123 if (g_debugBindingsInitialized)
124 InitializeDebugBindings();
125 }
126
127 extern "C" {
128
129 static BOOL GL_BINDING_CALL
130 Debug_wglChoosePixelFormatARB(HDC dc,
131 const int* int_attrib_list,
132 const float* float_attrib_list,
133 UINT max_formats,
134 int* formats,
135 UINT* num_formats) {
136 GL_SERVICE_LOG("wglChoosePixelFormatARB"
137 << "(" << dc << ", "
138 << static_cast<const void*>(int_attrib_list) << ", "
139 << static_cast<const void*>(float_attrib_list) << ", "
140 << max_formats << ", " << static_cast<const void*>(formats)
141 << ", " << static_cast<const void*>(num_formats) << ")");
142 BOOL result = g_driver_wgl.debug_fn.wglChoosePixelFormatARBFn(
143 dc, int_attrib_list, float_attrib_list, max_formats, formats,
144 num_formats);
145 GL_SERVICE_LOG("GL_RESULT: " << result);
146 return result;
147 }
148
149 static BOOL GL_BINDING_CALL
150 Debug_wglCopyContext(HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask) {
151 GL_SERVICE_LOG("wglCopyContext"
152 << "(" << hglrcSrc << ", " << hglrcDst << ", " << mask << ")");
153 BOOL result =
154 g_driver_wgl.debug_fn.wglCopyContextFn(hglrcSrc, hglrcDst, mask);
155 GL_SERVICE_LOG("GL_RESULT: " << result);
156 return result;
157 }
158
159 static HGLRC GL_BINDING_CALL Debug_wglCreateContext(HDC hdc) {
160 GL_SERVICE_LOG("wglCreateContext"
161 << "(" << hdc << ")");
162 HGLRC result = g_driver_wgl.debug_fn.wglCreateContextFn(hdc);
163 GL_SERVICE_LOG("GL_RESULT: " << result);
164 return result;
165 }
166
167 static HGLRC GL_BINDING_CALL
168 Debug_wglCreateLayerContext(HDC hdc, int iLayerPlane) {
169 GL_SERVICE_LOG("wglCreateLayerContext"
170 << "(" << hdc << ", " << iLayerPlane << ")");
171 HGLRC result =
172 g_driver_wgl.debug_fn.wglCreateLayerContextFn(hdc, iLayerPlane);
173 GL_SERVICE_LOG("GL_RESULT: " << result);
174 return result;
175 }
176
177 static HPBUFFERARB GL_BINDING_CALL
178 Debug_wglCreatePbufferARB(HDC hDC,
179 int iPixelFormat,
180 int iWidth,
181 int iHeight,
182 const int* piAttribList) {
183 GL_SERVICE_LOG("wglCreatePbufferARB"
184 << "(" << hDC << ", " << iPixelFormat << ", " << iWidth << ", "
185 << iHeight << ", " << static_cast<const void*>(piAttribList)
186 << ")");
187 HPBUFFERARB result = g_driver_wgl.debug_fn.wglCreatePbufferARBFn(
188 hDC, iPixelFormat, iWidth, iHeight, piAttribList);
189 GL_SERVICE_LOG("GL_RESULT: " << result);
190 return result;
191 }
192
193 static BOOL GL_BINDING_CALL Debug_wglDeleteContext(HGLRC hglrc) {
194 GL_SERVICE_LOG("wglDeleteContext"
195 << "(" << hglrc << ")");
196 BOOL result = g_driver_wgl.debug_fn.wglDeleteContextFn(hglrc);
197 GL_SERVICE_LOG("GL_RESULT: " << result);
198 return result;
199 }
200
201 static BOOL GL_BINDING_CALL Debug_wglDestroyPbufferARB(HPBUFFERARB hPbuffer) {
202 GL_SERVICE_LOG("wglDestroyPbufferARB"
203 << "(" << hPbuffer << ")");
204 BOOL result = g_driver_wgl.debug_fn.wglDestroyPbufferARBFn(hPbuffer);
205 GL_SERVICE_LOG("GL_RESULT: " << result);
206 return result;
207 }
208
209 static HGLRC GL_BINDING_CALL Debug_wglGetCurrentContext() {
210 GL_SERVICE_LOG("wglGetCurrentContext"
211 << "("
212 << ")");
213 HGLRC result = g_driver_wgl.debug_fn.wglGetCurrentContextFn();
214 GL_SERVICE_LOG("GL_RESULT: " << result);
215 return result;
216 }
217
218 static HDC GL_BINDING_CALL Debug_wglGetCurrentDC() {
219 GL_SERVICE_LOG("wglGetCurrentDC"
220 << "("
221 << ")");
222 HDC result = g_driver_wgl.debug_fn.wglGetCurrentDCFn();
223 GL_SERVICE_LOG("GL_RESULT: " << result);
224 return result;
225 }
226
227 static const char* GL_BINDING_CALL Debug_wglGetExtensionsStringARB(HDC hDC) {
228 GL_SERVICE_LOG("wglGetExtensionsStringARB"
229 << "(" << hDC << ")");
230 const char* result = g_driver_wgl.debug_fn.wglGetExtensionsStringARBFn(hDC);
231 GL_SERVICE_LOG("GL_RESULT: " << result);
232 return result;
233 }
234
235 static const char* GL_BINDING_CALL Debug_wglGetExtensionsStringEXT() {
236 GL_SERVICE_LOG("wglGetExtensionsStringEXT"
237 << "("
238 << ")");
239 const char* result = g_driver_wgl.debug_fn.wglGetExtensionsStringEXTFn();
240 GL_SERVICE_LOG("GL_RESULT: " << result);
241 return result;
242 }
243
244 static HDC GL_BINDING_CALL Debug_wglGetPbufferDCARB(HPBUFFERARB hPbuffer) {
245 GL_SERVICE_LOG("wglGetPbufferDCARB"
246 << "(" << hPbuffer << ")");
247 HDC result = g_driver_wgl.debug_fn.wglGetPbufferDCARBFn(hPbuffer);
248 GL_SERVICE_LOG("GL_RESULT: " << result);
249 return result;
250 }
251
252 static BOOL GL_BINDING_CALL Debug_wglMakeCurrent(HDC hdc, HGLRC hglrc) {
253 GL_SERVICE_LOG("wglMakeCurrent"
254 << "(" << hdc << ", " << hglrc << ")");
255 BOOL result = g_driver_wgl.debug_fn.wglMakeCurrentFn(hdc, hglrc);
256 GL_SERVICE_LOG("GL_RESULT: " << result);
257 return result;
258 }
259
260 static BOOL GL_BINDING_CALL
261 Debug_wglQueryPbufferARB(HPBUFFERARB hPbuffer, int iAttribute, int* piValue) {
262 GL_SERVICE_LOG("wglQueryPbufferARB"
263 << "(" << hPbuffer << ", " << iAttribute << ", "
264 << static_cast<const void*>(piValue) << ")");
265 BOOL result =
266 g_driver_wgl.debug_fn.wglQueryPbufferARBFn(hPbuffer, iAttribute, piValue);
267 GL_SERVICE_LOG("GL_RESULT: " << result);
268 return result;
269 }
270
271 static int GL_BINDING_CALL
272 Debug_wglReleasePbufferDCARB(HPBUFFERARB hPbuffer, HDC hDC) {
273 GL_SERVICE_LOG("wglReleasePbufferDCARB"
274 << "(" << hPbuffer << ", " << hDC << ")");
275 int result = g_driver_wgl.debug_fn.wglReleasePbufferDCARBFn(hPbuffer, hDC);
276 GL_SERVICE_LOG("GL_RESULT: " << result);
277 return result;
278 }
279
280 static BOOL GL_BINDING_CALL Debug_wglShareLists(HGLRC hglrc1, HGLRC hglrc2) {
281 GL_SERVICE_LOG("wglShareLists"
282 << "(" << hglrc1 << ", " << hglrc2 << ")");
283 BOOL result = g_driver_wgl.debug_fn.wglShareListsFn(hglrc1, hglrc2);
284 GL_SERVICE_LOG("GL_RESULT: " << result);
285 return result;
286 }
287
288 static BOOL GL_BINDING_CALL Debug_wglSwapIntervalEXT(int interval) {
289 GL_SERVICE_LOG("wglSwapIntervalEXT"
290 << "(" << interval << ")");
291 BOOL result = g_driver_wgl.debug_fn.wglSwapIntervalEXTFn(interval);
292 GL_SERVICE_LOG("GL_RESULT: " << result);
293 return result;
294 }
295
296 static BOOL GL_BINDING_CALL Debug_wglSwapLayerBuffers(HDC hdc, UINT fuPlanes) {
297 GL_SERVICE_LOG("wglSwapLayerBuffers"
298 << "(" << hdc << ", " << fuPlanes << ")");
299 BOOL result = g_driver_wgl.debug_fn.wglSwapLayerBuffersFn(hdc, fuPlanes);
300 GL_SERVICE_LOG("GL_RESULT: " << result);
301 return result;
302 }
303 } // extern "C"
304
305 void DriverWGL::InitializeDebugBindings() {
306 if (!debug_fn.wglChoosePixelFormatARBFn) {
307 debug_fn.wglChoosePixelFormatARBFn = fn.wglChoosePixelFormatARBFn;
308 fn.wglChoosePixelFormatARBFn = Debug_wglChoosePixelFormatARB;
309 }
310 if (!debug_fn.wglCopyContextFn) {
311 debug_fn.wglCopyContextFn = fn.wglCopyContextFn;
312 fn.wglCopyContextFn = Debug_wglCopyContext;
313 }
314 if (!debug_fn.wglCreateContextFn) {
315 debug_fn.wglCreateContextFn = fn.wglCreateContextFn;
316 fn.wglCreateContextFn = Debug_wglCreateContext;
317 }
318 if (!debug_fn.wglCreateLayerContextFn) {
319 debug_fn.wglCreateLayerContextFn = fn.wglCreateLayerContextFn;
320 fn.wglCreateLayerContextFn = Debug_wglCreateLayerContext;
321 }
322 if (!debug_fn.wglCreatePbufferARBFn) {
323 debug_fn.wglCreatePbufferARBFn = fn.wglCreatePbufferARBFn;
324 fn.wglCreatePbufferARBFn = Debug_wglCreatePbufferARB;
325 }
326 if (!debug_fn.wglDeleteContextFn) {
327 debug_fn.wglDeleteContextFn = fn.wglDeleteContextFn;
328 fn.wglDeleteContextFn = Debug_wglDeleteContext;
329 }
330 if (!debug_fn.wglDestroyPbufferARBFn) {
331 debug_fn.wglDestroyPbufferARBFn = fn.wglDestroyPbufferARBFn;
332 fn.wglDestroyPbufferARBFn = Debug_wglDestroyPbufferARB;
333 }
334 if (!debug_fn.wglGetCurrentContextFn) {
335 debug_fn.wglGetCurrentContextFn = fn.wglGetCurrentContextFn;
336 fn.wglGetCurrentContextFn = Debug_wglGetCurrentContext;
337 }
338 if (!debug_fn.wglGetCurrentDCFn) {
339 debug_fn.wglGetCurrentDCFn = fn.wglGetCurrentDCFn;
340 fn.wglGetCurrentDCFn = Debug_wglGetCurrentDC;
341 }
342 if (!debug_fn.wglGetExtensionsStringARBFn) {
343 debug_fn.wglGetExtensionsStringARBFn = fn.wglGetExtensionsStringARBFn;
344 fn.wglGetExtensionsStringARBFn = Debug_wglGetExtensionsStringARB;
345 }
346 if (!debug_fn.wglGetExtensionsStringEXTFn) {
347 debug_fn.wglGetExtensionsStringEXTFn = fn.wglGetExtensionsStringEXTFn;
348 fn.wglGetExtensionsStringEXTFn = Debug_wglGetExtensionsStringEXT;
349 }
350 if (!debug_fn.wglGetPbufferDCARBFn) {
351 debug_fn.wglGetPbufferDCARBFn = fn.wglGetPbufferDCARBFn;
352 fn.wglGetPbufferDCARBFn = Debug_wglGetPbufferDCARB;
353 }
354 if (!debug_fn.wglMakeCurrentFn) {
355 debug_fn.wglMakeCurrentFn = fn.wglMakeCurrentFn;
356 fn.wglMakeCurrentFn = Debug_wglMakeCurrent;
357 }
358 if (!debug_fn.wglQueryPbufferARBFn) {
359 debug_fn.wglQueryPbufferARBFn = fn.wglQueryPbufferARBFn;
360 fn.wglQueryPbufferARBFn = Debug_wglQueryPbufferARB;
361 }
362 if (!debug_fn.wglReleasePbufferDCARBFn) {
363 debug_fn.wglReleasePbufferDCARBFn = fn.wglReleasePbufferDCARBFn;
364 fn.wglReleasePbufferDCARBFn = Debug_wglReleasePbufferDCARB;
365 }
366 if (!debug_fn.wglShareListsFn) {
367 debug_fn.wglShareListsFn = fn.wglShareListsFn;
368 fn.wglShareListsFn = Debug_wglShareLists;
369 }
370 if (!debug_fn.wglSwapIntervalEXTFn) {
371 debug_fn.wglSwapIntervalEXTFn = fn.wglSwapIntervalEXTFn;
372 fn.wglSwapIntervalEXTFn = Debug_wglSwapIntervalEXT;
373 }
374 if (!debug_fn.wglSwapLayerBuffersFn) {
375 debug_fn.wglSwapLayerBuffersFn = fn.wglSwapLayerBuffersFn;
376 fn.wglSwapLayerBuffersFn = Debug_wglSwapLayerBuffers;
377 }
378 g_debugBindingsInitialized = true;
379 }
380
381 void DriverWGL::ClearBindings() {
382 memset(this, 0, sizeof(*this));
383 }
384
385 BOOL WGLApiBase::wglChoosePixelFormatARBFn(HDC dc,
386 const int* int_attrib_list,
387 const float* float_attrib_list,
388 UINT max_formats,
389 int* formats,
390 UINT* num_formats) {
391 return driver_->fn.wglChoosePixelFormatARBFn(dc, int_attrib_list,
392 float_attrib_list, max_formats,
393 formats, num_formats);
394 }
395
396 BOOL WGLApiBase::wglCopyContextFn(HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask) {
397 return driver_->fn.wglCopyContextFn(hglrcSrc, hglrcDst, mask);
398 }
399
400 HGLRC WGLApiBase::wglCreateContextFn(HDC hdc) {
401 return driver_->fn.wglCreateContextFn(hdc);
402 }
403
404 HGLRC WGLApiBase::wglCreateLayerContextFn(HDC hdc, int iLayerPlane) {
405 return driver_->fn.wglCreateLayerContextFn(hdc, iLayerPlane);
406 }
407
408 HPBUFFERARB WGLApiBase::wglCreatePbufferARBFn(HDC hDC,
409 int iPixelFormat,
410 int iWidth,
411 int iHeight,
412 const int* piAttribList) {
413 return driver_->fn.wglCreatePbufferARBFn(hDC, iPixelFormat, iWidth, iHeight,
414 piAttribList);
415 }
416
417 BOOL WGLApiBase::wglDeleteContextFn(HGLRC hglrc) {
418 return driver_->fn.wglDeleteContextFn(hglrc);
419 }
420
421 BOOL WGLApiBase::wglDestroyPbufferARBFn(HPBUFFERARB hPbuffer) {
422 return driver_->fn.wglDestroyPbufferARBFn(hPbuffer);
423 }
424
425 HGLRC WGLApiBase::wglGetCurrentContextFn() {
426 return driver_->fn.wglGetCurrentContextFn();
427 }
428
429 HDC WGLApiBase::wglGetCurrentDCFn() {
430 return driver_->fn.wglGetCurrentDCFn();
431 }
432
433 const char* WGLApiBase::wglGetExtensionsStringARBFn(HDC hDC) {
434 return driver_->fn.wglGetExtensionsStringARBFn(hDC);
435 }
436
437 const char* WGLApiBase::wglGetExtensionsStringEXTFn() {
438 return driver_->fn.wglGetExtensionsStringEXTFn();
439 }
440
441 HDC WGLApiBase::wglGetPbufferDCARBFn(HPBUFFERARB hPbuffer) {
442 return driver_->fn.wglGetPbufferDCARBFn(hPbuffer);
443 }
444
445 BOOL WGLApiBase::wglMakeCurrentFn(HDC hdc, HGLRC hglrc) {
446 return driver_->fn.wglMakeCurrentFn(hdc, hglrc);
447 }
448
449 BOOL WGLApiBase::wglQueryPbufferARBFn(HPBUFFERARB hPbuffer,
450 int iAttribute,
451 int* piValue) {
452 return driver_->fn.wglQueryPbufferARBFn(hPbuffer, iAttribute, piValue);
453 }
454
455 int WGLApiBase::wglReleasePbufferDCARBFn(HPBUFFERARB hPbuffer, HDC hDC) {
456 return driver_->fn.wglReleasePbufferDCARBFn(hPbuffer, hDC);
457 }
458
459 BOOL WGLApiBase::wglShareListsFn(HGLRC hglrc1, HGLRC hglrc2) {
460 return driver_->fn.wglShareListsFn(hglrc1, hglrc2);
461 }
462
463 BOOL WGLApiBase::wglSwapIntervalEXTFn(int interval) {
464 return driver_->fn.wglSwapIntervalEXTFn(interval);
465 }
466
467 BOOL WGLApiBase::wglSwapLayerBuffersFn(HDC hdc, UINT fuPlanes) {
468 return driver_->fn.wglSwapLayerBuffersFn(hdc, fuPlanes);
469 }
470
471 BOOL TraceWGLApi::wglChoosePixelFormatARBFn(HDC dc,
472 const int* int_attrib_list,
473 const float* float_attrib_list,
474 UINT max_formats,
475 int* formats,
476 UINT* num_formats) {
477 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglChoosePixelFormatARB")
478 return wgl_api_->wglChoosePixelFormatARBFn(dc, int_attrib_list,
479 float_attrib_list, max_formats,
480 formats, num_formats);
481 }
482
483 BOOL TraceWGLApi::wglCopyContextFn(HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask) {
484 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglCopyContext")
485 return wgl_api_->wglCopyContextFn(hglrcSrc, hglrcDst, mask);
486 }
487
488 HGLRC TraceWGLApi::wglCreateContextFn(HDC hdc) {
489 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglCreateContext")
490 return wgl_api_->wglCreateContextFn(hdc);
491 }
492
493 HGLRC TraceWGLApi::wglCreateLayerContextFn(HDC hdc, int iLayerPlane) {
494 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglCreateLayerContext")
495 return wgl_api_->wglCreateLayerContextFn(hdc, iLayerPlane);
496 }
497
498 HPBUFFERARB TraceWGLApi::wglCreatePbufferARBFn(HDC hDC,
499 int iPixelFormat,
500 int iWidth,
501 int iHeight,
502 const int* piAttribList) {
503 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglCreatePbufferARB")
504 return wgl_api_->wglCreatePbufferARBFn(hDC, iPixelFormat, iWidth, iHeight,
505 piAttribList);
506 }
507
508 BOOL TraceWGLApi::wglDeleteContextFn(HGLRC hglrc) {
509 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglDeleteContext")
510 return wgl_api_->wglDeleteContextFn(hglrc);
511 }
512
513 BOOL TraceWGLApi::wglDestroyPbufferARBFn(HPBUFFERARB hPbuffer) {
514 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglDestroyPbufferARB")
515 return wgl_api_->wglDestroyPbufferARBFn(hPbuffer);
516 }
517
518 HGLRC TraceWGLApi::wglGetCurrentContextFn() {
519 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglGetCurrentContext")
520 return wgl_api_->wglGetCurrentContextFn();
521 }
522
523 HDC TraceWGLApi::wglGetCurrentDCFn() {
524 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglGetCurrentDC")
525 return wgl_api_->wglGetCurrentDCFn();
526 }
527
528 const char* TraceWGLApi::wglGetExtensionsStringARBFn(HDC hDC) {
529 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglGetExtensionsStringARB")
530 return wgl_api_->wglGetExtensionsStringARBFn(hDC);
531 }
532
533 const char* TraceWGLApi::wglGetExtensionsStringEXTFn() {
534 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglGetExtensionsStringEXT")
535 return wgl_api_->wglGetExtensionsStringEXTFn();
536 }
537
538 HDC TraceWGLApi::wglGetPbufferDCARBFn(HPBUFFERARB hPbuffer) {
539 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglGetPbufferDCARB")
540 return wgl_api_->wglGetPbufferDCARBFn(hPbuffer);
541 }
542
543 BOOL TraceWGLApi::wglMakeCurrentFn(HDC hdc, HGLRC hglrc) {
544 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglMakeCurrent")
545 return wgl_api_->wglMakeCurrentFn(hdc, hglrc);
546 }
547
548 BOOL TraceWGLApi::wglQueryPbufferARBFn(HPBUFFERARB hPbuffer,
549 int iAttribute,
550 int* piValue) {
551 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglQueryPbufferARB")
552 return wgl_api_->wglQueryPbufferARBFn(hPbuffer, iAttribute, piValue);
553 }
554
555 int TraceWGLApi::wglReleasePbufferDCARBFn(HPBUFFERARB hPbuffer, HDC hDC) {
556 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglReleasePbufferDCARB")
557 return wgl_api_->wglReleasePbufferDCARBFn(hPbuffer, hDC);
558 }
559
560 BOOL TraceWGLApi::wglShareListsFn(HGLRC hglrc1, HGLRC hglrc2) {
561 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglShareLists")
562 return wgl_api_->wglShareListsFn(hglrc1, hglrc2);
563 }
564
565 BOOL TraceWGLApi::wglSwapIntervalEXTFn(int interval) {
566 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglSwapIntervalEXT")
567 return wgl_api_->wglSwapIntervalEXTFn(interval);
568 }
569
570 BOOL TraceWGLApi::wglSwapLayerBuffersFn(HDC hdc, UINT fuPlanes) {
571 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglSwapLayerBuffers")
572 return wgl_api_->wglSwapLayerBuffersFn(hdc, fuPlanes);
573 }
574
575 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_bindings_autogen_wgl.h ('k') | ui/gl/gl_context_cgl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698