diff --git a/libraries/effect/src/androidTest/java/androidx/media3/effect/ContrastPixelTest.java b/libraries/effect/src/androidTest/java/androidx/media3/effect/ContrastPixelTest.java index c363ba46cf..70f02091dd 100644 --- a/libraries/effect/src/androidTest/java/androidx/media3/effect/ContrastPixelTest.java +++ b/libraries/effect/src/androidTest/java/androidx/media3/effect/ContrastPixelTest.java @@ -18,7 +18,7 @@ package androidx.media3.effect; import static androidx.media3.common.util.Assertions.checkNotNull; import static androidx.media3.test.utils.BitmapPixelTestUtil.MAXIMUM_AVERAGE_PIXEL_ABSOLUTE_DIFFERENCE; -import static androidx.media3.test.utils.BitmapPixelTestUtil.createArgb8888BitmapFromCurrentGlFramebuffer; +import static androidx.media3.test.utils.BitmapPixelTestUtil.createArgb8888BitmapFromFocusedGlFramebuffer; import static androidx.media3.test.utils.BitmapPixelTestUtil.createArgb8888BitmapWithSolidColor; import static androidx.media3.test.utils.BitmapPixelTestUtil.createGlTextureFromBitmap; import static androidx.media3.test.utils.BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceArgb8888; @@ -107,7 +107,7 @@ public class ContrastPixelTest { contrastShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -131,7 +131,7 @@ public class ContrastPixelTest { contrastShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -151,7 +151,7 @@ public class ContrastPixelTest { contrastShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -171,7 +171,7 @@ public class ContrastPixelTest { contrastShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -190,7 +190,7 @@ public class ContrastPixelTest { contrastShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = diff --git a/libraries/effect/src/androidTest/java/androidx/media3/effect/CropPixelTest.java b/libraries/effect/src/androidTest/java/androidx/media3/effect/CropPixelTest.java index 90bb08180c..0a91c4c7e7 100644 --- a/libraries/effect/src/androidTest/java/androidx/media3/effect/CropPixelTest.java +++ b/libraries/effect/src/androidTest/java/androidx/media3/effect/CropPixelTest.java @@ -17,7 +17,7 @@ package androidx.media3.effect; import static androidx.media3.common.util.Assertions.checkNotNull; import static androidx.media3.test.utils.BitmapPixelTestUtil.MAXIMUM_AVERAGE_PIXEL_ABSOLUTE_DIFFERENCE; -import static androidx.media3.test.utils.BitmapPixelTestUtil.createArgb8888BitmapFromCurrentGlFramebuffer; +import static androidx.media3.test.utils.BitmapPixelTestUtil.createArgb8888BitmapFromFocusedGlFramebuffer; import static androidx.media3.test.utils.BitmapPixelTestUtil.createGlTextureFromBitmap; import static androidx.media3.test.utils.BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceArgb8888; import static androidx.media3.test.utils.BitmapPixelTestUtil.maybeSaveTestBitmap; @@ -103,7 +103,7 @@ public final class CropPixelTest { cropShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); // TODO(b/207848601): Switch to using proper tooling for testing against golden data. @@ -124,7 +124,7 @@ public final class CropPixelTest { cropShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); // TODO(b/207848601): Switch to using proper tooling for testing against golden data. @@ -145,7 +145,7 @@ public final class CropPixelTest { cropShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); // TODO(b/207848601): Switch to using proper tooling for testing against golden data. diff --git a/libraries/effect/src/androidTest/java/androidx/media3/effect/DefaultShaderProgramPixelTest.java b/libraries/effect/src/androidTest/java/androidx/media3/effect/DefaultShaderProgramPixelTest.java index 722975bd9f..0feef12e8c 100644 --- a/libraries/effect/src/androidTest/java/androidx/media3/effect/DefaultShaderProgramPixelTest.java +++ b/libraries/effect/src/androidTest/java/androidx/media3/effect/DefaultShaderProgramPixelTest.java @@ -16,7 +16,7 @@ package androidx.media3.effect; import static androidx.media3.test.utils.BitmapPixelTestUtil.MAXIMUM_AVERAGE_PIXEL_ABSOLUTE_DIFFERENCE; -import static androidx.media3.test.utils.BitmapPixelTestUtil.createArgb8888BitmapFromCurrentGlFramebuffer; +import static androidx.media3.test.utils.BitmapPixelTestUtil.createArgb8888BitmapFromFocusedGlFramebuffer; import static androidx.media3.test.utils.BitmapPixelTestUtil.createGlTextureFromBitmap; import static androidx.media3.test.utils.BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceArgb8888; import static androidx.media3.test.utils.BitmapPixelTestUtil.maybeSaveTestBitmap; @@ -107,7 +107,7 @@ public final class DefaultShaderProgramPixelTest { Bitmap expectedBitmap = readBitmap(ORIGINAL_PNG_ASSET_PATH); defaultShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); - Bitmap actualBitmap = createArgb8888BitmapFromCurrentGlFramebuffer(inputWidth, inputHeight); + Bitmap actualBitmap = createArgb8888BitmapFromFocusedGlFramebuffer(inputWidth, inputHeight); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); // TODO(b/207848601): Switch to using proper tooling for testing against golden data. @@ -129,7 +129,7 @@ public final class DefaultShaderProgramPixelTest { Bitmap expectedBitmap = readBitmap(TRANSLATE_RIGHT_PNG_ASSET_PATH); defaultShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); - Bitmap actualBitmap = createArgb8888BitmapFromCurrentGlFramebuffer(inputWidth, inputHeight); + Bitmap actualBitmap = createArgb8888BitmapFromFocusedGlFramebuffer(inputWidth, inputHeight); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); // TODO(b/207848601): Switch to using proper tooling for testing against golden data. @@ -150,7 +150,7 @@ public final class DefaultShaderProgramPixelTest { Bitmap expectedBitmap = readBitmap(SCALE_NARROW_PNG_ASSET_PATH); defaultShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); - Bitmap actualBitmap = createArgb8888BitmapFromCurrentGlFramebuffer(inputWidth, inputHeight); + Bitmap actualBitmap = createArgb8888BitmapFromFocusedGlFramebuffer(inputWidth, inputHeight); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); // TODO(b/207848601): Switch to using proper tooling for testing against golden data. @@ -170,7 +170,7 @@ public final class DefaultShaderProgramPixelTest { Bitmap expectedBitmap = readBitmap(ROTATE_90_PNG_ASSET_PATH); defaultShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); - Bitmap actualBitmap = createArgb8888BitmapFromCurrentGlFramebuffer(inputWidth, inputHeight); + Bitmap actualBitmap = createArgb8888BitmapFromFocusedGlFramebuffer(inputWidth, inputHeight); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); // TODO(b/207848601): Switch to using proper tooling for testing against golden data. diff --git a/libraries/effect/src/androidTest/java/androidx/media3/effect/HslAdjustmentPixelTest.java b/libraries/effect/src/androidTest/java/androidx/media3/effect/HslAdjustmentPixelTest.java index 914813ee6d..48cbbba9e6 100644 --- a/libraries/effect/src/androidTest/java/androidx/media3/effect/HslAdjustmentPixelTest.java +++ b/libraries/effect/src/androidTest/java/androidx/media3/effect/HslAdjustmentPixelTest.java @@ -17,7 +17,7 @@ package androidx.media3.effect; import static androidx.media3.test.utils.BitmapPixelTestUtil.MAXIMUM_AVERAGE_PIXEL_ABSOLUTE_DIFFERENCE; -import static androidx.media3.test.utils.BitmapPixelTestUtil.createArgb8888BitmapFromCurrentGlFramebuffer; +import static androidx.media3.test.utils.BitmapPixelTestUtil.createArgb8888BitmapFromFocusedGlFramebuffer; import static androidx.media3.test.utils.BitmapPixelTestUtil.createArgb8888BitmapWithSolidColor; import static androidx.media3.test.utils.BitmapPixelTestUtil.createGlTextureFromBitmap; import static androidx.media3.test.utils.BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceArgb8888; @@ -117,7 +117,7 @@ public final class HslAdjustmentPixelTest { hslProcessor.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -135,7 +135,7 @@ public final class HslAdjustmentPixelTest { hslProcessor.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -153,7 +153,7 @@ public final class HslAdjustmentPixelTest { hslProcessor.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -171,7 +171,7 @@ public final class HslAdjustmentPixelTest { hslProcessor.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -189,7 +189,7 @@ public final class HslAdjustmentPixelTest { hslProcessor.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -208,7 +208,7 @@ public final class HslAdjustmentPixelTest { hslProcessor.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -226,7 +226,7 @@ public final class HslAdjustmentPixelTest { hslProcessor.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -245,7 +245,7 @@ public final class HslAdjustmentPixelTest { hslProcessor.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -263,7 +263,7 @@ public final class HslAdjustmentPixelTest { hslProcessor.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -281,7 +281,7 @@ public final class HslAdjustmentPixelTest { hslProcessor.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -300,7 +300,7 @@ public final class HslAdjustmentPixelTest { hslProcessor.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -319,7 +319,7 @@ public final class HslAdjustmentPixelTest { hslProcessor.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = diff --git a/libraries/effect/src/androidTest/java/androidx/media3/effect/OverlayShaderProgramPixelTest.java b/libraries/effect/src/androidTest/java/androidx/media3/effect/OverlayShaderProgramPixelTest.java index 43a4a68990..33cbcdea74 100644 --- a/libraries/effect/src/androidTest/java/androidx/media3/effect/OverlayShaderProgramPixelTest.java +++ b/libraries/effect/src/androidTest/java/androidx/media3/effect/OverlayShaderProgramPixelTest.java @@ -17,7 +17,7 @@ package androidx.media3.effect; import static androidx.media3.common.util.Assertions.checkNotNull; import static androidx.media3.test.utils.BitmapPixelTestUtil.MAXIMUM_AVERAGE_PIXEL_ABSOLUTE_DIFFERENCE; -import static androidx.media3.test.utils.BitmapPixelTestUtil.createArgb8888BitmapFromCurrentGlFramebuffer; +import static androidx.media3.test.utils.BitmapPixelTestUtil.createArgb8888BitmapFromFocusedGlFramebuffer; import static androidx.media3.test.utils.BitmapPixelTestUtil.createGlTextureFromBitmap; import static androidx.media3.test.utils.BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceArgb8888; import static androidx.media3.test.utils.BitmapPixelTestUtil.maybeSaveTestBitmap; @@ -120,7 +120,7 @@ public class OverlayShaderProgramPixelTest { overlayShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -142,7 +142,7 @@ public class OverlayShaderProgramPixelTest { overlayShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -187,7 +187,7 @@ public class OverlayShaderProgramPixelTest { overlayShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -214,7 +214,7 @@ public class OverlayShaderProgramPixelTest { overlayShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -238,7 +238,7 @@ public class OverlayShaderProgramPixelTest { overlayShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -267,7 +267,7 @@ public class OverlayShaderProgramPixelTest { overlayShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -294,7 +294,7 @@ public class OverlayShaderProgramPixelTest { overlayShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -326,7 +326,7 @@ public class OverlayShaderProgramPixelTest { overlayShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -360,7 +360,7 @@ public class OverlayShaderProgramPixelTest { overlayShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -397,7 +397,7 @@ public class OverlayShaderProgramPixelTest { overlayShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = diff --git a/libraries/effect/src/androidTest/java/androidx/media3/effect/PresentationPixelTest.java b/libraries/effect/src/androidTest/java/androidx/media3/effect/PresentationPixelTest.java index 55418e8249..7bbdf21ff0 100644 --- a/libraries/effect/src/androidTest/java/androidx/media3/effect/PresentationPixelTest.java +++ b/libraries/effect/src/androidTest/java/androidx/media3/effect/PresentationPixelTest.java @@ -17,7 +17,7 @@ package androidx.media3.effect; import static androidx.media3.common.util.Assertions.checkNotNull; import static androidx.media3.test.utils.BitmapPixelTestUtil.MAXIMUM_AVERAGE_PIXEL_ABSOLUTE_DIFFERENCE; -import static androidx.media3.test.utils.BitmapPixelTestUtil.createArgb8888BitmapFromCurrentGlFramebuffer; +import static androidx.media3.test.utils.BitmapPixelTestUtil.createArgb8888BitmapFromFocusedGlFramebuffer; import static androidx.media3.test.utils.BitmapPixelTestUtil.createGlTextureFromBitmap; import static androidx.media3.test.utils.BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceArgb8888; import static androidx.media3.test.utils.BitmapPixelTestUtil.maybeSaveTestBitmap; @@ -112,7 +112,7 @@ public final class PresentationPixelTest { presentationShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); // TODO(b/207848601): Switch to using proper tooling for testing against golden data. @@ -133,7 +133,7 @@ public final class PresentationPixelTest { presentationShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); // TODO(b/207848601): Switch to using proper tooling for testing against golden data. @@ -154,7 +154,7 @@ public final class PresentationPixelTest { presentationShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); // TODO(b/207848601): Switch to using proper tooling for testing against golden data. @@ -177,7 +177,7 @@ public final class PresentationPixelTest { presentationShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); // TODO(b/207848601): Switch to using proper tooling for testing against golden data. @@ -200,7 +200,7 @@ public final class PresentationPixelTest { presentationShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); // TODO(b/207848601): Switch to using proper tooling for testing against golden data. @@ -221,7 +221,7 @@ public final class PresentationPixelTest { presentationShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); // TODO(b/207848601): Switch to using proper tooling for testing against golden data. @@ -242,7 +242,7 @@ public final class PresentationPixelTest { presentationShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); // TODO(b/207848601): Switch to using proper tooling for testing against golden data. diff --git a/libraries/effect/src/androidTest/java/androidx/media3/effect/RgbAdjustmentPixelTest.java b/libraries/effect/src/androidTest/java/androidx/media3/effect/RgbAdjustmentPixelTest.java index 2bd5a55242..f58e8b325f 100644 --- a/libraries/effect/src/androidTest/java/androidx/media3/effect/RgbAdjustmentPixelTest.java +++ b/libraries/effect/src/androidTest/java/androidx/media3/effect/RgbAdjustmentPixelTest.java @@ -18,7 +18,7 @@ package androidx.media3.effect; import static androidx.media3.common.util.Assertions.checkNotNull; import static androidx.media3.test.utils.BitmapPixelTestUtil.MAXIMUM_AVERAGE_PIXEL_ABSOLUTE_DIFFERENCE; -import static androidx.media3.test.utils.BitmapPixelTestUtil.createArgb8888BitmapFromCurrentGlFramebuffer; +import static androidx.media3.test.utils.BitmapPixelTestUtil.createArgb8888BitmapFromFocusedGlFramebuffer; import static androidx.media3.test.utils.BitmapPixelTestUtil.createArgb8888BitmapWithSolidColor; import static androidx.media3.test.utils.BitmapPixelTestUtil.createGlTextureFromBitmap; import static androidx.media3.test.utils.BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceArgb8888; @@ -116,7 +116,7 @@ public final class RgbAdjustmentPixelTest { defaultShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -137,7 +137,7 @@ public final class RgbAdjustmentPixelTest { defaultShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -155,7 +155,7 @@ public final class RgbAdjustmentPixelTest { defaultShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -173,7 +173,7 @@ public final class RgbAdjustmentPixelTest { defaultShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -192,7 +192,7 @@ public final class RgbAdjustmentPixelTest { defaultShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -219,7 +219,7 @@ public final class RgbAdjustmentPixelTest { defaultShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -243,7 +243,7 @@ public final class RgbAdjustmentPixelTest { defaultShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -269,7 +269,7 @@ public final class RgbAdjustmentPixelTest { defaultShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = diff --git a/libraries/effect/src/androidTest/java/androidx/media3/effect/RgbFilterPixelTest.java b/libraries/effect/src/androidTest/java/androidx/media3/effect/RgbFilterPixelTest.java index a44ddde930..eaa9fdf9a9 100644 --- a/libraries/effect/src/androidTest/java/androidx/media3/effect/RgbFilterPixelTest.java +++ b/libraries/effect/src/androidTest/java/androidx/media3/effect/RgbFilterPixelTest.java @@ -18,7 +18,7 @@ package androidx.media3.effect; import static androidx.media3.common.util.Assertions.checkNotNull; import static androidx.media3.test.utils.BitmapPixelTestUtil.MAXIMUM_AVERAGE_PIXEL_ABSOLUTE_DIFFERENCE; -import static androidx.media3.test.utils.BitmapPixelTestUtil.createArgb8888BitmapFromCurrentGlFramebuffer; +import static androidx.media3.test.utils.BitmapPixelTestUtil.createArgb8888BitmapFromFocusedGlFramebuffer; import static androidx.media3.test.utils.BitmapPixelTestUtil.createGlTextureFromBitmap; import static androidx.media3.test.utils.BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceArgb8888; import static androidx.media3.test.utils.BitmapPixelTestUtil.maybeSaveTestBitmap; @@ -111,7 +111,7 @@ public final class RgbFilterPixelTest { defaultShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -129,7 +129,7 @@ public final class RgbFilterPixelTest { defaultShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, /* bitmapLabel= */ "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = diff --git a/libraries/effect/src/androidTest/java/androidx/media3/effect/SingleColorLutPixelTest.java b/libraries/effect/src/androidTest/java/androidx/media3/effect/SingleColorLutPixelTest.java index 439d2a4616..bdc5d644d6 100644 --- a/libraries/effect/src/androidTest/java/androidx/media3/effect/SingleColorLutPixelTest.java +++ b/libraries/effect/src/androidTest/java/androidx/media3/effect/SingleColorLutPixelTest.java @@ -18,7 +18,7 @@ package androidx.media3.effect; import static androidx.media3.common.util.Assertions.checkNotNull; import static androidx.media3.test.utils.BitmapPixelTestUtil.MAXIMUM_AVERAGE_PIXEL_ABSOLUTE_DIFFERENCE; -import static androidx.media3.test.utils.BitmapPixelTestUtil.createArgb8888BitmapFromCurrentGlFramebuffer; +import static androidx.media3.test.utils.BitmapPixelTestUtil.createArgb8888BitmapFromFocusedGlFramebuffer; import static androidx.media3.test.utils.BitmapPixelTestUtil.createGlTextureFromBitmap; import static androidx.media3.test.utils.BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceArgb8888; import static androidx.media3.test.utils.BitmapPixelTestUtil.maybeSaveTestBitmap; @@ -108,7 +108,7 @@ public class SingleColorLutPixelTest { colorLutShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -129,7 +129,7 @@ public class SingleColorLutPixelTest { colorLutShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -149,7 +149,7 @@ public class SingleColorLutPixelTest { colorLutShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -169,7 +169,7 @@ public class SingleColorLutPixelTest { colorLutShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -189,7 +189,7 @@ public class SingleColorLutPixelTest { colorLutShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -212,7 +212,7 @@ public class SingleColorLutPixelTest { colorLutShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -233,7 +233,7 @@ public class SingleColorLutPixelTest { colorLutShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = @@ -254,7 +254,7 @@ public class SingleColorLutPixelTest { colorLutShaderProgram.drawFrame(inputTexId, /* presentationTimeUs= */ 0); Bitmap actualBitmap = - createArgb8888BitmapFromCurrentGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); + createArgb8888BitmapFromFocusedGlFramebuffer(outputSize.getWidth(), outputSize.getHeight()); maybeSaveTestBitmap(testId, "actual", actualBitmap, /* path= */ null); float averagePixelAbsoluteDifference = diff --git a/libraries/test_utils/src/main/java/androidx/media3/test/utils/BitmapPixelTestUtil.java b/libraries/test_utils/src/main/java/androidx/media3/test/utils/BitmapPixelTestUtil.java index b23e6cd93a..8746b51fa8 100644 --- a/libraries/test_utils/src/main/java/androidx/media3/test/utils/BitmapPixelTestUtil.java +++ b/libraries/test_utils/src/main/java/androidx/media3/test/utils/BitmapPixelTestUtil.java @@ -345,7 +345,7 @@ public class BitmapPixelTestUtil { } /** - * Creates a {@link Bitmap.Config#ARGB_8888} bitmap with the values of the current OpenGL + * Creates a {@link Bitmap.Config#ARGB_8888} bitmap with the values of the focused OpenGL * framebuffer. * *
This method may block until any previously called OpenGL commands are complete. @@ -354,14 +354,14 @@ public class BitmapPixelTestUtil { * @param height The height of the pixel rectangle to read. * @return A {@link Bitmap} with the framebuffer's values. */ - public static Bitmap createArgb8888BitmapFromCurrentGlFramebuffer(int width, int height) + public static Bitmap createArgb8888BitmapFromFocusedGlFramebuffer(int width, int height) throws GlUtil.GlException { - return createBitmapFromCurrentGlFrameBuffer( + return createBitmapFromFocusedGlFrameBuffer( width, height, /* pixelSize= */ 4, GLES20.GL_UNSIGNED_BYTE, Bitmap.Config.ARGB_8888); } /** - * Creates a {@link Bitmap.Config#RGBA_F16} bitmap with the values of the current OpenGL + * Creates a {@link Bitmap.Config#RGBA_F16} bitmap with the values of the focused OpenGL * framebuffer. * *
This method may block until any previously called OpenGL commands are complete. @@ -371,13 +371,13 @@ public class BitmapPixelTestUtil { * @return A {@link Bitmap} with the framebuffer's values. */ @RequiresApi(26) // Bitmap.Config.RGBA_F16 - public static Bitmap createFp16BitmapFromCurrentGlFramebuffer(int width, int height) + public static Bitmap createFp16BitmapFromFocusedGlFramebuffer(int width, int height) throws GlUtil.GlException { - return createBitmapFromCurrentGlFrameBuffer( + return createBitmapFromFocusedGlFrameBuffer( width, height, /* pixelSize= */ 8, GLES30.GL_HALF_FLOAT, Bitmap.Config.RGBA_F16); } - private static Bitmap createBitmapFromCurrentGlFrameBuffer( + private static Bitmap createBitmapFromFocusedGlFrameBuffer( int width, int height, int pixelSize, int glReadPixelsFormat, Bitmap.Config bitmapConfig) throws GlUtil.GlException { ByteBuffer pixelBuffer = ByteBuffer.allocateDirect(width * height * pixelSize); diff --git a/libraries/transformer/src/androidTest/java/androidx/media3/transformer/TextureBitmapReader.java b/libraries/transformer/src/androidTest/java/androidx/media3/transformer/TextureBitmapReader.java index ccd48d02ab..6eed5d3617 100644 --- a/libraries/transformer/src/androidTest/java/androidx/media3/transformer/TextureBitmapReader.java +++ b/libraries/transformer/src/androidTest/java/androidx/media3/transformer/TextureBitmapReader.java @@ -95,9 +95,9 @@ public final class TextureBitmapReader implements VideoFrameProcessorTestRunner. private static Bitmap createBitmapFromCurrentGlFrameBuffer( int width, int height, boolean useHighPrecisionColorComponents) throws GlUtil.GlException { if (!useHighPrecisionColorComponents) { - return BitmapPixelTestUtil.createArgb8888BitmapFromCurrentGlFramebuffer(width, height); + return BitmapPixelTestUtil.createArgb8888BitmapFromFocusedGlFramebuffer(width, height); } checkState(Util.SDK_INT > 26, "useHighPrecisionColorComponents only supported on API 26+"); - return BitmapPixelTestUtil.createFp16BitmapFromCurrentGlFramebuffer(width, height); + return BitmapPixelTestUtil.createFp16BitmapFromFocusedGlFramebuffer(width, height); } } diff --git a/libraries/transformer/src/androidTest/java/androidx/media3/transformer/VideoCompositorPixelTest.java b/libraries/transformer/src/androidTest/java/androidx/media3/transformer/VideoCompositorPixelTest.java index 4e70740482..faa292c452 100644 --- a/libraries/transformer/src/androidTest/java/androidx/media3/transformer/VideoCompositorPixelTest.java +++ b/libraries/transformer/src/androidTest/java/androidx/media3/transformer/VideoCompositorPixelTest.java @@ -127,7 +127,7 @@ public final class VideoCompositorPixelTest { GlUtil.awaitSyncObject(syncObject); } compositedOutputBitmap.set( - BitmapPixelTestUtil.createArgb8888BitmapFromCurrentGlFramebuffer( + BitmapPixelTestUtil.createArgb8888BitmapFromFocusedGlFramebuffer( outputTexture.width, outputTexture.height)); } catch (GlUtil.GlException e) { throw VideoFrameProcessingException.from(e);