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

Unified Diff: tools/gpu/gl/GLTestContext.h

Issue 2395573002: Revert of Move GPU fences into sk_gpu_test (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gpu/TestContext.h ('k') | tools/gpu/gl/GLTestContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gpu/gl/GLTestContext.h
diff --git a/tools/gpu/gl/GLTestContext.h b/tools/gpu/gl/GLTestContext.h
index 0cd9762f8bd5b148a8ffb3d14e2871f657624168..efe9d8f100f7f36f9792ad26f1a83fd9fece5763 100644
--- a/tools/gpu/gl/GLTestContext.h
+++ b/tools/gpu/gl/GLTestContext.h
@@ -59,38 +59,26 @@
*/
virtual GLTestContext *createNew() const { return nullptr; }
- template<typename Ret, typename... Args>
- void getGLProcAddress(Ret(GR_GL_FUNCTION_TYPE** out)(Args...),
- const char* name, const char* ext = nullptr) const {
- using Proc = Ret(GR_GL_FUNCTION_TYPE*)(Args...);
- if (!SkStrStartsWith(name, "gl")) {
- SkFAIL("getGLProcAddress: proc name must have 'gl' prefix");
- *out = nullptr;
- } else if (ext) {
- SkString fullname(name);
- fullname.append(ext);
- *out = reinterpret_cast<Proc>(this->onPlatformGetProcAddress(fullname.c_str()));
- } else {
- *out = reinterpret_cast<Proc>(this->onPlatformGetProcAddress(name));
- }
- }
-
protected:
GLTestContext();
/*
* Methods that sublcasses must call from their constructors and destructors.
*/
- void init(const GrGLInterface *, FenceSync* = nullptr);
+ void init(const GrGLInterface *, SkGpuFenceSync * = NULL);
void teardown() override;
virtual GrGLFuncPtr onPlatformGetProcAddress(const char *) const = 0;
private:
+ class GLFenceSync; // SkGpuFenceSync implementation that uses the OpenGL functionality.
+
/** Subclass provides the gl interface object if construction was
* successful. */
SkAutoTUnref<const GrGLInterface> fGL;
+
+ friend class GLFenceSync; // For onPlatformGetProcAddress.
typedef TestContext INHERITED;
};
« no previous file with comments | « tools/gpu/TestContext.h ('k') | tools/gpu/gl/GLTestContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698