summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoaglcontext.h
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-08-01 13:38:53 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-08-03 17:17:50 +0000
commitffae448dc3fd4028aa62acc8710f8a11b1985f7f (patch)
treeb72645f0bf539fdd83e76a3472dbb0c022126d5e /src/plugins/platforms/cocoa/qcocoaglcontext.h
parenta882ffc603bdc663e3d32905a1817a45167b84b1 (diff)
macOS: Reorganize QCocoaGLContext
Group methods by their areas of responsibility to make it easier to follow the logic of the code. Change-Id: I64dbf60004d0f4c281312451e0781da31997c64d Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoaglcontext.h')
-rw-r--r--src/plugins/platforms/cocoa/qcocoaglcontext.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaglcontext.h b/src/plugins/platforms/cocoa/qcocoaglcontext.h
index 0530aa8201..c3640f56ab 100644
--- a/src/plugins/platforms/cocoa/qcocoaglcontext.h
+++ b/src/plugins/platforms/cocoa/qcocoaglcontext.h
@@ -55,28 +55,26 @@ public:
QCocoaGLContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, const QVariant &nativeHandle);
~QCocoaGLContext();
- QSurfaceFormat format() const override;
-
- void swapBuffers(QPlatformSurface *surface) override;
-
bool makeCurrent(QPlatformSurface *surface) override;
+ void swapBuffers(QPlatformSurface *surface) override;
void doneCurrent() override;
- QFunctionPointer getProcAddress(const char *procName) override;
-
void update();
- static NSOpenGLPixelFormat *createNSOpenGLPixelFormat(const QSurfaceFormat &format);
- NSOpenGLContext *nsOpenGLContext() const;
-
+ QSurfaceFormat format() const override;
bool isSharing() const override;
bool isValid() const override;
void windowWasHidden();
+ NSOpenGLContext *nsOpenGLContext() const;
QVariant nativeHandle() const;
+ QFunctionPointer getProcAddress(const char *procName) override;
+
private:
+ static NSOpenGLPixelFormat *createNSOpenGLPixelFormat(const QSurfaceFormat &format);
+
void setActiveWindow(QWindow *window);
void updateSurfaceFormat();