|
38 | 38 | import java.util.concurrent.atomic.AtomicInteger;
|
39 | 39 | import net.imglib2.util.Intervals;
|
40 | 40 | import bvv.core.backend.Texture3D;
|
| 41 | +import bvv.core.backend.Texture.InternalFormat; |
41 | 42 | import bvv.core.blocks.ByteUtils;
|
42 | 43 |
|
43 | 44 | import static bvv.core.cache.TextureCache.ContentState.INCOMPLETE;
|
@@ -301,10 +302,20 @@ private void initializeBlockedTiles( ArrayList< TileFillTask > tileFillTasks )
|
301 | 302 | final Object dummyImage = new Object();
|
302 | 303 | final ImageBlockKey< Object > oobDummyKey = new ImageBlockKey<>( dummyImage, new int[] { 0, 0, 0 } );
|
303 | 304 | final int elementsPerTile = ( int ) Intervals.numElements( spec.paddedBlockSize() );
|
304 |
| - tileFillTasks.add( new TileFillTask( new DefaultFillTask( oobDummyKey, buf -> { |
305 |
| - ByteUtils.setShorts( ( short ) 0, buf.getAddress(), elementsPerTile ); |
306 |
| - return true; |
307 |
| - } , () -> true ), oobTile ) ); |
| 305 | + if(spec.format() == InternalFormat.R8) |
| 306 | + { |
| 307 | + tileFillTasks.add( new TileFillTask( new DefaultFillTask( oobDummyKey, buf -> { |
| 308 | + ByteUtils.setBytes( ( byte ) 0, buf.getAddress(), elementsPerTile ); |
| 309 | + return true; |
| 310 | + } , () -> true ), oobTile ) ); |
| 311 | + } |
| 312 | + if(spec.format() == InternalFormat.R16) |
| 313 | + { |
| 314 | + tileFillTasks.add( new TileFillTask( new DefaultFillTask( oobDummyKey, buf -> { |
| 315 | + ByteUtils.setShorts( ( short ) 0, buf.getAddress(), elementsPerTile ); |
| 316 | + return true; |
| 317 | + } , () -> true ), oobTile ) ); |
| 318 | + } |
308 | 319 | }
|
309 | 320 |
|
310 | 321 | private List< Tile > assignFillTiles( final int size, final int currentTimestamp )
|
|
0 commit comments