aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLAssembleInterface.h
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-29 20:06:22 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-04-29 20:06:22 +0000
commit9add5dc33f10ea6c48268dab448b1df0fc96daaa (patch)
tree0b084a644fd6bd55db32b0ed946500e81620b84b /src/gpu/gl/GrGLAssembleInterface.h
parent4610a465b61f27ea5de2254a0e0b79ea2f327617 (diff)
Move GrGLInterface function ptr setup into a common function for all OpenGL GrGLInterface factories (but not GLES yet).
R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/254713006 git-svn-id: http://skia.googlecode.com/svn/trunk@14444 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/gl/GrGLAssembleInterface.h')
-rw-r--r--src/gpu/gl/GrGLAssembleInterface.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGLAssembleInterface.h b/src/gpu/gl/GrGLAssembleInterface.h
new file mode 100644
index 0000000000..1a38cafbcb
--- /dev/null
+++ b/src/gpu/gl/GrGLAssembleInterface.h
@@ -0,0 +1,19 @@
+
+/*
+ * Copyright 2014 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "gl/GrGLInterface.h"
+
+typedef void(*GrGLFuncPtr)();
+typedef GrGLFuncPtr (*GrGLGetProc)(void* ctx, const char name[]);
+
+/**
+ * Generic function for creating a GrGLInterface for an OpenGL (but not GLES) context. It calls
+ * get() to get each function address. ctx is a generic ptr passed to and interpreted by get().
+ */
+const GrGLInterface* GrGLAssembleGLInterface(void* ctx, GrGLGetProc get);
+