[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-2d-dev
Subject: Re: RFR: 8283794: CCE in XRTextRenderer.drawGlyphList and XRMaskFill.MaskFill
From: Alexey Ushakov <avu () openjdk ! java ! net>
Date: 2022-03-30 20:04:33
Message-ID: 2tpatQTgb8B1tuco4dedi1IDl2yem6W7xKsl_-QuKh4=.3401e965-b176-42bc-87f7-301dd0959653 () github ! com
[Download RAW message or body]
On Tue, 29 Mar 2022 20:54:16 GMT, Sergey Bylokhov <serb@openjdk.org> wrote:
> Since this is the third cast-related issue then probably it will be useful to \
> create a method to convert the `surfaceData `to the (XRSurfaceData) and throw \
> `InvalidPipeException `if needed? We have many other places where we use the same \
> casts.
Yes, agree. Also, I think we need to update similar cases in MTLRenderer, \
MTLMaskFill, OGLMaskFill, OGLRenderer, XRPMBlitLoops, D3DMaskFill, D3DRenderer, \
GDIRenderer.
The conversion can be done using generics in SurfaceData:
SurfaceData.convertTo(XRSurfaceData.class, sg2d.surfaceData);
or by providing separate conversion methods for each SurfaceData subclass
XRSurfaceData x11sd = XRSurfaceData.toXRSurfaceData(sData);
-------------
PR: https://git.openjdk.java.net/jdk/pull/8015
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic