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

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

Issue 2629633003: Refactor GL bindings so there is no global GLApi or DriverGL. (Closed)
Patch Set: rebase Created 3 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_osmesa_api_implementation.cc ('k') | ui/gl/gl_switches.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 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
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
OLDNEW
« no previous file with comments | « ui/gl/gl_osmesa_api_implementation.cc ('k') | ui/gl/gl_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698