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

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

Issue 1604993005: Add ability to wire up sharelist in glcontext creation (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | src/gpu/GrContextFactory.h » ('j') | src/gpu/GrContextFactory.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 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 #ifndef SkGLContext_DEFINED 8 #ifndef SkGLContext_DEFINED
9 #define SkGLContext_DEFINED 9 #define SkGLContext_DEFINED
10 10
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 SkAutoTUnref<const GrGLInterface> fGL; 111 SkAutoTUnref<const GrGLInterface> fGL;
112 112
113 friend class GLFenceSync; // For onPlatformGetProcAddress. 113 friend class GLFenceSync; // For onPlatformGetProcAddress.
114 }; 114 };
115 115
116 /** Creates platform-dependent GL context object 116 /** Creates platform-dependent GL context object
117 * Returns a valid gl context object or NULL if such can not be created. 117 * Returns a valid gl context object or NULL if such can not be created.
118 * Note: If Skia embedder needs a custom GL context that sets up the GL 118 * Note: If Skia embedder needs a custom GL context that sets up the GL
119 * interface, this function should be implemented by the embedder. 119 * interface, this function should be implemented by the embedder.
120 * Otherwise, the default implementation for the platform should be compiled in 120 * Otherwise, the default implementation for the platform should be compiled in
121 * the library. 121 * the library.
bsalomon 2016/01/19 22:00:57 Should comment on shareList. Also, name doesn't se
joshualitt 2016/01/20 14:36:56 Acknowledged.
122 */ 122 */
123 SK_API SkGLContext* SkCreatePlatformGLContext(GrGLStandard forcedGpuAPI); 123 SK_API SkGLContext* SkCreatePlatformGLContext(GrGLStandard forcedGpuAPI,
124 SkGLContext* shareList = nullptr);
124 125
125 /** 126 /**
126 * Helper macros for using the GL context through the GrGLInterface. Example: 127 * Helper macros for using the GL context through the GrGLInterface. Example:
127 * SK_GL(glCtx, GenTextures(1, &texID)); 128 * SK_GL(glCtx, GenTextures(1, &texID));
128 */ 129 */
129 #define SK_GL(ctx, X) (ctx).gl()->fFunctions.f ## X; \ 130 #define SK_GL(ctx, X) (ctx).gl()->fFunctions.f ## X; \
130 SkASSERT(0 == (ctx).gl()->fFunctions.fGetError()) 131 SkASSERT(0 == (ctx).gl()->fFunctions.fGetError())
131 #define SK_GL_RET(ctx, RET, X) (RET) = (ctx).gl()->fFunctions.f ## X; \ 132 #define SK_GL_RET(ctx, RET, X) (RET) = (ctx).gl()->fFunctions.f ## X; \
132 SkASSERT(0 == (ctx).gl()->fFunctions.fGetError()) 133 SkASSERT(0 == (ctx).gl()->fFunctions.fGetError())
133 #define SK_GL_NOERRCHECK(ctx, X) (ctx).gl()->fFunctions.f ## X 134 #define SK_GL_NOERRCHECK(ctx, X) (ctx).gl()->fFunctions.f ## X
134 #define SK_GL_RET_NOERRCHECK(ctx, RET, X) (RET) = (ctx).gl()->fFunctions.f ## X 135 #define SK_GL_RET_NOERRCHECK(ctx, RET, X) (RET) = (ctx).gl()->fFunctions.f ## X
135 136
136 #endif 137 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrContextFactory.h » ('j') | src/gpu/GrContextFactory.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698