RFR: 8355611: Get rid of SurfaceManagerFactory
Nikita Gubarkov
ngubarkov at openjdk.org
Fri Apr 25 13:36:28 UTC 2025
`SurfaceManagerFactory` just checks a given `GraphicsConfiguration` against multiple types via `instanceof`, it has 3 platform-specific implementations, which rely on an ugly injection process.
There is no reason to have this class at all, we could just let `GraphicsConfiguration` create a compatible `SurfaceManager` instead.
This would reduce coupling without having to collect all surface manager types in a single place (without real need to do so).
And this would also remove dependency on the class initialization sequence by getting rid of the injection process.
-------------
Commit messages:
- 8355611: Get rid of SurfaceManagerFactory
Changes: https://git.openjdk.org/jdk/pull/24875/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24875&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8355611
Stats: 383 lines in 17 files changed: 59 ins; 310 del; 14 mod
Patch: https://git.openjdk.org/jdk/pull/24875.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/24875/head:pull/24875
PR: https://git.openjdk.org/jdk/pull/24875
More information about the client-libs-dev
mailing list