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

Side by Side Diff: tools/gpu/gl/GLTestContext.h

Issue 2383383002: Move GPU fences into sk_gpu_test (Closed)
Patch Set: Move GPU fences into sk_gpu_test Created 4 years, 2 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
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 GLTestContext_DEFINED 8 #ifndef GLTestContext_DEFINED
9 #define GLTestContext_DEFINED 9 #define GLTestContext_DEFINED
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 * (if not null). 58 * (if not null).
59 */ 59 */
60 virtual GLTestContext *createNew() const { return nullptr; } 60 virtual GLTestContext *createNew() const { return nullptr; }
61 61
62 protected: 62 protected:
63 GLTestContext(); 63 GLTestContext();
64 64
65 /* 65 /*
66 * Methods that sublcasses must call from their constructors and destructors . 66 * Methods that sublcasses must call from their constructors and destructors .
67 */ 67 */
68 void init(const GrGLInterface *, SkGpuFenceSync * = NULL); 68 void init(const GrGLInterface *, FenceSync* = nullptr);
69 69
70 void teardown() override; 70 void teardown() override;
71 71
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.
76
77 /** Subclass provides the gl interface object if construction was 75 /** Subclass provides the gl interface object if construction was
78 * successful. */ 76 * successful. */
79 SkAutoTUnref<const GrGLInterface> fGL; 77 SkAutoTUnref<const GrGLInterface> fGL;
80 78
81 friend class GLFenceSync; // For onPlatformGetProcAddress. 79 friend class GLFenceSync; // For onPlatformGetProcAddress.
82 80
83 typedef TestContext INHERITED; 81 typedef TestContext INHERITED;
84 }; 82 };
85 83
86 /** 84 /**
87 * Creates platform-dependent GL context object. The shareContext parameter is in an optional 85 * 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 86 * 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 87 * 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. 88 * valid gl context object or NULL if such can not be created.
91 */ 89 */
92 GLTestContext* CreatePlatformGLTestContext(GrGLStandard forcedGpuAPI, 90 GLTestContext* CreatePlatformGLTestContext(GrGLStandard forcedGpuAPI,
93 GLTestContext *shareContext = nullptr ); 91 GLTestContext *shareContext = nullptr );
94 92
95 } // namespace sk_gpu_test 93 } // namespace sk_gpu_test
96 #endif 94 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698