Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1030 commits
Select commit Hold shift + click to select a range
898c29f
8252552: DecimalFormat javadoc contains HTML tags in example code
naotoj Aug 31, 2020
7bc7265
Automatic merge of client:master into master
Sep 1, 2020
b5a8079
8252592: Non-PCH build is broken after JDK-8251560
shipilev Sep 1, 2020
57bf93d
8251122: doclint html5 errors in java.desktop/share/classes/javax/swi…
trebari Sep 1, 2020
7456072
Automatic merge of client:master into master
Sep 1, 2020
b79f4f0
Merge
prsadhuk Sep 1, 2020
a3d5998
Automatic merge of client:master into master
Sep 1, 2020
bcc85aa
8251032: Colors with texture background look different with Alpha Com…
dekonoplyov Sep 2, 2020
d3bbb05
8252706: Enable usage of rowBytesOffset for LCD non cache rendering
jayathirthrao Sep 2, 2020
db306e2
8252386: Lanai: Implement RadialGradientPaint in shader
Sep 3, 2020
ab213f5
8252798: Cleanup LCD text rendering code
jayathirthrao Sep 7, 2020
2c50c0f
8252845: Regressions in Sanity tests after JDK-8251032
Sep 7, 2020
6cecbed
8252949: Shape clip should use identity transform for drawing clip spans
aghaisas Sep 9, 2020
bcb31ed
8252895: Black background in SwingSet2 in Nimbus LAF
Sep 9, 2020
bfcf110
Merge jdk:master
kevinrushforth Sep 9, 2020
4266479
Automatic merge of jdk:master into master
Sep 10, 2020
571e894
Automatic merge of jdk:master into master
Sep 10, 2020
9be2107
Automatic merge of jdk:master into master
Sep 10, 2020
272da50
8252880: Image operations are not working with metal
Sep 10, 2020
c9dcc4d
Automatic merge of jdk:master into master
Sep 10, 2020
23aeda1
Automatic merge of jdk:master into master
Sep 10, 2020
4a8f2d2
Automatic merge of jdk:master into master
Sep 10, 2020
389eab6
Automatic merge of jdk:master into master
Sep 11, 2020
e77f8f1
Automatic merge of jdk:master into master
Sep 11, 2020
f638c5b
Automatic merge of jdk:master into master
Sep 11, 2020
69bc41b
Automatic merge of jdk:master into master
Sep 11, 2020
994240f
Automatic merge of jdk:master into master
Sep 11, 2020
521ad85
Automatic merge of jdk:master into master
Sep 11, 2020
3f2cc91
Automatic merge of jdk:master into master
Sep 11, 2020
82e504b
Automatic merge of jdk:master into master
Sep 11, 2020
e7823d8
Merge jdk:master
kevinrushforth Sep 11, 2020
4eb5cb7
Automatic merge of jdk:master into master
Sep 11, 2020
3f04475
Automatic merge of jdk:master into master
Sep 11, 2020
2026fc1
Automatic merge of jdk:master into master
Sep 11, 2020
2b54a29
Automatic merge of jdk:master into master
Sep 12, 2020
5e7ff88
Automatic merge of jdk:master into master
Sep 13, 2020
27eab83
Automatic merge of jdk:master into master
Sep 13, 2020
558f5b0
Automatic merge of jdk:master into master
Sep 14, 2020
b43461e
Automatic merge of jdk:master into master
Sep 14, 2020
aa2e7e7
Automatic merge of jdk:master into master
Sep 14, 2020
faaac4b
Automatic merge of jdk:master into master
Sep 14, 2020
17047c2
Automatic merge of jdk:master into master
Sep 14, 2020
8c3d37f
Automatic merge of jdk:master into master
Sep 14, 2020
6dcee9f
Automatic merge of jdk:master into master
Sep 14, 2020
05dba46
Automatic merge of jdk:master into master
Sep 14, 2020
9bf8b49
Automatic merge of jdk:master into master
Sep 15, 2020
4b3046e
Automatic merge of jdk:master into master
Sep 15, 2020
34cdd52
Automatic merge of jdk:master into master
Sep 15, 2020
30b446c
Automatic merge of jdk:master into master
Sep 15, 2020
6651837
Automatic merge of jdk:master into master
Sep 15, 2020
69998b3
Automatic merge of jdk:master into master
Sep 15, 2020
d07e71c
8251023: Clipping of Image doesnt work when Alpha composite is enable…
dekonoplyov Sep 15, 2020
b369c73
Automatic merge of jdk:master into master
Sep 15, 2020
6aacf1d
Automatic merge of jdk:master into master
Sep 15, 2020
0794d75
Automatic merge of jdk:master into master
Sep 15, 2020
b776c5a
Automatic merge of jdk:master into master
Sep 15, 2020
ce13b0f
Automatic merge of jdk:master into master
Sep 15, 2020
3409cb7
Automatic merge of jdk:master into master
Sep 15, 2020
06db9a2
Automatic merge of jdk:master into master
Sep 15, 2020
aa75d33
Automatic merge of jdk:master into master
Sep 15, 2020
d638a78
Automatic merge of jdk:master into master
Sep 15, 2020
243c841
8252795: Lanai: Refactor native implementation of MTLPaint
Sep 15, 2020
ca6f3ca
Automatic merge of jdk:master into master
Sep 15, 2020
746ea17
Automatic merge of jdk:master into master
Sep 15, 2020
de1213f
Automatic merge of jdk:master into master
Sep 16, 2020
248576a
Automatic merge of jdk:master into master
Sep 16, 2020
0e9118f
Automatic merge of jdk:master into master
Sep 16, 2020
ddc7693
Automatic merge of jdk:master into master
Sep 16, 2020
9714349
Automatic merge of jdk:master into master
Sep 16, 2020
f095de6
Automatic merge of jdk:master into master
Sep 16, 2020
f6e488b
Automatic merge of jdk:master into master
Sep 16, 2020
fe76452
Automatic merge of jdk:master into master
Sep 16, 2020
6461f37
Automatic merge of jdk:master into master
Sep 16, 2020
12363ab
Automatic merge of jdk:master into master
Sep 16, 2020
52becac
Automatic merge of jdk:master into master
Sep 16, 2020
df33968
Automatic merge of jdk:master into master
Sep 16, 2020
1e88cd0
8253260: Fix whitespace errors in .m and .metal files in lanai repo
kevinrushforth Sep 16, 2020
1553e9a
Merge jdk:master
kevinrushforth Sep 16, 2020
f62fdf6
Automatic merge of jdk:master into master
Sep 16, 2020
cfab014
Automatic merge of jdk:master into master
Sep 16, 2020
28cdf8a
Automatic merge of jdk:master into master
Sep 16, 2020
ac7f36b
Automatic merge of jdk:master into master
Sep 17, 2020
507a093
Automatic merge of jdk:master into master
Sep 17, 2020
b60294f
Automatic merge of jdk:master into master
Sep 17, 2020
7964f7f
Automatic merge of jdk:master into master
Sep 17, 2020
a7c59e7
Automatic merge of jdk:master into master
Sep 17, 2020
64c145a
Automatic merge of jdk:master into master
Sep 17, 2020
0852777
Automatic merge of jdk:master into master
Sep 17, 2020
a1aa4d9
Automatic merge of jdk:master into master
Sep 17, 2020
c4433bd
Automatic merge of jdk:master into master
Sep 17, 2020
1e5a5c9
8253301: Lanai: Memory leak in MTLContext code
Sep 17, 2020
ee23dcd
Automatic merge of jdk:master into master
Sep 18, 2020
057fc7c
8252499: UI text of application with metal pipeline is lost when anot…
aghaisas Sep 18, 2020
5fab769
Automatic merge of jdk:master into master
Sep 19, 2020
57c551e
Automatic merge of jdk:master into master
Sep 20, 2020
84058e3
Automatic merge of jdk:master into master
Sep 21, 2020
bf3b3c9
Automatic merge of jdk:master into master
Sep 22, 2020
a8f779d
8252796: Lanai: Shape clip test artifacts on MacBook Air 2020
Sep 22, 2020
b2d67d1
Automatic merge of jdk:master into master
Sep 23, 2020
4af6e07
8246194: Performance of Mix.Balls decreases when Rendering Quality op…
jayathirthrao Sep 23, 2020
52be8a9
Automatic merge of jdk:master into master
Sep 24, 2020
3a8f5fd
Automatic merge of jdk:master into master
Sep 25, 2020
9fc1e40
8251475: sun/java2d/pipe/hw/RSLAPITest/RSLAPITest.java fails with met…
jayathirthrao Sep 25, 2020
f90afe7
8253657: Lanai: Refactor MTLTexturePool - getTexture
Sep 25, 2020
9f51785
8252790: Lanai: Refactor RenderPerfTest to run single test by name
Sep 25, 2020
53d0d67
Automatic merge of jdk:master into master
Sep 26, 2020
120fa46
Automatic merge of jdk:master into master
Sep 27, 2020
ef3dbe5
Automatic merge of jdk:master into master
Sep 28, 2020
82bc7ce
Automatic merge of jdk:master into master
Sep 29, 2020
74f7f5f
Automatic merge of jdk:master into master
Sep 30, 2020
807c640
8253840: Lanai - MTLClip.beginShapeClip method uses a larger temporar…
aghaisas Sep 30, 2020
adf44f9
Automatic merge of jdk:master into master
Oct 1, 2020
f42d024
Automatic merge of jdk:master into master
Oct 2, 2020
cdfa562
Automatic merge of jdk:master into master
Oct 3, 2020
dd9a5fb
Automatic merge of jdk:master into master
Oct 4, 2020
454fe19
8253931: Lanai: MTLTexturePool refactoring
Oct 5, 2020
2a5cf85
Automatic merge of jdk:master into master
Oct 6, 2020
43f1444
8254176: Lanai: MTLTexturePool optimize lookup of expired textures
Oct 8, 2020
6fbe9a2
8252726: Lanai: IDEA Editor Rendering OGL vs Metal 1:2
Oct 9, 2020
952bef4
8242924: Selection is not correct in Paint.TextureAnim
aghaisas Oct 12, 2020
f4f9e93
8244845: Lanai : J2DDemo - Clipping - Two parallel lines do not appea…
aghaisas Oct 14, 2020
afc927b
8254869: Refactor check_previous_op usage in Mask Fill
jayathirthrao Oct 16, 2020
febb027
8254879: Implement JNI path for Draw Poly
jayathirthrao Oct 16, 2020
38e78cd
8254881: Commit commandbuffer after draw happens through JNI
jayathirthrao Oct 16, 2020
9d02701
Merge jdk:master
kevinrushforth Oct 16, 2020
e47e233
8244718: J2DDemo - AlphaComposite tab - output colors are different w…
dekonoplyov Oct 20, 2020
fbc066e
8255149: Lanai: DrawImage/IncorrectAlphaConversionBicubic.java failure
Oct 21, 2020
d9d2c0a
Merge jdk:master
kevinrushforth Oct 23, 2020
fea7abd
Merge jdk:master
kevinrushforth Nov 3, 2020
ced2058
8248129: Swingmark numbers are not good for Nimbus LAF
jayathirthrao Nov 5, 2020
2f883fe
8238533: [Lanai] Support texture paint where source is transparent
dekonoplyov Nov 9, 2020
a66358d
8251033: Background texture is not visible when Alpha Composite is en…
dekonoplyov Nov 9, 2020
fc9638c
Merge jdk:master
kevinrushforth Nov 10, 2020
bc0f5d2
Automatic merge of jdk:master into master
Nov 12, 2020
e5da311
Automatic merge of jdk:master into master
Nov 13, 2020
352aa3d
Automatic merge of jdk:master into master
Nov 14, 2020
3713baf
Automatic merge of jdk:master into master
Nov 17, 2020
501ace0
8252954: Lanai : java/awt/datatransfer/DataFlavor/DataFlavorRemoteTes…
jayathirthrao Nov 17, 2020
cf94b38
8256331: Lanai: DrawImage/IncorrectAlphaSurface2SW fails
Nov 17, 2020
489d303
Automatic merge of jdk:master into master
Nov 18, 2020
7979846
Automatic merge of jdk:master into master
Nov 19, 2020
bcb5b1e
8256576: DrawImage/BlitRotateClippedArea fails
Nov 19, 2020
41ebd23
Automatic merge of jdk:master into master
Nov 20, 2020
155894a
Merge jdk:master
Nov 21, 2020
08af64f
Automatic merge of jdk:master into master
Nov 22, 2020
32fd6b3
Automatic merge of jdk:master into master
Nov 23, 2020
eeadc05
Automatic merge of jdk:master into master
Nov 24, 2020
3c27630
Automatic merge of jdk:master into master
Nov 25, 2020
205bae2
Automatic merge of jdk:master into master
Nov 26, 2020
dcff176
Automatic merge of jdk:master into master
Nov 27, 2020
77dca42
8238285: Lanai: java/awt/image/DrawImage tests fail
dekonoplyov Nov 27, 2020
ec6c1f4
Automatic merge of jdk:master into master
Nov 28, 2020
add5943
Automatic merge of jdk:master into master
Nov 29, 2020
7be48b0
Automatic merge of jdk:master into master
Nov 30, 2020
aafb51f
8257413: Lanai - Use optimum sized temporary buffer while replacing t…
aghaisas Nov 30, 2020
9782047
Automatic merge of jdk:master into master
Dec 1, 2020
c6bc2f1
8257442: Lanai: Create RenderPerf tests for SW to HW blits
dekonoplyov Dec 1, 2020
a4f5e37
8257441: Lanai: java/awt/image/VolatileImage/DrawHugeImageTest fails
Dec 1, 2020
adbb74a
Merge jdk:master
Dec 2, 2020
ca1296f
Automatic merge of jdk:master into master
Dec 3, 2020
85fcedc
8257566: Lanai: System runs out of application memory while running t…
aghaisas Dec 3, 2020
33a384e
Automatic merge of jdk:master into master
Dec 4, 2020
2dbceb9
8257618: Lanai: GradientPaint interpolates over stops limits
Dec 4, 2020
2ea17a6
8242925: J2DDemo - Anti-Aliasing with Metal differs from OGL
Dec 4, 2020
4bc2b15
Automatic merge of jdk:master into master
Dec 5, 2020
e3bfd4e
Automatic merge of jdk:master into master
Dec 6, 2020
cace27d
Automatic merge of jdk:master into master
Dec 7, 2020
21d33db
8256683: Lanai: NetBeans IDE - AA Text rendering appears brighter com…
jayathirthrao Dec 8, 2020
0854159
Merge jdk:master
Dec 8, 2020
6ebf5f9
Automatic merge of jdk:master into master
Dec 9, 2020
ee97a06
Automatic merge of jdk:master into master
Dec 10, 2020
b6071d9
8257886: Build issue in macOS 10.14
Dec 10, 2020
155ae3d
Automatic merge of jdk:master into master
Dec 11, 2020
c62d6e9
Automatic merge of jdk:master into master
Dec 12, 2020
f8dafc0
Automatic merge of jdk:master into master
Dec 15, 2020
d878c52
8258257: Lanai: optimize stencil texture clear code
Dec 15, 2020
b6cb08c
Automatic merge of jdk:master into master
Dec 16, 2020
a47c1df
8258482: Lanai: reduce data for shape clip using bounding box
Dec 16, 2020
bac73bd
Automatic merge of jdk:master into master
Dec 17, 2020
5c53e62
Automatic merge of jdk:master into master
Dec 18, 2020
5263974
8247332: Checkbox reaches inconsistent state on tap to click
jayathirthrao Dec 18, 2020
72eaf07
Automatic merge of jdk:master into master
Dec 19, 2020
44c1b84
Automatic merge of jdk:master into master
Dec 20, 2020
62fe8aa
Automatic merge of jdk:master into master
Dec 22, 2020
49c84d0
Automatic merge of jdk:master into master
Dec 23, 2020
79dfc90
Automatic merge of jdk:master into master
Dec 24, 2020
44f1aa2
Automatic merge of jdk:master into master
Dec 25, 2020
10be998
Automatic merge of jdk:master into master
Dec 26, 2020
e361b77
Automatic merge of jdk:master into master
Dec 27, 2020
4cc0ffd
Automatic merge of jdk:master into master
Dec 28, 2020
e0c34c1
Automatic merge of jdk:master into master
Dec 30, 2020
cf5c1ad
Automatic merge of jdk:master into master
Dec 31, 2020
d004e26
Automatic merge of jdk:master into master
Jan 1, 2021
96d9156
Automatic merge of jdk:master into master
Jan 4, 2021
9a2e3d1
Automatic merge of jdk:master into master
Jan 5, 2021
81cdc7b
Automatic merge of jdk:master into master
Jan 6, 2021
914ef36
8259038: Stop CVDisplayLink when there is no active rendering
jayathirthrao Jan 6, 2021
459b91e
8259341:Remove useage of JNFCallVoidMethod from Metal.
prrace Jan 6, 2021
d1919ac
Automatic merge of jdk:master into master
Jan 7, 2021
5a0ccbd
8245256: Cleanup OpenGL references in Metal documentation
jayathirthrao Jan 7, 2021
a4f15c1
Automatic merge of jdk:master into master
Jan 8, 2021
cd17eb8
Automatic merge of jdk:master into master
Jan 9, 2021
9075f28
Automatic merge of jdk:master into master
Jan 10, 2021
ab4b36a
Automatic merge of jdk:master into master
Jan 11, 2021
b5719f7
Automatic merge of jdk:master into master
Jan 12, 2021
4897711
Automatic merge of jdk:master into master
Jan 13, 2021
66bdd36
8259653: Multistop gradients incorrectly works with non uniform stops
Jan 13, 2021
8e32980
Automatic merge of jdk:master into master
Jan 14, 2021
aade966
8258202: Lanai: Buffered image loses its shape after clicking on Alph…
dekonoplyov Jan 14, 2021
98822bb
Automatic merge of jdk:master into master
Jan 15, 2021
f38c45e
Automatic merge of jdk:master into master
Jan 16, 2021
0ee76de
Automatic merge of jdk:master into master
Jan 17, 2021
b68d1e4
Automatic merge of jdk:master into master
Jan 18, 2021
ba66732
8259939: Remove JNF_COCOA_ENTER/EXIT usage from Lanai project
prrace Jan 18, 2021
61b650c
Automatic merge of jdk:master into master
Jan 19, 2021
ffff4e1
8259853: Lanai: nonAA Gradient painting is not precise for VI
Jan 19, 2021
729546e
8258754: Gracefully fallback to the OpenGL rendering pipeline if Meta…
aghaisas Jan 19, 2021
1aeed78
8260000: Remove JNF_COCOA_ENTER/EXIT usage from MTLGraphicsConfig.m
aghaisas Jan 19, 2021
a086f21
8258658: Print log that metal pipeline is enabled when -Dsun.java2d.m…
aghaisas Jan 19, 2021
dd770c0
8252952: Lanai: VolatileImage/BitmaskVolatileImage test fails
Jan 19, 2021
fb9b56b
Automatic merge of jdk:master into master
Jan 20, 2021
3d1cca4
Automatic merge of jdk:master into master
Jan 21, 2021
2bdc2ad
Automatic merge of jdk:master into master
Jan 22, 2021
b4be448
Automatic merge of jdk:master into master
Jan 23, 2021
d6260ae
Automatic merge of jdk:master into master
Jan 24, 2021
50ff311
Automatic merge of jdk:master into master
Jan 25, 2021
df45ee2
8260247: Move RenderPerfTest from demo to test directory
Jan 25, 2021
fe6142e
Automatic merge of jdk:master into master
Jan 26, 2021
9116da9
Automatic merge of jdk:master into master
Jan 27, 2021
10cabad
8260554: Missing copyright headers on some Lanai files
kevinrushforth Jan 27, 2021
710301d
Automatic merge of jdk:master into master
Jan 28, 2021
24f0d2a
8260578: Replace wildcard imports with specific ones
aghaisas Jan 28, 2021
2a9fcc5
8260582: Clean up MacOSFlags implementation
aghaisas Jan 28, 2021
88c1ff8
8260553: Lanai: pipeline substates use while loop for resize
Jan 28, 2021
1cc80db
Automatic merge of jdk:master into master
Jan 29, 2021
a6f59f9
8260640: Cleanup dead code and comments imported from OpenGL
jayathirthrao Jan 29, 2021
f4666a6
8254868: Remove additional logging added under JDK-8229819
jayathirthrao Jan 29, 2021
9890f08
8260651: Build fails after fix for JDK-8260640
kevinrushforth Jan 29, 2021
99b2ff5
Automatic merge of jdk:master into master
Jan 30, 2021
162fbcd
8260672: Lanai: refactor MTLBlitLoops, MTLLayer, MTLSurfaceData
Jan 30, 2021
b8f99e1
8260681: Lanai: Refactor MTLBlitLoops.m, common.h, shaders.metal
Jan 30, 2021
6a33829
Automatic merge of jdk:master into master
Jan 31, 2021
b64eb4e
Automatic merge of jdk:master into master
Feb 1, 2021
6a4d695
8260706: Minor cleanup - CGLGraphicsConfig.java and MTLBlitLoops.m
aghaisas Feb 1, 2021
5aca2ac
8260711:
Feb 1, 2021
7bf226f
8260857: Remove JNFWeakJObjectWrapper from Lanai Project
prrace Feb 1, 2021
5a3cc03
Automatic merge of jdk:master into master
Feb 2, 2021
30b87c9
Automatic merge of jdk:master into master
Feb 3, 2021
7b6b7be
Merge jdk:master
Feb 4, 2021
81729ba
8261134: Remove additional blank lines at EOF
aghaisas Feb 4, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 25 additions & 22 deletions .jcheck/conf
Original file line number Diff line number Diff line change
@@ -1,13 +1,32 @@
;
Comment thread
aghaisas marked this conversation as resolved.
; Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
; DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
;
; This code is free software; you can redistribute it and/or modify it
; under the terms of the GNU General Public License version 2 only, as
; published by the Free Software Foundation.
;
; This code is distributed in the hope that it will be useful, but WITHOUT
; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
; version 2 for more details (a copy is included in the LICENSE file that
; accompanied this code).
;
; You should have received a copy of the GNU General Public License version
; 2 along with this work; if not, write to the Free Software Foundation,
; Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
;
; Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
; or visit www.oracle.com if you need additional information or have any
; questions.
;

[general]
project=jdk
project=lanai
jbs=JDK

[checks]
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists

[repository]
tags=(?:jdk-(?:[1-9]([0-9]*)(?:\.(?:0|[1-9][0-9]*)){0,4})(?:\+(?:(?:[0-9]+))|(?:-ga)))|(?:jdk[4-9](?:u\d{1,3})?-(?:(?:b\d{2,3})|(?:ga)))|(?:hs\d\d(?:\.\d{1,2})?-b\d\d)
branches=
error=author,whitespace,executable

[census]
version=0
Expand All @@ -16,19 +35,3 @@ domain=openjdk.org
[checks "whitespace"]
files=.*\.cpp|.*\.hpp|.*\.c|.*\.h|.*\.java|.*\.cc|.*\.hh|.*\.m|.*\.mm|.*\.gmk|.*\.m4|.*\.ac|Makefile
ignore-tabs=.*\.gmk|Makefile

[checks "merge"]
message=Merge

[checks "reviewers"]
reviewers=1
ignore=duke

[checks "committer"]
role=committer

[checks "issues"]
pattern=^([124-8][0-9]{6}): (\S.*)$

[checks "problemlists"]
dirs=test/jdk|test/langtools|test/lib-test|test/hotspot/jtreg|test/jaxp
2 changes: 2 additions & 0 deletions make/autoconf/spec.gmk.in
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,8 @@ CXXFILT:=@CXXFILT@

LIPO:=@LIPO@
INSTALL_NAME_TOOL:=@INSTALL_NAME_TOOL@
METAL := @METAL@
METALLIB := @METALLIB@

# Options to linker to specify a mapfile.
# (Note absence of := assignment, because we do not want to evaluate the macro body here)
Expand Down
28 changes: 27 additions & 1 deletion make/autoconf/toolchain.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -723,6 +723,32 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_EXTRA],
UTIL_LOOKUP_PROGS(LIPO, lipo)
UTIL_REQUIRE_PROGS(OTOOL, otool)
UTIL_REQUIRE_PROGS(INSTALL_NAME_TOOL, install_name_tool)

UTIL_LOOKUP_TOOLCHAIN_PROGS(METAL, metal)
if test "x$METAL" = x; then
AC_MSG_CHECKING([if metal can be run using xcrun])
METAL="xcrun -sdk macosx metal"
test_metal=`$METAL --version 2>&1`
if test $? -ne 0; then
AC_MSG_RESULT([no])
AC_MSG_ERROR([XCode tool 'metal' neither found in path nor with xcrun])
else
AC_MSG_RESULT([yes, will be using '$METAL'])
fi
fi

UTIL_LOOKUP_TOOLCHAIN_PROGS(METALLIB, metallib)
if test "x$METALLIB" = x; then
AC_MSG_CHECKING([if metallib can be run using xcrun])
METALLIB="xcrun -sdk macosx metallib"
test_metallib=`$METALLIB --version 2>&1`
if test $? -ne 0; then
AC_MSG_RESULT([no])
AC_MSG_ERROR([XCode tool 'metallib' neither found in path nor with xcrun])
else
AC_MSG_RESULT([yes, will be using '$METALLIB'])
fi
fi
fi

if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
Expand Down
3 changes: 2 additions & 1 deletion make/modules/java.desktop/Lib.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
Expand All @@ -24,6 +24,7 @@
#

include LibCommon.gmk
include Execute.gmk

# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, modules/java.desktop/Lib.gmk))
Expand Down
30 changes: 29 additions & 1 deletion make/modules/java.desktop/lib/Awt2dLibraries.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBAWT, \
LIBS_macosx := -lmlib_image \
-framework Cocoa \
-framework OpenGL \
-framework Metal \
-framework JavaRuntimeSupport \
-framework ApplicationServices \
-framework AudioToolbox, \
Expand Down Expand Up @@ -766,7 +767,8 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)
-framework ApplicationServices \
-framework Foundation \
-framework Security \
-framework Cocoa
-framework Cocoa \
-framework Metal
else ifeq ($(call isTargetOs, windows), true)
LIBSPLASHSCREEN_LIBS += kernel32.lib user32.lib gdi32.lib delayimp.lib $(WIN_JAVA_LIB) jvm.lib
else
Expand Down Expand Up @@ -827,6 +829,7 @@ ifeq ($(call isTargetOs, macosx), true)
libawt_lwawt/awt \
libawt_lwawt/font \
libawt_lwawt/java2d/opengl \
libawt_lwawt/java2d/metal \
include \
common/awt/debug \
common/java2d/opengl \
Expand Down Expand Up @@ -862,6 +865,7 @@ ifeq ($(call isTargetOs, macosx), true)
-framework AudioToolbox \
-framework Carbon \
-framework Cocoa \
-framework Metal \
-framework Security \
-framework ExceptionHandling \
-framework JavaRuntimeSupport \
Expand All @@ -884,6 +888,28 @@ endif
################################################################################

ifeq ($(call isTargetOs, macosx), true)
SHADERS_SRC := $(TOPDIR)/src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/shaders.metal
SHADERS_SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/native/java.desktop/libosxui
SHADERS_AIR := $(SHADERS_SUPPORT_DIR)/shaders.air
SHADERS_LIB := $(INSTALL_LIBRARIES_HERE)/shaders.metallib

$(eval $(call SetupExecute, metal_shaders, \
INFO := Running metal on $(notdir $(SHADERS_SRC)) (for libosxui.dylib), \
DEPS := $(SHADERS_SRC), \
OUTPUT_FILE := $(SHADERS_AIR), \
SUPPORT_DIR := $(SHADERS_SUPPORT_DIR), \
COMMAND := $(METAL) -c -std=osx-metal2.0 -o $(SHADERS_AIR) $(SHADERS_SRC), \
))

$(eval $(call SetupExecute, metallib_shaders, \
INFO := Running metallib on $(notdir $(SHADERS_AIR)) (for libosxui.dylib), \
DEPS := $(SHADERS_AIR), \
OUTPUT_FILE := $(SHADERS_LIB), \
SUPPORT_DIR := $(SHADERS_SUPPORT_DIR), \
COMMAND := $(METALLIB) -o $(SHADERS_LIB) $(SHADERS_AIR), \
))

TARGETS += $(SHADERS_LIB)

$(eval $(call SetupJdkLibrary, BUILD_LIBOSXUI, \
NAME := osxui, \
Expand All @@ -899,13 +925,15 @@ ifeq ($(call isTargetOs, macosx), true)
-L$(INSTALL_LIBRARIES_HERE), \
LIBS := -lawt -losxapp -lawt_lwawt \
-framework Cocoa \
-framework Metal \
-framework Carbon \
-framework ApplicationServices \
-framework JavaRuntimeSupport \
-ljava -ljvm, \
))

TARGETS += $(BUILD_LIBOSXUI)
$(BUILD_LIBOSXUI): $(SHADERS_LIB)

$(BUILD_LIBOSXUI): $(BUILD_LIBAWT)

Expand Down
5 changes: 3 additions & 2 deletions src/java.desktop/macosx/classes/sun/awt/CGraphicsConfig.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -34,6 +34,7 @@
import sun.java2d.SurfaceData;
import sun.java2d.opengl.CGLLayer;
import sun.lwawt.LWGraphicsConfig;
import sun.lwawt.macosx.CFRetainedResource;

public abstract class CGraphicsConfig extends GraphicsConfiguration
implements LWGraphicsConfig {
Expand Down Expand Up @@ -80,7 +81,7 @@ public AffineTransform getNormalizingTransform() {
* Creates a new SurfaceData that will be associated with the given
* CGLLayer.
*/
public abstract SurfaceData createSurfaceData(CGLLayer layer);
public abstract SurfaceData createSurfaceData(CFRetainedResource layer);

@Override
public final boolean isTranslucencyCapable() {
Expand Down
65 changes: 62 additions & 3 deletions src/java.desktop/macosx/classes/sun/awt/CGraphicsDevice.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -37,6 +37,8 @@
import java.util.Objects;

import sun.java2d.SunGraphicsEnvironment;
import sun.java2d.MacOSFlags;
import sun.java2d.metal.MTLGraphicsConfig;
import sun.java2d.opengl.CGLGraphicsConfig;

import static java.awt.peer.ComponentPeer.SET_BOUNDS;
Expand All @@ -54,7 +56,10 @@ public final class CGraphicsDevice extends GraphicsDevice
private volatile Rectangle bounds;
private volatile int scale;

private final GraphicsConfiguration config;
private GraphicsConfiguration config;
private static boolean metalPipelineEnabled = false;
private static boolean oglPipelineEnabled = false;


private static AWTPermission fullScreenExclusivePermission;

Expand All @@ -63,7 +68,57 @@ public final class CGraphicsDevice extends GraphicsDevice

public CGraphicsDevice(final int displayID) {
this.displayID = displayID;
config = CGLGraphicsConfig.getConfig(this);

if (MacOSFlags.isMetalEnabled()) {
// Try to create MTLGraphicsConfig, if it fails, try to create CGLGraphicsConfig as a fallback
this.config = MTLGraphicsConfig.getConfig(this, displayID);

if (this.config != null) {
metalPipelineEnabled = true;
} else {
// Try falling back to OpenGL pipeline
if (MacOSFlags.isMetalVerbose()) {
System.out.println("Metal rendering pipeline initialization failed. Using OpenGL rendering pipeline.");
}

this.config = CGLGraphicsConfig.getConfig(this);

if (this.config != null) {
oglPipelineEnabled = true;
}
}
} else {
// Try to create CGLGraphicsConfig, if it fails, try to create MTLGraphicsConfig as a fallback
this.config = CGLGraphicsConfig.getConfig(this);

if (this.config != null) {
oglPipelineEnabled = true;
} else {
// Try falling back to Metal pipeline
if (MacOSFlags.isOGLVerbose()) {
System.out.println("OpenGL rendering pipeline initialization failed. Using Metal rendering pipeline.");
}

this.config = MTLGraphicsConfig.getConfig(this, displayID);

if (this.config != null) {
metalPipelineEnabled = true;
}
}
}

if (!metalPipelineEnabled && !oglPipelineEnabled) {
// This indicates fallback to other rendering pipeline also failed.
// Should never reach here
throw new InternalError("Error - unable to initialize any rendering pipeline.");
}

if (metalPipelineEnabled && MacOSFlags.isMetalVerbose()) {
System.out.println("Metal pipeline enabled on screen " + displayID);
} else if (oglPipelineEnabled && MacOSFlags.isOGLVerbose()) {
System.out.println("OpenGL pipeline enabled on screen " + displayID);
}

// initializes default device state, might be redundant step since we
// call "displayChanged()" later anyway, but we do not want to leave the
// device in an inconsistent state after construction
Expand Down Expand Up @@ -265,6 +320,10 @@ public DisplayMode[] getDisplayModes() {
return nativeGetDisplayModes(displayID);
}

public static boolean usingMetalPipeline() {
return metalPipelineEnabled;
}

private void initScaleFactor() {
if (SunGraphicsEnvironment.isUIScaleEnabled()) {
double debugScale = SunGraphicsEnvironment.getDebugScale();
Expand Down
Loading