MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / call

Method call

src/main/java/field/graphics/util/SaverFBO.java:197–217  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

195 FastJPEG j2 = new FastJPEG();
196
197 private Callable<Pair<ByteBuffer, ByteBuffer>> makeWorker(final Pair<ByteBuffer, ByteBuffer> storage, final String filename) {
198 return new Callable<Pair<ByteBuffer, ByteBuffer>>() {
199 public Pair<ByteBuffer, ByteBuffer> call() throws Exception {
200
201 for (int y = 0; y < height; y++) {
202 storage.first.position(y * width * 3);
203 storage.first.limit((y + 1) * width * 3);
204 storage.second.position((height - y - 1) * width * 3);
205 storage.second.limit((height - y - 1 + 1) * width * 3);
206 storage.second.put(storage.first);
207 storage.second.clear();
208 storage.first.clear();
209 }
210
211 try {
212 new SlowJPEG().compress(filename, storage.second, width, height);
213 } catch (Throwable t) {
214 System.err.println(" -- exception thrown in compress for :" + filename + " " + storage + " " + width + " " + height);
215 t.printStackTrace();
216 }
217 return storage;
218
219 }
220 };

Callers

nothing calls this directly

Calls 6

positionMethod · 0.65
limitMethod · 0.45
putMethod · 0.45
clearMethod · 0.45
compressMethod · 0.45
printlnMethod · 0.45

Tested by

no test coverage detected