[OpenJDK Rasterizer] Marlin renderer contribution for review

Jim Graham james.graham at oracle.com
Wed Mar 18 21:26:48 UTC 2015


Hi Laurent,

On 3/18/15 9:17 AM, Laurent Bourgès wrote:
>     TransformingPathConsumer2D - the if/else style being replaced here
>     was actually intentional.  The lack of a trailing "return" statement
>     ensures that all cases were specifically handled above in either an
>     if, or its associated else block, and that none of the cases ended
>     up falling through to a subsequent "catch-all" operation by
>     accident.  Nothing is broken here, I just wanted to point out the
>     "whys" of the original code style.  In the new code, there are still
>     some bare "} else {" lines left which raises the question - what was
>     the specific style goal in whether an "} else {" was eliminated or
>     left intact?  The prior style goal was "no fallthrough cases
>     anywhere" - the new style seems to be "usually fallthrough, but
>     sometimes explicit alternate return values in an else clause".
>
> Ok I will revert such changes even if I like the fallthrough approach
> (more obvious and readable).

If you like the new style better that's fine.  As I said "Nothing is 
broken here, I just wanted to point out the whys of the original"...

			...jim


More information about the graphics-rasterizer-dev mailing list