OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "ui/gl/gl_stub_api.h" | 5 #include "ui/gl/gl_stub_api.h" |
6 | 6 |
7 namespace gl { | 7 namespace gl { |
8 | 8 |
9 namespace { | 9 namespace { |
10 | 10 |
11 void GenHelper(GLsizei count, GLuint* objects) { | 11 void GenHelper(GLsizei count, GLuint* objects) { |
12 for (GLsizei i = 0; i < count; ++i) | 12 for (GLsizei i = 0; i < count; ++i) |
13 objects[i] = i + 1; | 13 objects[i] = i + 1; |
14 } | 14 } |
15 | 15 |
16 } // anonymous namespace | 16 } // anonymous namespace |
17 | 17 |
18 GLStubApi::GLStubApi() | 18 GLStubApi::GLStubApi() {} |
19 : version_("OpenGL ES 3.0"), extensions_("GL_EXT_framebuffer_object") {} | |
20 | 19 |
21 GLStubApi::~GLStubApi() = default; | 20 GLStubApi::~GLStubApi() = default; |
22 | 21 |
23 GLenum GLStubApi::glCheckFramebufferStatusEXTFn(GLenum target) { | 22 GLenum GLStubApi::glCheckFramebufferStatusEXTFn(GLenum target) { |
24 return GL_FRAMEBUFFER_COMPLETE; | 23 return GL_FRAMEBUFFER_COMPLETE; |
25 } | 24 } |
26 | 25 |
27 GLuint GLStubApi::glCreateProgramFn(void) { | 26 GLuint GLStubApi::glCreateProgramFn(void) { |
28 return 1; | 27 return 1; |
29 } | 28 } |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 return GL_TRUE; | 292 return GL_TRUE; |
294 } | 293 } |
295 | 294 |
296 GLenum GLStubApi::glWaitSyncFn(GLsync sync, | 295 GLenum GLStubApi::glWaitSyncFn(GLsync sync, |
297 GLbitfield flags, | 296 GLbitfield flags, |
298 GLuint64 timeout) { | 297 GLuint64 timeout) { |
299 return GL_TRUE; | 298 return GL_TRUE; |
300 } | 299 } |
301 | 300 |
302 } // namespace gl | 301 } // namespace gl |
OLD | NEW |