|
1 | 1 | /* |
2 | | - * Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 2017, 2025, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 | 4 | * |
5 | 5 | * This code is free software; you can redistribute it and/or modify it |
|
52 | 52 | import javax.imageio.ImageWriter; |
53 | 53 | import javax.imageio.stream.ImageOutputStream; |
54 | 54 |
|
55 | | -/** |
56 | | - * @test |
| 55 | +/* |
| 56 | + * @test id=Poly |
57 | 57 | * @bug 8191814 |
58 | | - * @summary Verifies that Marlin rendering generates the same |
59 | | - * images with and without clipping optimization with all possible |
60 | | - * stroke (cap/join) and/or dashes or fill modes (EO rules) |
61 | | - * for paths made of either 9 lines, 4 quads, 2 cubics (random) |
62 | | - * Note: Use the argument -slow to run more intensive tests (too much time) |
63 | | - * |
| 58 | + * @summary Runs the test with "-poly" option |
64 | 59 | * @run main/othervm/timeout=300 -Dsun.java2d.renderer=sun.java2d.marlin.DMarlinRenderingEngine ClipShapeTest -poly |
| 60 | + */ |
| 61 | + |
| 62 | +/* |
| 63 | + * @test id=PolyDoDash |
| 64 | + * @bug 8191814 |
| 65 | + * @summary Runs the test with "-poly -doDash" options |
65 | 66 | * @run main/othervm/timeout=300 -Dsun.java2d.renderer=sun.java2d.marlin.DMarlinRenderingEngine ClipShapeTest -poly -doDash |
| 67 | + */ |
| 68 | + |
| 69 | +/* |
| 70 | + * @test id=Cubic |
| 71 | + * @bug 8191814 |
| 72 | + * @summary Runs the test with "-cubic" option |
66 | 73 | * @run main/othervm/timeout=300 -Dsun.java2d.renderer=sun.java2d.marlin.DMarlinRenderingEngine ClipShapeTest -cubic |
| 74 | + */ |
| 75 | + |
| 76 | +/* |
| 77 | + * @test id=CubicDoDash |
| 78 | + * @bug 8191814 |
| 79 | + * @summary Runs the test with "-cubic -doDash" options |
67 | 80 | * @run main/othervm/timeout=300 -Dsun.java2d.renderer=sun.java2d.marlin.DMarlinRenderingEngine ClipShapeTest -cubic -doDash |
68 | | -*/ |
| 81 | + */ |
| 82 | + |
| 83 | +/** |
| 84 | + * Verifies that Marlin rendering generates the same images with and without |
| 85 | + * clipping optimization with all possible stroke (cap/join) and/or dashes or |
| 86 | + * fill modes (EO rules) for paths made of either 9 lines, 4 quads, 2 cubics |
| 87 | + * (random). |
| 88 | + * <p> |
| 89 | + * Note: Use the argument {@code -slow} to run more intensive tests (too much |
| 90 | + * time). |
| 91 | + */ |
69 | 92 | public final class ClipShapeTest { |
70 | 93 |
|
71 | 94 | // test options: |
@@ -131,13 +154,12 @@ static enum ShapeMode { |
131 | 154 | static final AtomicBoolean isMarlin = new AtomicBoolean(); |
132 | 155 | static final AtomicBoolean isClipRuntime = new AtomicBoolean(); |
133 | 156 |
|
| 157 | + static final Logger log = Logger.getLogger("sun.java2d.marlin"); |
| 158 | + |
134 | 159 | static { |
135 | 160 | Locale.setDefault(Locale.US); |
136 | 161 |
|
137 | 162 | // FIRST: Get Marlin runtime state from its log: |
138 | | - |
139 | | - // initialize j.u.l Looger: |
140 | | - final Logger log = Logger.getLogger("sun.java2d.marlin"); |
141 | 163 | log.addHandler(new Handler() { |
142 | 164 | @Override |
143 | 165 | public void publish(LogRecord record) { |
|
0 commit comments