[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    Re: [OpenJDK 2D-Dev] RFR: 7183828 Invalid Image Variant when using anything other than BufferedImage
From:       Sergey Bylokhov <Sergey.Bylokhov () oracle ! com>
Date:       2020-08-27 17:20:39
Message-ID: cc3dd246-6841-25dc-8af1-68c5ed913b11 () oracle ! com
[Download RAW message or body]

Hi, Phil.
>> Also now we have more checks for specific known image types.
>> VolatileImage is an abstract class and I'm surprised that this is something this fix
>> considers OK for subclasses to extend. Does that really work ?
> 
> This is a good question I'll double-check that.

You are right, we do not support the abstract VolatileImage class as well, and it
is not possible to fix this in a similar way as I did in the first revision,
because we get this exception for VolatileImage much early.

So I tried to fix it from the other way around. All our pipelines have a special
meaning of InvalidPipeException, if the pipeline found that it cannot complete draw
operation it throws this exception which is handled by all methods in the SunGraphics2D class.

So as a fix I suggest to change the IllegalArgumentException to the InvalidPipeException.
Also we need to add try/catch block to the drawHiDPIImage(it uses the
SurfaceManager.getManager method directly)

An updated version:
http://cr.openjdk.java.net/~serb/7183828/webrev.01

-- 
Best regards, Sergey.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic