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

Side by Side Diff: include/gpu/gl/GrGLFunctions.h

Issue 1674823002: Replace GrGLInterface's function pointers with std::functions (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase and address comment 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 | « include/gpu/gl/GrGLExtensions.h ('k') | include/gpu/gl/GrGLInterface.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 1
2 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #ifndef GrGLFunctions_DEFINED 9 #ifndef GrGLFunctions_DEFINED
10 #define GrGLFunctions_DEFINED 10 #define GrGLFunctions_DEFINED
11 11
12 #include <functional>
12 #include "GrGLTypes.h" 13 #include "GrGLTypes.h"
14 #include "../private/SkTLogic.h"
bungeman-skia 2016/02/08 20:22:52 I imagine this include was added in order to repla
bsalomon 2016/02/09 15:21:38 Oops, I did that change locally and then never upl
13 15
14 extern "C" { 16 extern "C" {
15 17
16 /////////////////////////////////////////////////////////////////////////////// 18 ///////////////////////////////////////////////////////////////////////////////
17 19
18 typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLActiveTextureProc)(GrGLenum texture); 20 typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLActiveTextureProc)(GrGLenum texture);
19 typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLAttachShaderProc)(GrGLuint program, G rGLuint shader); 21 typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLAttachShaderProc)(GrGLuint program, G rGLuint shader);
20 typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLBeginQueryProc)(GrGLenum target, GrGL uint id); 22 typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLBeginQueryProc)(GrGLenum target, GrGL uint id);
21 typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLBindAttribLocationProc)(GrGLuint prog ram, GrGLuint index, const char* name); 23 typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLBindAttribLocationProc)(GrGLuint prog ram, GrGLuint index, const char* name);
22 typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLBindBufferProc)(GrGLenum target, GrGL uint buffer); 24 typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLBindBufferProc)(GrGLenum target, GrGL uint buffer);
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLPopDebugGroupProc)(); 346 typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLPopDebugGroupProc)();
345 typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLObjectLabelProc)(GrGLenum identifier, GrGLuint name, GrGLsizei length, const GrGLchar *label); 347 typedef GrGLvoid (GR_GL_FUNCTION_TYPE* GrGLObjectLabelProc)(GrGLenum identifier, GrGLuint name, GrGLsizei length, const GrGLchar *label);
346 348
347 /** EGL functions */ 349 /** EGL functions */
348 typedef const char* (GR_GL_FUNCTION_TYPE* GrEGLQueryStringProc)(GrEGLDisplay dpy , GrEGLint name); 350 typedef const char* (GR_GL_FUNCTION_TYPE* GrEGLQueryStringProc)(GrEGLDisplay dpy , GrEGLint name);
349 typedef GrEGLDisplay (GR_GL_FUNCTION_TYPE* GrEGLGetCurrentDisplayProc)(); 351 typedef GrEGLDisplay (GR_GL_FUNCTION_TYPE* GrEGLGetCurrentDisplayProc)();
350 typedef GrEGLImage (GR_GL_FUNCTION_TYPE* GrEGLCreateImageProc)(GrEGLDisplay dpy, GrEGLContext ctx, GrEGLenum target, GrEGLClientBuffer buffer, const GrEGLint *a ttrib_list); 352 typedef GrEGLImage (GR_GL_FUNCTION_TYPE* GrEGLCreateImageProc)(GrEGLDisplay dpy, GrEGLContext ctx, GrEGLenum target, GrEGLClientBuffer buffer, const GrEGLint *a ttrib_list);
351 typedef GrEGLBoolean (GR_GL_FUNCTION_TYPE* GrEGLDestroyImageProc)(GrEGLDisplay d py, GrEGLImage image); 353 typedef GrEGLBoolean (GR_GL_FUNCTION_TYPE* GrEGLDestroyImageProc)(GrEGLDisplay d py, GrEGLImage image);
352 } // extern "C" 354 } // extern "C"
353 355
356 template <typename GLPTR> using GrGLFunction =
357 std::function<typename std::remove_pointer<GLPTR>::type>;
358
354 #endif 359 #endif
OLDNEW
« no previous file with comments | « include/gpu/gl/GrGLExtensions.h ('k') | include/gpu/gl/GrGLInterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698