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

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

Issue 895853003: Update from https://crrev.com/314320 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 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_mock.cc ('k') | ui/gl/gl_bindings_autogen_wgl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 // This file is auto-generated from 5 // This file is auto-generated from
6 // ui/gl/generate_bindings.py 6 // ui/gl/generate_bindings.py
7 // It's formatted by clang-format using chromium coding style: 7 // It's formatted by clang-format using chromium coding style:
8 // clang-format -i -style=chromium filename 8 // clang-format -i -style=chromium filename
9 // DO NOT EDIT! 9 // DO NOT EDIT!
10 10
11 #include <string> 11 #include <string>
12 12
13 #include "base/debug/trace_event.h" 13 #include "base/trace_event/trace_event.h"
14 #include "ui/gl/gl_bindings.h" 14 #include "ui/gl/gl_bindings.h"
15 #include "ui/gl/gl_context.h" 15 #include "ui/gl/gl_context.h"
16 #include "ui/gl/gl_enums.h" 16 #include "ui/gl/gl_enums.h"
17 #include "ui/gl/gl_implementation.h" 17 #include "ui/gl/gl_implementation.h"
18 #include "ui/gl/gl_osmesa_api_implementation.h" 18 #include "ui/gl/gl_osmesa_api_implementation.h"
19 #include "ui/gl/gl_version_info.h" 19 #include "ui/gl/gl_version_info.h"
20 20
21 namespace gfx { 21 namespace gfx {
22 22
23 static bool g_debugBindingsInitialized; 23 static bool g_debugBindingsInitialized;
(...skipping 15 matching lines...) Expand all
39 fn.OSMesaGetDepthBufferFn = reinterpret_cast<OSMesaGetDepthBufferProc>( 39 fn.OSMesaGetDepthBufferFn = reinterpret_cast<OSMesaGetDepthBufferProc>(
40 GetGLProcAddress("OSMesaGetDepthBuffer")); 40 GetGLProcAddress("OSMesaGetDepthBuffer"));
41 fn.OSMesaGetIntegervFn = reinterpret_cast<OSMesaGetIntegervProc>( 41 fn.OSMesaGetIntegervFn = reinterpret_cast<OSMesaGetIntegervProc>(
42 GetGLProcAddress("OSMesaGetIntegerv")); 42 GetGLProcAddress("OSMesaGetIntegerv"));
43 fn.OSMesaGetProcAddressFn = reinterpret_cast<OSMesaGetProcAddressProc>( 43 fn.OSMesaGetProcAddressFn = reinterpret_cast<OSMesaGetProcAddressProc>(
44 GetGLProcAddress("OSMesaGetProcAddress")); 44 GetGLProcAddress("OSMesaGetProcAddress"));
45 fn.OSMesaMakeCurrentFn = reinterpret_cast<OSMesaMakeCurrentProc>( 45 fn.OSMesaMakeCurrentFn = reinterpret_cast<OSMesaMakeCurrentProc>(
46 GetGLProcAddress("OSMesaMakeCurrent")); 46 GetGLProcAddress("OSMesaMakeCurrent"));
47 fn.OSMesaPixelStoreFn = reinterpret_cast<OSMesaPixelStoreProc>( 47 fn.OSMesaPixelStoreFn = reinterpret_cast<OSMesaPixelStoreProc>(
48 GetGLProcAddress("OSMesaPixelStore")); 48 GetGLProcAddress("OSMesaPixelStore"));
49 } 49 std::string extensions(GetPlatformExtensions());
50 50 extensions += " ";
51 void DriverOSMESA::InitializeDynamicBindings(GLContext* context) {
52 DCHECK(context && context->IsCurrent(NULL));
53 const GLVersionInfo* ver = context->GetVersionInfo();
54 ALLOW_UNUSED_LOCAL(ver);
55 std::string extensions = context->GetExtensions() + " ";
56 ALLOW_UNUSED_LOCAL(extensions); 51 ALLOW_UNUSED_LOCAL(extensions);
57 52
58 if (g_debugBindingsInitialized) 53 if (g_debugBindingsInitialized)
59 InitializeDebugBindings(); 54 InitializeDebugBindings();
60 } 55 }
61 56
62 extern "C" { 57 extern "C" {
63 58
64 static void GL_BINDING_CALL Debug_OSMesaColorClamp(GLboolean enable) { 59 static void GL_BINDING_CALL Debug_OSMesaColorClamp(GLboolean enable) {
65 GL_SERVICE_LOG("OSMesaColorClamp" 60 GL_SERVICE_LOG("OSMesaColorClamp"
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::OSMesaMakeCurrent") 358 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::OSMesaMakeCurrent")
364 return osmesa_api_->OSMesaMakeCurrentFn(ctx, buffer, type, width, height); 359 return osmesa_api_->OSMesaMakeCurrentFn(ctx, buffer, type, width, height);
365 } 360 }
366 361
367 void TraceOSMESAApi::OSMesaPixelStoreFn(GLint pname, GLint value) { 362 void TraceOSMESAApi::OSMesaPixelStoreFn(GLint pname, GLint value) {
368 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::OSMesaPixelStore") 363 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::OSMesaPixelStore")
369 osmesa_api_->OSMesaPixelStoreFn(pname, value); 364 osmesa_api_->OSMesaPixelStoreFn(pname, value);
370 } 365 }
371 366
372 } // namespace gfx 367 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_bindings_autogen_mock.cc ('k') | ui/gl/gl_bindings_autogen_wgl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698