RFR: 8260931: Implement JEP 382: New macOS Rendering Pipeline [v10]

Alexey Ushakov avu at openjdk.java.net
Tue Mar 9 22:21:32 UTC 2021


On Tue, 9 Mar 2021 17:26:24 GMT, Alexey Ushakov <avu at openjdk.org> wrote:

>> src/java.desktop/macosx/classes/sun/java2d/metal/MTLContext.java line 68:
>> 
>>> 66:      * when disposing a texture-based surface).
>>> 67:      */
>>> 68:     public static void setScratchSurface(long pConfigInfo) {
>> 
>> How the scratch surface is used in the metal pipeline? Why it is not enough to set the "context current"?
>
> In fact, we don't have any scratch surfaces. SET_SCRATCH_SURFACE effectively sets the new context. For better readability, we should add the new op SET_CONTEXT in BufferedOpCodes

Probably it's enough to set the context in SET_SURFACES, I'll double-check it.

>> src/java.desktop/macosx/classes/sun/java2d/metal/MTLContext.java line 140:
>> 
>>> 138:             StringBuilder sb = new StringBuilder(super.toString());
>>> 139:             if ((caps & CAPS_DOUBLEBUFFERED) != 0) {
>>> 140:                 sb.append("CAPS_DOUBLEBUFFERED|");
>> 
>> Related to other questions, we do not include CAPS_DOUBLEBUFFERED, but anyway, report the surface as double buffered.
>
> We can remove all the unused constants

JDK-8263306

-------------

PR: https://git.openjdk.java.net/jdk/pull/2403



More information about the build-dev mailing list