[platformsupport] Minor code style and class variables access changes
ClosedPublic

Authored by romangg on Jun 27 2019, 12:11 AM.

Details

Summary

Some of these variables have been declared protected but can apparently
also be private.

Other minor code style improvements.

Test Plan

Compiles, Wayland nested session runs.

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
romangg created this revision.Jun 27 2019, 12:11 AM
Restricted Application added a project: KWin. · View Herald TranscriptJun 27 2019, 12:11 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
romangg requested review of this revision.Jun 27 2019, 12:11 AM
zzag accepted this revision.Jun 27 2019, 8:21 AM
zzag added a subscriber: zzag.

Some of these variables have been declared protected but can apparently also be private.

That's because SceneOpenGLTexture and OpenGLWindowPixmap are fwends. It's somewhat weird to declare a friend class, which is specific to one scene, in a generic-ish class. On the other hand, we have only one OpenGL scene.

This revision is now accepted and ready to land.Jun 27 2019, 8:21 AM
In D22109#487099, @zzag wrote:

Some of these variables have been declared protected but can apparently also be private.

That's because SceneOpenGLTexture and OpenGLWindowPixmap are fwends. It's somewhat weird to declare a friend class, which is specific to one scene, in a generic-ish class. On the other hand, we have only one OpenGL scene.

While there is a friend relation they are not in a parent-child relation. From my understanding conceptually they are both on the same level inside KWin. OpenGLWindowPixmap represents a WindowPixmap in the OpenGl scene while SceneOpenGlTexture represents the actual texture in it. The platform separation is then done one level below in the OpenGlBackend child classes and their respective SceneOpenGLTexturePrivate implementations.

This revision was automatically updated to reflect the committed changes.