12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277 |
- // Copyright 2016 The Chromium Authors. All rights reserved.
- // Use of this source code is governed by a BSD-style license that can be
- // found in the LICENSE file.
- //
- // This file is auto-generated from
- // ui/gl/generate_bindings.py
- // It's formatted by clang-format using chromium coding style:
- // clang-format -i -style=chromium filename
- // DO NOT EDIT!
- #include <string>
- #include "base/trace_event/trace_event.h"
- #include "ui/gl/gl_bindings.h"
- #include "ui/gl/gl_context.h"
- #include "ui/gl/gl_enums.h"
- #include "ui/gl/gl_glx_api_implementation.h"
- #include "ui/gl/gl_implementation.h"
- #include "ui/gl/gl_version_info.h"
- namespace gl {
- DriverGLX g_driver_glx; // Exists in .bss
- void DriverGLX::InitializeStaticBindings() {
- // Ensure struct has been zero-initialized.
- char* this_bytes = reinterpret_cast<char*>(this);
- DCHECK(this_bytes[0] == 0);
- DCHECK(memcmp(this_bytes, this_bytes + 1, sizeof(*this) - 1) == 0);
- fn.glXChooseFBConfigFn = reinterpret_cast<glXChooseFBConfigProc>(
- GetGLProcAddress("glXChooseFBConfig"));
- fn.glXChooseVisualFn = reinterpret_cast<glXChooseVisualProc>(
- GetGLProcAddress("glXChooseVisual"));
- fn.glXCopyContextFn =
- reinterpret_cast<glXCopyContextProc>(GetGLProcAddress("glXCopyContext"));
- fn.glXCreateContextFn = reinterpret_cast<glXCreateContextProc>(
- GetGLProcAddress("glXCreateContext"));
- fn.glXCreateGLXPixmapFn = reinterpret_cast<glXCreateGLXPixmapProc>(
- GetGLProcAddress("glXCreateGLXPixmap"));
- fn.glXCreateNewContextFn = reinterpret_cast<glXCreateNewContextProc>(
- GetGLProcAddress("glXCreateNewContext"));
- fn.glXCreatePbufferFn = reinterpret_cast<glXCreatePbufferProc>(
- GetGLProcAddress("glXCreatePbuffer"));
- fn.glXCreatePixmapFn = reinterpret_cast<glXCreatePixmapProc>(
- GetGLProcAddress("glXCreatePixmap"));
- fn.glXCreateWindowFn = reinterpret_cast<glXCreateWindowProc>(
- GetGLProcAddress("glXCreateWindow"));
- fn.glXDestroyContextFn = reinterpret_cast<glXDestroyContextProc>(
- GetGLProcAddress("glXDestroyContext"));
- fn.glXDestroyGLXPixmapFn = reinterpret_cast<glXDestroyGLXPixmapProc>(
- GetGLProcAddress("glXDestroyGLXPixmap"));
- fn.glXDestroyPbufferFn = reinterpret_cast<glXDestroyPbufferProc>(
- GetGLProcAddress("glXDestroyPbuffer"));
- fn.glXDestroyPixmapFn = reinterpret_cast<glXDestroyPixmapProc>(
- GetGLProcAddress("glXDestroyPixmap"));
- fn.glXDestroyWindowFn = reinterpret_cast<glXDestroyWindowProc>(
- GetGLProcAddress("glXDestroyWindow"));
- fn.glXGetClientStringFn = reinterpret_cast<glXGetClientStringProc>(
- GetGLProcAddress("glXGetClientString"));
- fn.glXGetConfigFn =
- reinterpret_cast<glXGetConfigProc>(GetGLProcAddress("glXGetConfig"));
- fn.glXGetCurrentContextFn = reinterpret_cast<glXGetCurrentContextProc>(
- GetGLProcAddress("glXGetCurrentContext"));
- fn.glXGetCurrentDisplayFn = reinterpret_cast<glXGetCurrentDisplayProc>(
- GetGLProcAddress("glXGetCurrentDisplay"));
- fn.glXGetCurrentDrawableFn = reinterpret_cast<glXGetCurrentDrawableProc>(
- GetGLProcAddress("glXGetCurrentDrawable"));
- fn.glXGetCurrentReadDrawableFn =
- reinterpret_cast<glXGetCurrentReadDrawableProc>(
- GetGLProcAddress("glXGetCurrentReadDrawable"));
- fn.glXGetFBConfigAttribFn = reinterpret_cast<glXGetFBConfigAttribProc>(
- GetGLProcAddress("glXGetFBConfigAttrib"));
- fn.glXGetFBConfigsFn = reinterpret_cast<glXGetFBConfigsProc>(
- GetGLProcAddress("glXGetFBConfigs"));
- fn.glXGetSelectedEventFn = reinterpret_cast<glXGetSelectedEventProc>(
- GetGLProcAddress("glXGetSelectedEvent"));
- fn.glXGetVisualFromFBConfigFn =
- reinterpret_cast<glXGetVisualFromFBConfigProc>(
- GetGLProcAddress("glXGetVisualFromFBConfig"));
- fn.glXIsDirectFn =
- reinterpret_cast<glXIsDirectProc>(GetGLProcAddress("glXIsDirect"));
- fn.glXMakeContextCurrentFn = reinterpret_cast<glXMakeContextCurrentProc>(
- GetGLProcAddress("glXMakeContextCurrent"));
- fn.glXMakeCurrentFn =
- reinterpret_cast<glXMakeCurrentProc>(GetGLProcAddress("glXMakeCurrent"));
- fn.glXQueryContextFn = reinterpret_cast<glXQueryContextProc>(
- GetGLProcAddress("glXQueryContext"));
- fn.glXQueryDrawableFn = reinterpret_cast<glXQueryDrawableProc>(
- GetGLProcAddress("glXQueryDrawable"));
- fn.glXQueryExtensionFn = reinterpret_cast<glXQueryExtensionProc>(
- GetGLProcAddress("glXQueryExtension"));
- fn.glXQueryExtensionsStringFn =
- reinterpret_cast<glXQueryExtensionsStringProc>(
- GetGLProcAddress("glXQueryExtensionsString"));
- fn.glXQueryServerStringFn = reinterpret_cast<glXQueryServerStringProc>(
- GetGLProcAddress("glXQueryServerString"));
- fn.glXQueryVersionFn = reinterpret_cast<glXQueryVersionProc>(
- GetGLProcAddress("glXQueryVersion"));
- fn.glXSelectEventFn =
- reinterpret_cast<glXSelectEventProc>(GetGLProcAddress("glXSelectEvent"));
- fn.glXSwapBuffersFn =
- reinterpret_cast<glXSwapBuffersProc>(GetGLProcAddress("glXSwapBuffers"));
- fn.glXUseXFontFn =
- reinterpret_cast<glXUseXFontProc>(GetGLProcAddress("glXUseXFont"));
- fn.glXWaitGLFn =
- reinterpret_cast<glXWaitGLProc>(GetGLProcAddress("glXWaitGL"));
- fn.glXWaitXFn = reinterpret_cast<glXWaitXProc>(GetGLProcAddress("glXWaitX"));
- }
- void DriverGLX::InitializeExtensionBindings() {
- std::string platform_extensions(GetPlatformExtensions());
- [[maybe_unused]] gfx::ExtensionSet extensions(
- gfx::MakeExtensionSet(platform_extensions));
- ext.b_GLX_ARB_create_context =
- gfx::HasExtension(extensions, "GLX_ARB_create_context");
- ext.b_GLX_EXT_swap_control =
- gfx::HasExtension(extensions, "GLX_EXT_swap_control");
- ext.b_GLX_EXT_texture_from_pixmap =
- gfx::HasExtension(extensions, "GLX_EXT_texture_from_pixmap");
- ext.b_GLX_MESA_copy_sub_buffer =
- gfx::HasExtension(extensions, "GLX_MESA_copy_sub_buffer");
- ext.b_GLX_MESA_swap_control =
- gfx::HasExtension(extensions, "GLX_MESA_swap_control");
- ext.b_GLX_OML_sync_control =
- gfx::HasExtension(extensions, "GLX_OML_sync_control");
- ext.b_GLX_SGIX_fbconfig = gfx::HasExtension(extensions, "GLX_SGIX_fbconfig");
- ext.b_GLX_SGI_video_sync =
- gfx::HasExtension(extensions, "GLX_SGI_video_sync");
- if (ext.b_GLX_EXT_texture_from_pixmap) {
- fn.glXBindTexImageEXTFn = reinterpret_cast<glXBindTexImageEXTProc>(
- GetGLProcAddress("glXBindTexImageEXT"));
- }
- if (ext.b_GLX_MESA_copy_sub_buffer) {
- fn.glXCopySubBufferMESAFn = reinterpret_cast<glXCopySubBufferMESAProc>(
- GetGLProcAddress("glXCopySubBufferMESA"));
- }
- if (ext.b_GLX_ARB_create_context) {
- fn.glXCreateContextAttribsARBFn =
- reinterpret_cast<glXCreateContextAttribsARBProc>(
- GetGLProcAddress("glXCreateContextAttribsARB"));
- }
- if (ext.b_GLX_SGIX_fbconfig) {
- fn.glXGetFBConfigFromVisualSGIXFn =
- reinterpret_cast<glXGetFBConfigFromVisualSGIXProc>(
- GetGLProcAddress("glXGetFBConfigFromVisualSGIX"));
- }
- if (ext.b_GLX_OML_sync_control) {
- fn.glXGetMscRateOMLFn = reinterpret_cast<glXGetMscRateOMLProc>(
- GetGLProcAddress("glXGetMscRateOML"));
- }
- if (ext.b_GLX_OML_sync_control) {
- fn.glXGetSyncValuesOMLFn = reinterpret_cast<glXGetSyncValuesOMLProc>(
- GetGLProcAddress("glXGetSyncValuesOML"));
- }
- if (ext.b_GLX_EXT_texture_from_pixmap) {
- fn.glXReleaseTexImageEXTFn = reinterpret_cast<glXReleaseTexImageEXTProc>(
- GetGLProcAddress("glXReleaseTexImageEXT"));
- }
- if (ext.b_GLX_EXT_swap_control) {
- fn.glXSwapIntervalEXTFn = reinterpret_cast<glXSwapIntervalEXTProc>(
- GetGLProcAddress("glXSwapIntervalEXT"));
- }
- if (ext.b_GLX_MESA_swap_control) {
- fn.glXSwapIntervalMESAFn = reinterpret_cast<glXSwapIntervalMESAProc>(
- GetGLProcAddress("glXSwapIntervalMESA"));
- }
- if (ext.b_GLX_SGI_video_sync) {
- fn.glXWaitVideoSyncSGIFn = reinterpret_cast<glXWaitVideoSyncSGIProc>(
- GetGLProcAddress("glXWaitVideoSyncSGI"));
- }
- }
- void DriverGLX::ClearBindings() {
- memset(this, 0, sizeof(*this));
- }
- void GLXApiBase::glXBindTexImageEXTFn(Display* dpy,
- GLXDrawable drawable,
- int buffer,
- int* attribList) {
- driver_->fn.glXBindTexImageEXTFn(dpy, drawable, buffer, attribList);
- }
- GLXFBConfig* GLXApiBase::glXChooseFBConfigFn(Display* dpy,
- int screen,
- const int* attribList,
- int* nitems) {
- return driver_->fn.glXChooseFBConfigFn(dpy, screen, attribList, nitems);
- }
- XVisualInfo* GLXApiBase::glXChooseVisualFn(Display* dpy,
- int screen,
- int* attribList) {
- return driver_->fn.glXChooseVisualFn(dpy, screen, attribList);
- }
- void GLXApiBase::glXCopyContextFn(Display* dpy,
- GLXContext src,
- GLXContext dst,
- unsigned long mask) {
- driver_->fn.glXCopyContextFn(dpy, src, dst, mask);
- }
- void GLXApiBase::glXCopySubBufferMESAFn(Display* dpy,
- GLXDrawable drawable,
- int x,
- int y,
- int width,
- int height) {
- driver_->fn.glXCopySubBufferMESAFn(dpy, drawable, x, y, width, height);
- }
- GLXContext GLXApiBase::glXCreateContextFn(Display* dpy,
- XVisualInfo* vis,
- GLXContext shareList,
- int direct) {
- return driver_->fn.glXCreateContextFn(dpy, vis, shareList, direct);
- }
- GLXContext GLXApiBase::glXCreateContextAttribsARBFn(Display* dpy,
- GLXFBConfig config,
- GLXContext share_context,
- int direct,
- const int* attrib_list) {
- return driver_->fn.glXCreateContextAttribsARBFn(dpy, config, share_context,
- direct, attrib_list);
- }
- GLXPixmap GLXApiBase::glXCreateGLXPixmapFn(Display* dpy,
- XVisualInfo* visual,
- Pixmap pixmap) {
- return driver_->fn.glXCreateGLXPixmapFn(dpy, visual, pixmap);
- }
- GLXContext GLXApiBase::glXCreateNewContextFn(Display* dpy,
- GLXFBConfig config,
- int renderType,
- GLXContext shareList,
- int direct) {
- return driver_->fn.glXCreateNewContextFn(dpy, config, renderType, shareList,
- direct);
- }
- GLXPbuffer GLXApiBase::glXCreatePbufferFn(Display* dpy,
- GLXFBConfig config,
- const int* attribList) {
- return driver_->fn.glXCreatePbufferFn(dpy, config, attribList);
- }
- GLXPixmap GLXApiBase::glXCreatePixmapFn(Display* dpy,
- GLXFBConfig config,
- Pixmap pixmap,
- const int* attribList) {
- return driver_->fn.glXCreatePixmapFn(dpy, config, pixmap, attribList);
- }
- GLXWindow GLXApiBase::glXCreateWindowFn(Display* dpy,
- GLXFBConfig config,
- Window win,
- const int* attribList) {
- return driver_->fn.glXCreateWindowFn(dpy, config, win, attribList);
- }
- void GLXApiBase::glXDestroyContextFn(Display* dpy, GLXContext ctx) {
- driver_->fn.glXDestroyContextFn(dpy, ctx);
- }
- void GLXApiBase::glXDestroyGLXPixmapFn(Display* dpy, GLXPixmap pixmap) {
- driver_->fn.glXDestroyGLXPixmapFn(dpy, pixmap);
- }
- void GLXApiBase::glXDestroyPbufferFn(Display* dpy, GLXPbuffer pbuf) {
- driver_->fn.glXDestroyPbufferFn(dpy, pbuf);
- }
- void GLXApiBase::glXDestroyPixmapFn(Display* dpy, GLXPixmap pixmap) {
- driver_->fn.glXDestroyPixmapFn(dpy, pixmap);
- }
- void GLXApiBase::glXDestroyWindowFn(Display* dpy, GLXWindow window) {
- driver_->fn.glXDestroyWindowFn(dpy, window);
- }
- const char* GLXApiBase::glXGetClientStringFn(Display* dpy, int name) {
- return driver_->fn.glXGetClientStringFn(dpy, name);
- }
- int GLXApiBase::glXGetConfigFn(Display* dpy,
- XVisualInfo* visual,
- int attrib,
- int* value) {
- return driver_->fn.glXGetConfigFn(dpy, visual, attrib, value);
- }
- GLXContext GLXApiBase::glXGetCurrentContextFn(void) {
- return driver_->fn.glXGetCurrentContextFn();
- }
- Display* GLXApiBase::glXGetCurrentDisplayFn(void) {
- return driver_->fn.glXGetCurrentDisplayFn();
- }
- GLXDrawable GLXApiBase::glXGetCurrentDrawableFn(void) {
- return driver_->fn.glXGetCurrentDrawableFn();
- }
- GLXDrawable GLXApiBase::glXGetCurrentReadDrawableFn(void) {
- return driver_->fn.glXGetCurrentReadDrawableFn();
- }
- int GLXApiBase::glXGetFBConfigAttribFn(Display* dpy,
- GLXFBConfig config,
- int attribute,
- int* value) {
- return driver_->fn.glXGetFBConfigAttribFn(dpy, config, attribute, value);
- }
- GLXFBConfig GLXApiBase::glXGetFBConfigFromVisualSGIXFn(
- Display* dpy,
- XVisualInfo* visualInfo) {
- return driver_->fn.glXGetFBConfigFromVisualSGIXFn(dpy, visualInfo);
- }
- GLXFBConfig* GLXApiBase::glXGetFBConfigsFn(Display* dpy,
- int screen,
- int* nelements) {
- return driver_->fn.glXGetFBConfigsFn(dpy, screen, nelements);
- }
- bool GLXApiBase::glXGetMscRateOMLFn(Display* dpy,
- GLXDrawable drawable,
- int32_t* numerator,
- int32_t* denominator) {
- return driver_->fn.glXGetMscRateOMLFn(dpy, drawable, numerator, denominator);
- }
- void GLXApiBase::glXGetSelectedEventFn(Display* dpy,
- GLXDrawable drawable,
- unsigned long* mask) {
- driver_->fn.glXGetSelectedEventFn(dpy, drawable, mask);
- }
- bool GLXApiBase::glXGetSyncValuesOMLFn(Display* dpy,
- GLXDrawable drawable,
- int64_t* ust,
- int64_t* msc,
- int64_t* sbc) {
- return driver_->fn.glXGetSyncValuesOMLFn(dpy, drawable, ust, msc, sbc);
- }
- XVisualInfo* GLXApiBase::glXGetVisualFromFBConfigFn(Display* dpy,
- GLXFBConfig config) {
- return driver_->fn.glXGetVisualFromFBConfigFn(dpy, config);
- }
- int GLXApiBase::glXIsDirectFn(Display* dpy, GLXContext ctx) {
- return driver_->fn.glXIsDirectFn(dpy, ctx);
- }
- int GLXApiBase::glXMakeContextCurrentFn(Display* dpy,
- GLXDrawable draw,
- GLXDrawable read,
- GLXContext ctx) {
- return driver_->fn.glXMakeContextCurrentFn(dpy, draw, read, ctx);
- }
- int GLXApiBase::glXMakeCurrentFn(Display* dpy,
- GLXDrawable drawable,
- GLXContext ctx) {
- return driver_->fn.glXMakeCurrentFn(dpy, drawable, ctx);
- }
- int GLXApiBase::glXQueryContextFn(Display* dpy,
- GLXContext ctx,
- int attribute,
- int* value) {
- return driver_->fn.glXQueryContextFn(dpy, ctx, attribute, value);
- }
- void GLXApiBase::glXQueryDrawableFn(Display* dpy,
- GLXDrawable draw,
- int attribute,
- unsigned int* value) {
- driver_->fn.glXQueryDrawableFn(dpy, draw, attribute, value);
- }
- int GLXApiBase::glXQueryExtensionFn(Display* dpy, int* errorb, int* event) {
- return driver_->fn.glXQueryExtensionFn(dpy, errorb, event);
- }
- const char* GLXApiBase::glXQueryExtensionsStringFn(Display* dpy, int screen) {
- return driver_->fn.glXQueryExtensionsStringFn(dpy, screen);
- }
- const char* GLXApiBase::glXQueryServerStringFn(Display* dpy,
- int screen,
- int name) {
- return driver_->fn.glXQueryServerStringFn(dpy, screen, name);
- }
- int GLXApiBase::glXQueryVersionFn(Display* dpy, int* maj, int* min) {
- return driver_->fn.glXQueryVersionFn(dpy, maj, min);
- }
- void GLXApiBase::glXReleaseTexImageEXTFn(Display* dpy,
- GLXDrawable drawable,
- int buffer) {
- driver_->fn.glXReleaseTexImageEXTFn(dpy, drawable, buffer);
- }
- void GLXApiBase::glXSelectEventFn(Display* dpy,
- GLXDrawable drawable,
- unsigned long mask) {
- driver_->fn.glXSelectEventFn(dpy, drawable, mask);
- }
- void GLXApiBase::glXSwapBuffersFn(Display* dpy, GLXDrawable drawable) {
- driver_->fn.glXSwapBuffersFn(dpy, drawable);
- }
- void GLXApiBase::glXSwapIntervalEXTFn(Display* dpy,
- GLXDrawable drawable,
- int interval) {
- driver_->fn.glXSwapIntervalEXTFn(dpy, drawable, interval);
- }
- void GLXApiBase::glXSwapIntervalMESAFn(unsigned int interval) {
- driver_->fn.glXSwapIntervalMESAFn(interval);
- }
- void GLXApiBase::glXUseXFontFn(Font font, int first, int count, int list) {
- driver_->fn.glXUseXFontFn(font, first, count, list);
- }
- void GLXApiBase::glXWaitGLFn(void) {
- driver_->fn.glXWaitGLFn();
- }
- int GLXApiBase::glXWaitVideoSyncSGIFn(int divisor,
- int remainder,
- unsigned int* count) {
- return driver_->fn.glXWaitVideoSyncSGIFn(divisor, remainder, count);
- }
- void GLXApiBase::glXWaitXFn(void) {
- driver_->fn.glXWaitXFn();
- }
- void TraceGLXApi::glXBindTexImageEXTFn(Display* dpy,
- GLXDrawable drawable,
- int buffer,
- int* attribList) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXBindTexImageEXT");
- glx_api_->glXBindTexImageEXTFn(dpy, drawable, buffer, attribList);
- }
- GLXFBConfig* TraceGLXApi::glXChooseFBConfigFn(Display* dpy,
- int screen,
- const int* attribList,
- int* nitems) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXChooseFBConfig");
- return glx_api_->glXChooseFBConfigFn(dpy, screen, attribList, nitems);
- }
- XVisualInfo* TraceGLXApi::glXChooseVisualFn(Display* dpy,
- int screen,
- int* attribList) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXChooseVisual");
- return glx_api_->glXChooseVisualFn(dpy, screen, attribList);
- }
- void TraceGLXApi::glXCopyContextFn(Display* dpy,
- GLXContext src,
- GLXContext dst,
- unsigned long mask) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXCopyContext");
- glx_api_->glXCopyContextFn(dpy, src, dst, mask);
- }
- void TraceGLXApi::glXCopySubBufferMESAFn(Display* dpy,
- GLXDrawable drawable,
- int x,
- int y,
- int width,
- int height) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXCopySubBufferMESA");
- glx_api_->glXCopySubBufferMESAFn(dpy, drawable, x, y, width, height);
- }
- GLXContext TraceGLXApi::glXCreateContextFn(Display* dpy,
- XVisualInfo* vis,
- GLXContext shareList,
- int direct) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXCreateContext");
- return glx_api_->glXCreateContextFn(dpy, vis, shareList, direct);
- }
- GLXContext TraceGLXApi::glXCreateContextAttribsARBFn(Display* dpy,
- GLXFBConfig config,
- GLXContext share_context,
- int direct,
- const int* attrib_list) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu",
- "TraceGLXAPI::glXCreateContextAttribsARB");
- return glx_api_->glXCreateContextAttribsARBFn(dpy, config, share_context,
- direct, attrib_list);
- }
- GLXPixmap TraceGLXApi::glXCreateGLXPixmapFn(Display* dpy,
- XVisualInfo* visual,
- Pixmap pixmap) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXCreateGLXPixmap");
- return glx_api_->glXCreateGLXPixmapFn(dpy, visual, pixmap);
- }
- GLXContext TraceGLXApi::glXCreateNewContextFn(Display* dpy,
- GLXFBConfig config,
- int renderType,
- GLXContext shareList,
- int direct) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXCreateNewContext");
- return glx_api_->glXCreateNewContextFn(dpy, config, renderType, shareList,
- direct);
- }
- GLXPbuffer TraceGLXApi::glXCreatePbufferFn(Display* dpy,
- GLXFBConfig config,
- const int* attribList) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXCreatePbuffer");
- return glx_api_->glXCreatePbufferFn(dpy, config, attribList);
- }
- GLXPixmap TraceGLXApi::glXCreatePixmapFn(Display* dpy,
- GLXFBConfig config,
- Pixmap pixmap,
- const int* attribList) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXCreatePixmap");
- return glx_api_->glXCreatePixmapFn(dpy, config, pixmap, attribList);
- }
- GLXWindow TraceGLXApi::glXCreateWindowFn(Display* dpy,
- GLXFBConfig config,
- Window win,
- const int* attribList) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXCreateWindow");
- return glx_api_->glXCreateWindowFn(dpy, config, win, attribList);
- }
- void TraceGLXApi::glXDestroyContextFn(Display* dpy, GLXContext ctx) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXDestroyContext");
- glx_api_->glXDestroyContextFn(dpy, ctx);
- }
- void TraceGLXApi::glXDestroyGLXPixmapFn(Display* dpy, GLXPixmap pixmap) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXDestroyGLXPixmap");
- glx_api_->glXDestroyGLXPixmapFn(dpy, pixmap);
- }
- void TraceGLXApi::glXDestroyPbufferFn(Display* dpy, GLXPbuffer pbuf) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXDestroyPbuffer");
- glx_api_->glXDestroyPbufferFn(dpy, pbuf);
- }
- void TraceGLXApi::glXDestroyPixmapFn(Display* dpy, GLXPixmap pixmap) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXDestroyPixmap");
- glx_api_->glXDestroyPixmapFn(dpy, pixmap);
- }
- void TraceGLXApi::glXDestroyWindowFn(Display* dpy, GLXWindow window) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXDestroyWindow");
- glx_api_->glXDestroyWindowFn(dpy, window);
- }
- const char* TraceGLXApi::glXGetClientStringFn(Display* dpy, int name) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXGetClientString");
- return glx_api_->glXGetClientStringFn(dpy, name);
- }
- int TraceGLXApi::glXGetConfigFn(Display* dpy,
- XVisualInfo* visual,
- int attrib,
- int* value) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXGetConfig");
- return glx_api_->glXGetConfigFn(dpy, visual, attrib, value);
- }
- GLXContext TraceGLXApi::glXGetCurrentContextFn(void) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXGetCurrentContext");
- return glx_api_->glXGetCurrentContextFn();
- }
- Display* TraceGLXApi::glXGetCurrentDisplayFn(void) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXGetCurrentDisplay");
- return glx_api_->glXGetCurrentDisplayFn();
- }
- GLXDrawable TraceGLXApi::glXGetCurrentDrawableFn(void) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXGetCurrentDrawable");
- return glx_api_->glXGetCurrentDrawableFn();
- }
- GLXDrawable TraceGLXApi::glXGetCurrentReadDrawableFn(void) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu",
- "TraceGLXAPI::glXGetCurrentReadDrawable");
- return glx_api_->glXGetCurrentReadDrawableFn();
- }
- int TraceGLXApi::glXGetFBConfigAttribFn(Display* dpy,
- GLXFBConfig config,
- int attribute,
- int* value) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXGetFBConfigAttrib");
- return glx_api_->glXGetFBConfigAttribFn(dpy, config, attribute, value);
- }
- GLXFBConfig TraceGLXApi::glXGetFBConfigFromVisualSGIXFn(
- Display* dpy,
- XVisualInfo* visualInfo) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu",
- "TraceGLXAPI::glXGetFBConfigFromVisualSGIX");
- return glx_api_->glXGetFBConfigFromVisualSGIXFn(dpy, visualInfo);
- }
- GLXFBConfig* TraceGLXApi::glXGetFBConfigsFn(Display* dpy,
- int screen,
- int* nelements) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXGetFBConfigs");
- return glx_api_->glXGetFBConfigsFn(dpy, screen, nelements);
- }
- bool TraceGLXApi::glXGetMscRateOMLFn(Display* dpy,
- GLXDrawable drawable,
- int32_t* numerator,
- int32_t* denominator) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXGetMscRateOML");
- return glx_api_->glXGetMscRateOMLFn(dpy, drawable, numerator, denominator);
- }
- void TraceGLXApi::glXGetSelectedEventFn(Display* dpy,
- GLXDrawable drawable,
- unsigned long* mask) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXGetSelectedEvent");
- glx_api_->glXGetSelectedEventFn(dpy, drawable, mask);
- }
- bool TraceGLXApi::glXGetSyncValuesOMLFn(Display* dpy,
- GLXDrawable drawable,
- int64_t* ust,
- int64_t* msc,
- int64_t* sbc) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXGetSyncValuesOML");
- return glx_api_->glXGetSyncValuesOMLFn(dpy, drawable, ust, msc, sbc);
- }
- XVisualInfo* TraceGLXApi::glXGetVisualFromFBConfigFn(Display* dpy,
- GLXFBConfig config) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXGetVisualFromFBConfig");
- return glx_api_->glXGetVisualFromFBConfigFn(dpy, config);
- }
- int TraceGLXApi::glXIsDirectFn(Display* dpy, GLXContext ctx) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXIsDirect");
- return glx_api_->glXIsDirectFn(dpy, ctx);
- }
- int TraceGLXApi::glXMakeContextCurrentFn(Display* dpy,
- GLXDrawable draw,
- GLXDrawable read,
- GLXContext ctx) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXMakeContextCurrent");
- return glx_api_->glXMakeContextCurrentFn(dpy, draw, read, ctx);
- }
- int TraceGLXApi::glXMakeCurrentFn(Display* dpy,
- GLXDrawable drawable,
- GLXContext ctx) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXMakeCurrent");
- return glx_api_->glXMakeCurrentFn(dpy, drawable, ctx);
- }
- int TraceGLXApi::glXQueryContextFn(Display* dpy,
- GLXContext ctx,
- int attribute,
- int* value) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXQueryContext");
- return glx_api_->glXQueryContextFn(dpy, ctx, attribute, value);
- }
- void TraceGLXApi::glXQueryDrawableFn(Display* dpy,
- GLXDrawable draw,
- int attribute,
- unsigned int* value) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXQueryDrawable");
- glx_api_->glXQueryDrawableFn(dpy, draw, attribute, value);
- }
- int TraceGLXApi::glXQueryExtensionFn(Display* dpy, int* errorb, int* event) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXQueryExtension");
- return glx_api_->glXQueryExtensionFn(dpy, errorb, event);
- }
- const char* TraceGLXApi::glXQueryExtensionsStringFn(Display* dpy, int screen) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXQueryExtensionsString");
- return glx_api_->glXQueryExtensionsStringFn(dpy, screen);
- }
- const char* TraceGLXApi::glXQueryServerStringFn(Display* dpy,
- int screen,
- int name) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXQueryServerString");
- return glx_api_->glXQueryServerStringFn(dpy, screen, name);
- }
- int TraceGLXApi::glXQueryVersionFn(Display* dpy, int* maj, int* min) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXQueryVersion");
- return glx_api_->glXQueryVersionFn(dpy, maj, min);
- }
- void TraceGLXApi::glXReleaseTexImageEXTFn(Display* dpy,
- GLXDrawable drawable,
- int buffer) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXReleaseTexImageEXT");
- glx_api_->glXReleaseTexImageEXTFn(dpy, drawable, buffer);
- }
- void TraceGLXApi::glXSelectEventFn(Display* dpy,
- GLXDrawable drawable,
- unsigned long mask) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXSelectEvent");
- glx_api_->glXSelectEventFn(dpy, drawable, mask);
- }
- void TraceGLXApi::glXSwapBuffersFn(Display* dpy, GLXDrawable drawable) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXSwapBuffers");
- glx_api_->glXSwapBuffersFn(dpy, drawable);
- }
- void TraceGLXApi::glXSwapIntervalEXTFn(Display* dpy,
- GLXDrawable drawable,
- int interval) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXSwapIntervalEXT");
- glx_api_->glXSwapIntervalEXTFn(dpy, drawable, interval);
- }
- void TraceGLXApi::glXSwapIntervalMESAFn(unsigned int interval) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXSwapIntervalMESA");
- glx_api_->glXSwapIntervalMESAFn(interval);
- }
- void TraceGLXApi::glXUseXFontFn(Font font, int first, int count, int list) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXUseXFont");
- glx_api_->glXUseXFontFn(font, first, count, list);
- }
- void TraceGLXApi::glXWaitGLFn(void) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXWaitGL");
- glx_api_->glXWaitGLFn();
- }
- int TraceGLXApi::glXWaitVideoSyncSGIFn(int divisor,
- int remainder,
- unsigned int* count) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXWaitVideoSyncSGI");
- return glx_api_->glXWaitVideoSyncSGIFn(divisor, remainder, count);
- }
- void TraceGLXApi::glXWaitXFn(void) {
- TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLXAPI::glXWaitX");
- glx_api_->glXWaitXFn();
- }
- void LogGLXApi::glXBindTexImageEXTFn(Display* dpy,
- GLXDrawable drawable,
- int buffer,
- int* attribList) {
- GL_SERVICE_LOG("glXBindTexImageEXT"
- << "(" << static_cast<const void*>(dpy) << ", " << drawable
- << ", " << buffer << ", "
- << static_cast<const void*>(attribList) << ")");
- glx_api_->glXBindTexImageEXTFn(dpy, drawable, buffer, attribList);
- }
- GLXFBConfig* LogGLXApi::glXChooseFBConfigFn(Display* dpy,
- int screen,
- const int* attribList,
- int* nitems) {
- GL_SERVICE_LOG("glXChooseFBConfig"
- << "(" << static_cast<const void*>(dpy) << ", " << screen
- << ", " << static_cast<const void*>(attribList) << ", "
- << static_cast<const void*>(nitems) << ")");
- GLXFBConfig* result =
- glx_api_->glXChooseFBConfigFn(dpy, screen, attribList, nitems);
- GL_SERVICE_LOG("GL_RESULT: " << result);
- return result;
- }
- XVisualInfo* LogGLXApi::glXChooseVisualFn(Display* dpy,
- int screen,
- int* attribList) {
- GL_SERVICE_LOG("glXChooseVisual"
- << "(" << static_cast<const void*>(dpy) << ", " << screen
- << ", " << static_cast<const void*>(attribList) << ")");
- XVisualInfo* result = glx_api_->glXChooseVisualFn(dpy, screen, attribList);
- GL_SERVICE_LOG("GL_RESULT: " << result);
- return result;
- }
- void LogGLXApi::glXCopyContextFn(Display* dpy,
- GLXContext src,
- GLXContext dst,
- unsigned long mask) {
- GL_SERVICE_LOG("glXCopyContext"
- << "(" << static_cast<const void*>(dpy) << ", " << src << ", "
- << dst << ", " << mask << ")");
- glx_api_->glXCopyContextFn(dpy, src, dst, mask);
- }
- void LogGLXApi::glXCopySubBufferMESAFn(Display* dpy,
- GLXDrawable drawable,
- int x,
- int y,
- int width,
- int height) {
- GL_SERVICE_LOG("glXCopySubBufferMESA"
- << "(" << static_cast<const void*>(dpy) << ", " << drawable
- << ", " << x << ", " << y << ", " << width << ", " << height
- << ")");
- glx_api_->glXCopySubBufferMESAFn(dpy, drawable, x, y, width, height);
- }
- GLXContext LogGLXApi::glXCreateContextFn(Display* dpy,
- XVisualInfo* vis,
- GLXContext shareList,
- int direct) {
- GL_SERVICE_LOG("glXCreateContext"
- << "(" << static_cast<const void*>(dpy) << ", "
- << static_cast<const void*>(vis) << ", " << shareList << ", "
- << direct << ")");
- GLXContext result = glx_api_->glXCreateContextFn(dpy, vis, shareList, direct);
- GL_SERVICE_LOG("GL_RESULT: " << result);
- return result;
- }
- GLXContext LogGLXApi::glXCreateContextAttribsARBFn(Display* dpy,
- GLXFBConfig config,
- GLXContext share_context,
- int direct,
- const int* attrib_list) {
- GL_SERVICE_LOG("glXCreateContextAttribsARB"
- << "(" << static_cast<const void*>(dpy) << ", " << config
- << ", " << share_context << ", " << direct << ", "
- << static_cast<const void*>(attrib_list) << ")");
- GLXContext result = glx_api_->glXCreateContextAttribsARBFn(
- dpy, config, share_context, direct, attrib_list);
- GL_SERVICE_LOG("GL_RESULT: " << result);
- return result;
- }
- GLXPixmap LogGLXApi::glXCreateGLXPixmapFn(Display* dpy,
- XVisualInfo* visual,
- Pixmap pixmap) {
- GL_SERVICE_LOG("glXCreateGLXPixmap"
- << "(" << static_cast<const void*>(dpy) << ", "
- << static_cast<const void*>(visual) << ", " << pixmap << ")");
- GLXPixmap result = glx_api_->glXCreateGLXPixmapFn(dpy, visual, pixmap);
- GL_SERVICE_LOG("GL_RESULT: " << result);
- return result;
- }
- GLXContext LogGLXApi::glXCreateNewContextFn(Display* dpy,
- GLXFBConfig config,
- int renderType,
- GLXContext shareList,
- int direct) {
- GL_SERVICE_LOG("glXCreateNewContext"
- << "(" << static_cast<const void*>(dpy) << ", " << config
- << ", " << renderType << ", " << shareList << ", " << direct
- << ")");
- GLXContext result = glx_api_->glXCreateNewContextFn(dpy, config, renderType,
- shareList, direct);
- GL_SERVICE_LOG("GL_RESULT: " << result);
- return result;
- }
- GLXPbuffer LogGLXApi::glXCreatePbufferFn(Display* dpy,
- GLXFBConfig config,
- const int* attribList) {
- GL_SERVICE_LOG("glXCreatePbuffer"
- << "(" << static_cast<const void*>(dpy) << ", " << config
- << ", " << static_cast<const void*>(attribList) << ")");
- GLXPbuffer result = glx_api_->glXCreatePbufferFn(dpy, config, attribList);
- GL_SERVICE_LOG("GL_RESULT: " << result);
- return result;
- }
- GLXPixmap LogGLXApi::glXCreatePixmapFn(Display* dpy,
- GLXFBConfig config,
- Pixmap pixmap,
- const int* attribList) {
- GL_SERVICE_LOG("glXCreatePixmap"
- << "(" << static_cast<const void*>(dpy) << ", " << config
- << ", " << pixmap << ", "
- << static_cast<const void*>(attribList) << ")");
- GLXPixmap result =
- glx_api_->glXCreatePixmapFn(dpy, config, pixmap, attribList);
- GL_SERVICE_LOG("GL_RESULT: " << result);
- return result;
- }
- GLXWindow LogGLXApi::glXCreateWindowFn(Display* dpy,
- GLXFBConfig config,
- Window win,
- const int* attribList) {
- GL_SERVICE_LOG("glXCreateWindow"
- << "(" << static_cast<const void*>(dpy) << ", " << config
- << ", " << win << ", " << static_cast<const void*>(attribList)
- << ")");
- GLXWindow result = glx_api_->glXCreateWindowFn(dpy, config, win, attribList);
- GL_SERVICE_LOG("GL_RESULT: " << result);
- return result;
- }
- void LogGLXApi::glXDestroyContextFn(Display* dpy, GLXContext ctx) {
- GL_SERVICE_LOG("glXDestroyContext"
- << "(" << static_cast<const void*>(dpy) << ", " << ctx << ")");
- glx_api_->glXDestroyContextFn(dpy, ctx);
- }
- void LogGLXApi::glXDestroyGLXPixmapFn(Display* dpy, GLXPixmap pixmap) {
- GL_SERVICE_LOG("glXDestroyGLXPixmap"
- << "(" << static_cast<const void*>(dpy) << ", " << pixmap
- << ")");
- glx_api_->glXDestroyGLXPixmapFn(dpy, pixmap);
- }
- void LogGLXApi::glXDestroyPbufferFn(Display* dpy, GLXPbuffer pbuf) {
- GL_SERVICE_LOG("glXDestroyPbuffer"
- << "(" << static_cast<const void*>(dpy) << ", " << pbuf
- << ")");
- glx_api_->glXDestroyPbufferFn(dpy, pbuf);
- }
- void LogGLXApi::glXDestroyPixmapFn(Display* dpy, GLXPixmap pixmap) {
- GL_SERVICE_LOG("glXDestroyPixmap"
- << "(" << static_cast<const void*>(dpy) << ", " << pixmap
- << ")");
- glx_api_->glXDestroyPixmapFn(dpy, pixmap);
- }
- void LogGLXApi::glXDestroyWindowFn(Display* dpy, GLXWindow window) {
- GL_SERVICE_LOG("glXDestroyWindow"
- << "(" << static_cast<const void*>(dpy) << ", " << window
- << ")");
- glx_api_->glXDestroyWindowFn(dpy, window);
- }
- const char* LogGLXApi::glXGetClientStringFn(Display* dpy, int name) {
- GL_SERVICE_LOG("glXGetClientString"
- << "(" << static_cast<const void*>(dpy) << ", " << name
- << ")");
- const char* result = glx_api_->glXGetClientStringFn(dpy, name);
- GL_SERVICE_LOG("GL_RESULT: " << result);
- return result;
- }
- int LogGLXApi::glXGetConfigFn(Display* dpy,
- XVisualInfo* visual,
- int attrib,
- int* value) {
- GL_SERVICE_LOG("glXGetConfig"
- << "(" << static_cast<const void*>(dpy) << ", "
- << static_cast<const void*>(visual) << ", " << attrib << ", "
- << static_cast<const void*>(value) << ")");
- int result = glx_api_->glXGetConfigFn(dpy, visual, attrib, value);
- GL_SERVICE_LOG("GL_RESULT: " << result);
- return result;
- }
- GLXContext LogGLXApi::glXGetCurrentContextFn(void) {
- GL_SERVICE_LOG("glXGetCurrentContext"
- << "("
- << ")");
- GLXContext result = glx_api_->glXGetCurrentContextFn();
- GL_SERVICE_LOG("GL_RESULT: " << result);
- return result;
- }
- Display* LogGLXApi::glXGetCurrentDisplayFn(void) {
- GL_SERVICE_LOG("glXGetCurrentDisplay"
- << "("
- << ")");
- Display* result = glx_api_->glXGetCurrentDisplayFn();
- GL_SERVICE_LOG("GL_RESULT: " << result);
- return result;
- }
- GLXDrawable LogGLXApi::glXGetCurrentDrawableFn(void) {
- GL_SERVICE_LOG("glXGetCurrentDrawable"
- << "("
- << ")");
- GLXDrawable result = glx_api_->glXGetCurrentDrawableFn();
- GL_SERVICE_LOG("GL_RESULT: " << result);
- return result;
- }
- GLXDrawable LogGLXApi::glXGetCurrentReadDrawableFn(void) {
- GL_SERVICE_LOG("glXGetCurrentReadDrawable"
- << "("
- << ")");
- GLXDrawable result = glx_api_->glXGetCurrentReadDrawableFn();
- GL_SERVICE_LOG("GL_RESULT: " << result);
- return result;
- }
- int LogGLXApi::glXGetFBConfigAttribFn(Display* dpy,
- GLXFBConfig config,
- int attribute,
- int* value) {
- GL_SERVICE_LOG("glXGetFBConfigAttrib"
- << "(" << static_cast<const void*>(dpy) << ", " << config
- << ", " << attribute << ", " << static_cast<const void*>(value)
- << ")");
- int result = glx_api_->glXGetFBConfigAttribFn(dpy, config, attribute, value);
- GL_SERVICE_LOG("GL_RESULT: " << result);
- return result;
- }
- GLXFBConfig LogGLXApi::glXGetFBConfigFromVisualSGIXFn(Display* dpy,
- XVisualInfo* visualInfo) {
- GL_SERVICE_LOG("glXGetFBConfigFromVisualSGIX"
- << "(" << static_cast<const void*>(dpy) << ", "
- << static_cast<const void*>(visualInfo) << ")");
- GLXFBConfig result =
- glx_api_->glXGetFBConfigFromVisualSGIXFn(dpy, visualInfo);
- GL_SERVICE_LOG("GL_RESULT: " << result);
- return result;
- }
- GLXFBConfig* LogGLXApi::glXGetFBConfigsFn(Display* dpy,
- int screen,
- int* nelements) {
- GL_SERVICE_LOG("glXGetFBConfigs"
- << "(" << static_cast<const void*>(dpy) << ", " << screen
- << ", " << static_cast<const void*>(nelements) << ")");
- GLXFBConfig* result = glx_api_->glXGetFBConfigsFn(dpy, screen, nelements);
- GL_SERVICE_LOG("GL_RESULT: " << result);
- return result;
- }
- bool LogGLXApi::glXGetMscRateOMLFn(Display* dpy,
- GLXDrawable drawable,
- int32_t* numerator,
- int32_t* denominator) {
- GL_SERVICE_LOG("glXGetMscRateOML"
- << "(" << static_cast<const void*>(dpy) << ", " << drawable
- << ", " << static_cast<const void*>(numerator) << ", "
- << static_cast<const void*>(denominator) << ")");
- bool result =
- glx_api_->glXGetMscRateOMLFn(dpy, drawable, numerator, denominator);
- GL_SERVICE_LOG("GL_RESULT: " << result);
- return result;
- }
- void LogGLXApi::glXGetSelectedEventFn(Display* dpy,
- GLXDrawable drawable,
- unsigned long* mask) {
- GL_SERVICE_LOG("glXGetSelectedEvent"
- << "(" << static_cast<const void*>(dpy) << ", " << drawable
- << ", " << static_cast<const void*>(mask) << ")");
- glx_api_->glXGetSelectedEventFn(dpy, drawable, mask);
- }
- bool LogGLXApi::glXGetSyncValuesOMLFn(Display* dpy,
- GLXDrawable drawable,
- int64_t* ust,
- int64_t* msc,
- int64_t* sbc) {
- GL_SERVICE_LOG("glXGetSyncValuesOML"
- << "(" << static_cast<const void*>(dpy) << ", " << drawable
- << ", " << static_cast<const void*>(ust) << ", "
- << static_cast<const void*>(msc) << ", "
- << static_cast<const void*>(sbc) << ")");
- bool result = glx_api_->glXGetSyncValuesOMLFn(dpy, drawable, ust, msc, sbc);
- GL_SERVICE_LOG("GL_RESULT: " << result);
- return result;
- }
- XVisualInfo* LogGLXApi::glXGetVisualFromFBConfigFn(Display* dpy,
- GLXFBConfig config) {
- GL_SERVICE_LOG("glXGetVisualFromFBConfig"
- << "(" << static_cast<const void*>(dpy) << ", " << config
- << ")");
- XVisualInfo* result = glx_api_->glXGetVisualFromFBConfigFn(dpy, config);
- GL_SERVICE_LOG("GL_RESULT: " << result);
- return result;
- }
- int LogGLXApi::glXIsDirectFn(Display* dpy, GLXContext ctx) {
- GL_SERVICE_LOG("glXIsDirect"
- << "(" << static_cast<const void*>(dpy) << ", " << ctx << ")");
- int result = glx_api_->glXIsDirectFn(dpy, ctx);
- GL_SERVICE_LOG("GL_RESULT: " << result);
- return result;
- }
- int LogGLXApi::glXMakeContextCurrentFn(Display* dpy,
- GLXDrawable draw,
- GLXDrawable read,
- GLXContext ctx) {
- GL_SERVICE_LOG("glXMakeContextCurrent"
- << "(" << static_cast<const void*>(dpy) << ", " << draw << ", "
- << read << ", " << ctx << ")");
- int result = glx_api_->glXMakeContextCurrentFn(dpy, draw, read, ctx);
- GL_SERVICE_LOG("GL_RESULT: " << result);
- return result;
- }
- int LogGLXApi::glXMakeCurrentFn(Display* dpy,
- GLXDrawable drawable,
- GLXContext ctx) {
- GL_SERVICE_LOG("glXMakeCurrent"
- << "(" << static_cast<const void*>(dpy) << ", " << drawable
- << ", " << ctx << ")");
- int result = glx_api_->glXMakeCurrentFn(dpy, drawable, ctx);
- GL_SERVICE_LOG("GL_RESULT: " << result);
- return result;
- }
- int LogGLXApi::glXQueryContextFn(Display* dpy,
- GLXContext ctx,
- int attribute,
- int* value) {
- GL_SERVICE_LOG("glXQueryContext"
- << "(" << static_cast<const void*>(dpy) << ", " << ctx << ", "
- << attribute << ", " << static_cast<const void*>(value)
- << ")");
- int result = glx_api_->glXQueryContextFn(dpy, ctx, attribute, value);
- GL_SERVICE_LOG("GL_RESULT: " << result);
- return result;
- }
- void LogGLXApi::glXQueryDrawableFn(Display* dpy,
- GLXDrawable draw,
- int attribute,
- unsigned int* value) {
- GL_SERVICE_LOG("glXQueryDrawable"
- << "(" << static_cast<const void*>(dpy) << ", " << draw << ", "
- << attribute << ", " << static_cast<const void*>(value)
- << ")");
- glx_api_->glXQueryDrawableFn(dpy, draw, attribute, value);
- }
- int LogGLXApi::glXQueryExtensionFn(Display* dpy, int* errorb, int* event) {
- GL_SERVICE_LOG("glXQueryExtension"
- << "(" << static_cast<const void*>(dpy) << ", "
- << static_cast<const void*>(errorb) << ", "
- << static_cast<const void*>(event) << ")");
- int result = glx_api_->glXQueryExtensionFn(dpy, errorb, event);
- GL_SERVICE_LOG("GL_RESULT: " << result);
- return result;
- }
- const char* LogGLXApi::glXQueryExtensionsStringFn(Display* dpy, int screen) {
- GL_SERVICE_LOG("glXQueryExtensionsString"
- << "(" << static_cast<const void*>(dpy) << ", " << screen
- << ")");
- const char* result = glx_api_->glXQueryExtensionsStringFn(dpy, screen);
- GL_SERVICE_LOG("GL_RESULT: " << result);
- return result;
- }
- const char* LogGLXApi::glXQueryServerStringFn(Display* dpy,
- int screen,
- int name) {
- GL_SERVICE_LOG("glXQueryServerString"
- << "(" << static_cast<const void*>(dpy) << ", " << screen
- << ", " << name << ")");
- const char* result = glx_api_->glXQueryServerStringFn(dpy, screen, name);
- GL_SERVICE_LOG("GL_RESULT: " << result);
- return result;
- }
- int LogGLXApi::glXQueryVersionFn(Display* dpy, int* maj, int* min) {
- GL_SERVICE_LOG("glXQueryVersion"
- << "(" << static_cast<const void*>(dpy) << ", "
- << static_cast<const void*>(maj) << ", "
- << static_cast<const void*>(min) << ")");
- int result = glx_api_->glXQueryVersionFn(dpy, maj, min);
- GL_SERVICE_LOG("GL_RESULT: " << result);
- return result;
- }
- void LogGLXApi::glXReleaseTexImageEXTFn(Display* dpy,
- GLXDrawable drawable,
- int buffer) {
- GL_SERVICE_LOG("glXReleaseTexImageEXT"
- << "(" << static_cast<const void*>(dpy) << ", " << drawable
- << ", " << buffer << ")");
- glx_api_->glXReleaseTexImageEXTFn(dpy, drawable, buffer);
- }
- void LogGLXApi::glXSelectEventFn(Display* dpy,
- GLXDrawable drawable,
- unsigned long mask) {
- GL_SERVICE_LOG("glXSelectEvent"
- << "(" << static_cast<const void*>(dpy) << ", " << drawable
- << ", " << mask << ")");
- glx_api_->glXSelectEventFn(dpy, drawable, mask);
- }
- void LogGLXApi::glXSwapBuffersFn(Display* dpy, GLXDrawable drawable) {
- GL_SERVICE_LOG("glXSwapBuffers"
- << "(" << static_cast<const void*>(dpy) << ", " << drawable
- << ")");
- glx_api_->glXSwapBuffersFn(dpy, drawable);
- }
- void LogGLXApi::glXSwapIntervalEXTFn(Display* dpy,
- GLXDrawable drawable,
- int interval) {
- GL_SERVICE_LOG("glXSwapIntervalEXT"
- << "(" << static_cast<const void*>(dpy) << ", " << drawable
- << ", " << interval << ")");
- glx_api_->glXSwapIntervalEXTFn(dpy, drawable, interval);
- }
- void LogGLXApi::glXSwapIntervalMESAFn(unsigned int interval) {
- GL_SERVICE_LOG("glXSwapIntervalMESA"
- << "(" << interval << ")");
- glx_api_->glXSwapIntervalMESAFn(interval);
- }
- void LogGLXApi::glXUseXFontFn(Font font, int first, int count, int list) {
- GL_SERVICE_LOG("glXUseXFont"
- << "(" << font << ", " << first << ", " << count << ", "
- << list << ")");
- glx_api_->glXUseXFontFn(font, first, count, list);
- }
- void LogGLXApi::glXWaitGLFn(void) {
- GL_SERVICE_LOG("glXWaitGL"
- << "("
- << ")");
- glx_api_->glXWaitGLFn();
- }
- int LogGLXApi::glXWaitVideoSyncSGIFn(int divisor,
- int remainder,
- unsigned int* count) {
- GL_SERVICE_LOG("glXWaitVideoSyncSGI"
- << "(" << divisor << ", " << remainder << ", "
- << static_cast<const void*>(count) << ")");
- int result = glx_api_->glXWaitVideoSyncSGIFn(divisor, remainder, count);
- GL_SERVICE_LOG("GL_RESULT: " << result);
- return result;
- }
- void LogGLXApi::glXWaitXFn(void) {
- GL_SERVICE_LOG("glXWaitX"
- << "("
- << ")");
- glx_api_->glXWaitXFn();
- }
- } // namespace gl
|