Test: Log saved bitmap file path.
This helps debug bitmap tests. Without this CL, I typically need to go into the file to find the test name and absolute path. With this CL, I can just adb pull the printed file path, which is much simpler. PiperOrigin-RevId: 540539042
This commit is contained in:
parent
bd97dd8519
commit
5fc5105f7a
@ -436,8 +436,7 @@ import java.util.List;
|
||||
throw new VideoFrameProcessingException(e);
|
||||
}
|
||||
|
||||
float[] identityMatrix = GlUtil.create4x4IdentityMatrix();
|
||||
glProgram.setFloatsUniform("uTexTransformationMatrix", identityMatrix);
|
||||
glProgram.setFloatsUniform("uTexTransformationMatrix", GlUtil.create4x4IdentityMatrix());
|
||||
return glProgram;
|
||||
}
|
||||
|
||||
|
@ -314,7 +314,7 @@ public class BitmapPixelTestUtil {
|
||||
* save to the {@link Context#getCacheDir() cache directory}.
|
||||
*
|
||||
* <p>File name will be {@code <testId>_<bitmapLabel>.png}. If the file failed to write, any
|
||||
* {@link IOException} will be caught and logged.
|
||||
* {@link IOException} will be caught and logged. The path will be logged regardless of success.
|
||||
*
|
||||
* @param testId Name of the test that produced the {@link Bitmap}.
|
||||
* @param bitmapLabel Label to identify the bitmap.
|
||||
@ -338,6 +338,7 @@ public class BitmapPixelTestUtil {
|
||||
|
||||
try (FileOutputStream outputStream = new FileOutputStream(file)) {
|
||||
bitmap.compress(Bitmap.CompressFormat.PNG, /* quality= */ 100, outputStream);
|
||||
Log.d(TAG, "Saved bitmap to file path: " + file.getAbsolutePath());
|
||||
} catch (IOException e) {
|
||||
Log.e(TAG, "Could not write Bitmap to file path: " + file.getAbsolutePath(), e);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user