`BackingStore` uses its own Graphics to Paint the Image. This is fine when we 
want to paint it on a Window/Frame, but fails to print. Since `WPathGraphics` 
is used for Printing, backing store fails to print it and backing store uses 
newly created `SunGraphics2D` always. The proposed fix is to ignore 
`backingstore` graphics if passed on Graphics is different from `SunGraphics2D` 
which ensures the Image is painted on Window and also printed when required. 
The fix is tested in CI and doesn't cause any regression. The test is verified 
manually.

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

Commit messages:
 - Fix + Manual Test

Changes: https://git.openjdk.org/jdk/pull/16552/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16552&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8210807
  Stats: 214 lines in 2 files changed: 212 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/16552.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/16552/head:pull/16552

PR: https://git.openjdk.org/jdk/pull/16552

Reply via email to