Yes, the limitation is in snapshot, although there are other places
where we hit the same limit. When rendering an image via an InageView we
do the tiling correctly.
I haven't seen anything lower than 4K x 4X in practice, so that should
be safe. We do query and keep the max texture size internally in Prism
(per-resource-factory), but don't expose it via a public API.
-- Kevin
Danno Ferrin wrote:
So the limitation is in the snapshot code, not the target image code?
This is actually a feasible workaround, so 8u40 would be grand but 9
is also just fine.
Also, is 4K the lowest the texture size max will be? Or is there some
API to query it?
On Fri, Jun 13, 2014 at 9:38 AM, Kevin Rushforth
<kevin.rushfo...@oracle.com <mailto:kevin.rushfo...@oracle.com>> wrote:
This is RT-22073 <https://javafx-jira.kenai.com/browse/RT-22073>
which is currently targeted for 9, but could be moved into 8u20 if
there was enough demand to fix it. The (rather ugly) app-level
workaround is to break the operation up into 4Kx4K tiles, and
render the tiles in a loop specifying the appropriate viewport and
translation via ShapshotParams.
-- Kevin
Danno Ferrin wrote:
While working on a fun project I discovered that the Image Export limits
the size of the export textures, mostly depending on your graphics stack.
Here's one example:
java.lang.RuntimeException: Requested texture dimensions (20581x245)
require dimensions (0x245) that exceed maximum texture size (16384)
at com.sun.prism.es2.ES2RTTexture.create(ES2RTTexture.java:220)
at
com.sun.prism.es2.ES2ResourceFactory.createRTTexture(ES2ResourceFactory.java:106)
at
com.sun.prism.es2.ES2ResourceFactory.createRTTexture(ES2ResourceFactory.java:102)
at
com.sun.javafx.tk.quantum.QuantumToolkit$QuantumImage.getRT(QuantumToolkit.java:1210)
at com.sun.javafx.tk.quantum.QuantumToolkit$18.run(QuantumToolkit.java:1345)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at
com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:129)
This is on a mid-2012 Mac Book Air, and the MacGLConext looks to limit
dimensions to 2^14.
Is there anything I can do other than making sure my nodes don't get bigger
than 16K on one side? I've tried setting a transform on the snapshot and
zooming it below 16k, but it still gets the same exception with he same
dimensions.
--Danno