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 <EGL/egl.h> | 5 #include <EGL/egl.h> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "gpu/command_buffer/client/gles2_lib.h" | 8 #include "gpu/command_buffer/client/gles2_lib.h" |
9 #include "gpu/gles2_conform_support/egl/display.h" | 9 #include "gpu/gles2_conform_support/egl/display.h" |
10 #include "ui/gl/gl_context.h" | 10 #include "ui/gl/gl_context.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 return EglError(EGL_BAD_DISPLAY, EGL_FALSE); | 99 return EglError(EGL_BAD_DISPLAY, EGL_FALSE); |
100 | 100 |
101 egl::Display* display = static_cast<egl::Display*>(dpy); | 101 egl::Display* display = static_cast<egl::Display*>(dpy); |
102 if (!display->Initialize()) | 102 if (!display->Initialize()) |
103 return EglError(EGL_NOT_INITIALIZED, EGL_FALSE); | 103 return EglError(EGL_NOT_INITIALIZED, EGL_FALSE); |
104 | 104 |
105 int argc = 1; | 105 int argc = 1; |
106 const char* const argv[] = { | 106 const char* const argv[] = { |
107 "dummy" | 107 "dummy" |
108 }; | 108 }; |
109 CommandLine::Init(argc, argv); | 109 base::CommandLine::Init(argc, argv); |
110 gfx::GLSurface::InitializeOneOff(); | 110 gfx::GLSurface::InitializeOneOff(); |
111 | 111 |
112 *major = 1; | 112 *major = 1; |
113 *minor = 4; | 113 *minor = 4; |
114 return EglSuccess(EGL_TRUE); | 114 return EglSuccess(EGL_TRUE); |
115 } | 115 } |
116 | 116 |
117 EGLBoolean eglTerminate(EGLDisplay dpy) { | 117 EGLBoolean eglTerminate(EGLDisplay dpy) { |
118 EGLint error_code = ValidateDisplay(dpy); | 118 EGLint error_code = ValidateDisplay(dpy); |
119 if (error_code != EGL_SUCCESS) | 119 if (error_code != EGL_SUCCESS) |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 EGLNativePixmapType target) { | 395 EGLNativePixmapType target) { |
396 return EGL_FALSE; | 396 return EGL_FALSE; |
397 } | 397 } |
398 | 398 |
399 /* Now, define eglGetProcAddress using the generic function ptr. type */ | 399 /* Now, define eglGetProcAddress using the generic function ptr. type */ |
400 __eglMustCastToProperFunctionPointerType | 400 __eglMustCastToProperFunctionPointerType |
401 eglGetProcAddress(const char* procname) { | 401 eglGetProcAddress(const char* procname) { |
402 return gles2::GetGLFunctionPointer(procname); | 402 return gles2::GetGLFunctionPointer(procname); |
403 } | 403 } |
404 } // extern "C" | 404 } // extern "C" |
OLD | NEW |