aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/viewer/sk_app/unix/GLWindowContext_unix.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/viewer/sk_app/unix/GLWindowContext_unix.h')
-rw-r--r--tools/viewer/sk_app/unix/GLWindowContext_unix.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/tools/viewer/sk_app/unix/GLWindowContext_unix.h b/tools/viewer/sk_app/unix/GLWindowContext_unix.h
new file mode 100644
index 0000000000..2d76254c21
--- /dev/null
+++ b/tools/viewer/sk_app/unix/GLWindowContext_unix.h
@@ -0,0 +1,39 @@
+
+/*
+ * Copyright 2016 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+#ifndef GLWindowContext_unix_DEFINED
+#define GLWindowContext_unix_DEFINED
+
+#include "../GLWindowContext.h"
+#include "Window_unix.h"
+
+namespace sk_app {
+
+class GLWindowContext_unix : public GLWindowContext {
+public:
+ friend GLWindowContext* GLWindowContext::Create(void* platformData, const DisplayParams&);
+
+ ~GLWindowContext_unix() override;
+
+ void onSwapBuffers() override;
+
+ void onInitializeContext(void*, const DisplayParams&) override;
+ void onDestroyContext() override;
+
+private:
+ GLWindowContext_unix(void*, const DisplayParams&);
+
+ Display* fDisplay;
+ XWindow fWindow;
+ XVisualInfo* fVisualInfo;
+ GLXContext fGLContext;
+};
+
+
+}
+
+#endif