> `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.
Nikita Gubarkov has updated the pull request incrementally with three additional commits since the last revision: - fixup! 8355611: Get rid of SurfaceManagerFactory Remove SurfaceManager.Factory interface from XRGraphicsConfig. - fixup! 8355611: Get rid of SurfaceManagerFactory Split long lines (8339341) - fixup! 8355611: Get rid of SurfaceManagerFactory Split long lines ------------- Changes: - all: https://git.openjdk.org/jdk/pull/24875/files - new: https://git.openjdk.org/jdk/pull/24875/files/c1e55120..3741484e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=24875&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24875&range=01-02 Stats: 46 lines in 12 files changed: 20 ins; 0 del; 26 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