[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-2d-dev
Subject: RFR: 8272288: Funky multiresolution image breaks graphics context
From: Sergey Bylokhov <serb () openjdk ! org>
Date: 2022-12-30 6:31:37
Message-ID: v6GtuWIiXG4SzSCdmVGlwdf0hEEVHrZureMEm5NqcUE=.e5d62f8b-6a2f-429e-923a-1c05385f69ac () github ! com
[Download RAW message or body]
This is the next iteration of fixing the issue of rendering "broken" image. The fix \
for [JDK-7183828](https://bugs.openjdk.org/browse/JDK-7183828) changed the possible \
IllegalArgumentException during rendering to the InvalidPipeException in assumtion \
that the new exception will be catched by the java2d machinery and the \
current-accelerated pipeline will be invalidated and software-pipeline will take care \
about that image.
But that change uncover another bug, the accelerated-pipeline invalidation by the \
InvalidPipeException works in D3D pipeline only, other pipelines start to use \
software based surfaces, but do not report about that the client code, as a result \
the next code does not work as expected, since contentsLost alwys return false:
do {
vi.validate(gc);
Graphics2D g = vi.createGraphics();
g.fillRect(0, 0, vi.getWidth(), vi.getHeight());
g.dispose();
} while (vi.contentsLost());
After this change the correct value will be reported by the contentsLost(), so the \
RepaintManager will be able to catch that. But this fix uncovered another bug. That \
fallback code path in the RepaintManager was not tested on HiDPI screen and does not \
work well. I'll file a separate bug about that.
-------------
Commit messages:
- Merge remote-tracking branch 'upstream/master' into JDK-8272288
- 8272288: Funky multiresolution image breaks graphics context
Changes: https://git.openjdk.org/jdk/pull/11664/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11664&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8272288
Stats: 157 lines in 3 files changed: 143 ins; 12 del; 2 mod
Patch: https://git.openjdk.org/jdk/pull/11664.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/11664/head:pull/11664
PR: https://git.openjdk.org/jdk/pull/11664
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic