diff options
author | joshualitt <joshualitt@chromium.org> | 2016-01-20 08:07:01 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-20 08:07:02 -0800 |
commit | b59d1bc7a8596f346d57a9cfcd461dddc6d75edb (patch) | |
tree | 802ae32d377784134f621307ede9fff2b2adfb34 /include/gpu/gl | |
parent | c1e710140b652509822a42872c4d4dd058393582 (diff) |
Add ability to wire up sharelist in glcontext creation
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1604993005
Review URL: https://codereview.chromium.org/1604993005
Diffstat (limited to 'include/gpu/gl')
-rw-r--r-- | include/gpu/gl/SkGLContext.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/include/gpu/gl/SkGLContext.h b/include/gpu/gl/SkGLContext.h index 77fd325dd8..63c3e9ca7b 100644 --- a/include/gpu/gl/SkGLContext.h +++ b/include/gpu/gl/SkGLContext.h @@ -113,14 +113,16 @@ private: friend class GLFenceSync; // For onPlatformGetProcAddress. }; -/** Creates platform-dependent GL context object - * Returns a valid gl context object or NULL if such can not be created. - * Note: If Skia embedder needs a custom GL context that sets up the GL - * interface, this function should be implemented by the embedder. - * Otherwise, the default implementation for the platform should be compiled in - * the library. +/** Creates platform-dependent GL context object. The shareContext parameter is in an optional + * context with which to share display lists. This should be a pointer to an SkGLContext created + * with SkCreatePlatformGLContext. NULL indicates that no sharing is to take place. Returns a valid + * gl context object or NULL if such can not be created. + * Note: If Skia embedder needs a custom GL context that sets up the GL interface, this function + * should be implemented by the embedder. Otherwise, the default implementation for the platform + * should be compiled in the library. */ -SK_API SkGLContext* SkCreatePlatformGLContext(GrGLStandard forcedGpuAPI); +SK_API SkGLContext* SkCreatePlatformGLContext(GrGLStandard forcedGpuAPI, + SkGLContext* shareContext = nullptr); /** * Helper macros for using the GL context through the GrGLInterface. Example: |