[OpenJDK 2D-Dev] <AWT Dev> [8] Request for review: 8000629 [macosx] Blurry rendering with Java 7 on Retina display
Jim Graham
james.graham at oracle.com
Mon Apr 8 21:37:55 UTC 2013
I just wanted to add:
On 4/8/2013 2:19 PM, Jim Graham wrote:
> It's already done and the code is written, but in retrospect, I'm not sure how much the optimizations in getTransform/setTransform are worth compared to the easy readability of having the transforms done linearly in a LIFO manner, such as:
>
> setTransform:
> transform.setToIdentity();
> if (cX|cY != 0) { transform.translate(cX, cY); }
> if (dS != 1) transform.scale(dS, dS); }
> transform.concatenate(Tx);
> getTransform:
> tx = new AT(transform);
> if (dS != 1) { tx.scale(invDs, invDs); }
> if (cX|cY != 0) { tx.translate(-cX, -cY); }
> return tx;
>
> (I don't think it should be changed, but I'm throwing it out there as food for thought as it may be easier to maintain in the future, but it could also change the performance as I'm just speculating from how I remember the optimizations work...)
I had a sudden "uh oh" about the commutativity of the operations done in setTransform/getTransform (the ones in the webrev), but I just ran the math and it does appear to be a correct inverse operation (probably because it is a uniform scale and a translate which are more benign than other matrix ops). So, there's a double check on the new math...
...jim
More information about the 2d-dev
mailing list