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

Side by Side Diff: gpu/gles2_conform_support/egl/egl.cc

Issue 1640243002: command_buffer_gles2: Add test command_buffer_gles2_test for command_buffer_gles2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove debug Created 4 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 | « gpu/gles2_conform_support/egl/display.cc ('k') | gpu/gles2_conform_support/egl/test_support.h » ('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 (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 <EGL/egl.h> 5 #include <EGL/egl.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/environment.h" 9 #include "base/environment.h"
10 #include "base/strings/string_split.h" 10 #include "base/strings/string_split.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 // argc, argv in CommandLine::Init(argc, argv). 136 // argc, argv in CommandLine::Init(argc, argv).
137 command_line->InitFromArgv(argv); 137 command_line->InitFromArgv(argv);
138 if (!command_line->HasSwitch(switches::kDisableGpuDriverBugWorkarounds)) { 138 if (!command_line->HasSwitch(switches::kDisableGpuDriverBugWorkarounds)) {
139 gpu::GPUInfo gpu_info; 139 gpu::GPUInfo gpu_info;
140 gpu::CollectBasicGraphicsInfo(&gpu_info); 140 gpu::CollectBasicGraphicsInfo(&gpu_info);
141 gpu::ApplyGpuDriverBugWorkarounds(gpu_info, command_line); 141 gpu::ApplyGpuDriverBugWorkarounds(gpu_info, command_line);
142 } 142 }
143 143
144 gfx::GLSurface::InitializeOneOff(); 144 gfx::GLSurface::InitializeOneOff();
145 } 145 }
146 146 if (major)
147 *major = 1; 147 *major = 1;
148 *minor = 4; 148 if (minor)
149 *minor = 4;
149 return EglSuccess(EGL_TRUE); 150 return EglSuccess(EGL_TRUE);
150 } 151 }
151 152
152 EGLAPI EGLBoolean EGLAPIENTRY eglTerminate(EGLDisplay dpy) { 153 EGLAPI EGLBoolean EGLAPIENTRY eglTerminate(EGLDisplay dpy) {
153 EGLint error_code = ValidateDisplay(dpy); 154 EGLint error_code = ValidateDisplay(dpy);
154 if (error_code != EGL_SUCCESS) 155 if (error_code != EGL_SUCCESS)
155 return EglError(error_code, EGL_FALSE); 156 return EglError(error_code, EGL_FALSE);
156 157
157 egl::Display* display = static_cast<egl::Display*>(dpy); 158 egl::Display* display = static_cast<egl::Display*>(dpy);
158 delete display; 159 delete display;
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 return EGL_FALSE; 468 return EGL_FALSE;
468 } 469 }
469 470
470 /* Now, define eglGetProcAddress using the generic function ptr. type */ 471 /* Now, define eglGetProcAddress using the generic function ptr. type */
471 EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY 472 EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY
472 eglGetProcAddress(const char* procname) { 473 eglGetProcAddress(const char* procname) {
473 return reinterpret_cast<__eglMustCastToProperFunctionPointerType>( 474 return reinterpret_cast<__eglMustCastToProperFunctionPointerType>(
474 gles2::GetGLFunctionPointer(procname)); 475 gles2::GetGLFunctionPointer(procname));
475 } 476 }
476 } // extern "C" 477 } // extern "C"
OLDNEW
« no previous file with comments | « gpu/gles2_conform_support/egl/display.cc ('k') | gpu/gles2_conform_support/egl/test_support.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698