| OLD | NEW |
| 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 GLTestContext_DEFINED | 8 #ifndef GLTestContext_DEFINED |
| 9 #define GLTestContext_DEFINED | 9 #define GLTestContext_DEFINED |
| 10 | 10 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 virtual GrGLFuncPtr onPlatformGetProcAddress(const char *) const = 0; | 72 virtual GrGLFuncPtr onPlatformGetProcAddress(const char *) const = 0; |
| 73 | 73 |
| 74 private: | 74 private: |
| 75 class GLFenceSync; // SkGpuFenceSync implementation that uses the OpenGL fu
nctionality. | 75 class GLFenceSync; // SkGpuFenceSync implementation that uses the OpenGL fu
nctionality. |
| 76 | 76 |
| 77 /** Subclass provides the gl interface object if construction was | 77 /** Subclass provides the gl interface object if construction was |
| 78 * successful. */ | 78 * successful. */ |
| 79 SkAutoTUnref<const GrGLInterface> fGL; | 79 SkAutoTUnref<const GrGLInterface> fGL; |
| 80 | 80 |
| 81 friend class GLFenceSync; // For onPlatformGetProcAddress. | 81 friend class GLFenceSync; // For onPlatformGetProcAddress. |
| 82 friend class GLGpuTimer; // For onPlatformGetProcAddress. |
| 82 | 83 |
| 83 typedef TestContext INHERITED; | 84 typedef TestContext INHERITED; |
| 84 }; | 85 }; |
| 85 | 86 |
| 86 /** | 87 /** |
| 87 * Creates platform-dependent GL context object. The shareContext parameter is
in an optional | 88 * Creates platform-dependent GL context object. The shareContext parameter is
in an optional |
| 88 * context with which to share display lists. This should be a pointer to an GLT
estContext created | 89 * context with which to share display lists. This should be a pointer to an GLT
estContext created |
| 89 * with SkCreatePlatformGLTestContext. NULL indicates that no sharing is to tak
e place. Returns a | 90 * with SkCreatePlatformGLTestContext. NULL indicates that no sharing is to tak
e place. Returns a |
| 90 * valid gl context object or NULL if such can not be created. | 91 * valid gl context object or NULL if such can not be created. |
| 91 */ | 92 */ |
| 92 GLTestContext* CreatePlatformGLTestContext(GrGLStandard forcedGpuAPI, | 93 GLTestContext* CreatePlatformGLTestContext(GrGLStandard forcedGpuAPI, |
| 93 GLTestContext *shareContext = nullptr
); | 94 GLTestContext *shareContext = nullptr
); |
| 94 | 95 |
| 95 } // namespace sk_gpu_test | 96 } // namespace sk_gpu_test |
| 96 #endif | 97 #endif |
| OLD | NEW |