Commit e14b8b0c by hschlueter Committed by Ian Baker

Remove unnecessary 'final' from local variables.

PiperOrigin-RevId: 436469107
parent ecfbc65a
...@@ -90,7 +90,7 @@ public final class AdvancedFrameProcessorPixelTest { ...@@ -90,7 +90,7 @@ public final class AdvancedFrameProcessorPixelTest {
@Test @Test
public void updateProgramAndDraw_noEdits_producesExpectedOutput() throws Exception { public void updateProgramAndDraw_noEdits_producesExpectedOutput() throws Exception {
final String testId = "updateProgramAndDraw_noEdits"; String testId = "updateProgramAndDraw_noEdits";
Matrix identityMatrix = new Matrix(); Matrix identityMatrix = new Matrix();
advancedFrameProcessor = new AdvancedFrameProcessor(getApplicationContext(), identityMatrix); advancedFrameProcessor = new AdvancedFrameProcessor(getApplicationContext(), identityMatrix);
advancedFrameProcessor.initialize(inputTexId); advancedFrameProcessor.initialize(inputTexId);
...@@ -111,7 +111,7 @@ public final class AdvancedFrameProcessorPixelTest { ...@@ -111,7 +111,7 @@ public final class AdvancedFrameProcessorPixelTest {
@Test @Test
public void updateProgramAndDraw_translateRight_producesExpectedOutput() throws Exception { public void updateProgramAndDraw_translateRight_producesExpectedOutput() throws Exception {
final String testId = "updateProgramAndDraw_translateRight"; String testId = "updateProgramAndDraw_translateRight";
Matrix translateRightMatrix = new Matrix(); Matrix translateRightMatrix = new Matrix();
translateRightMatrix.postTranslate(/* dx= */ 1, /* dy= */ 0); translateRightMatrix.postTranslate(/* dx= */ 1, /* dy= */ 0);
advancedFrameProcessor = advancedFrameProcessor =
...@@ -135,7 +135,7 @@ public final class AdvancedFrameProcessorPixelTest { ...@@ -135,7 +135,7 @@ public final class AdvancedFrameProcessorPixelTest {
@Test @Test
public void updateProgramAndDraw_scaleNarrow_producesExpectedOutput() throws Exception { public void updateProgramAndDraw_scaleNarrow_producesExpectedOutput() throws Exception {
final String testId = "updateProgramAndDraw_scaleNarrow"; String testId = "updateProgramAndDraw_scaleNarrow";
Matrix scaleNarrowMatrix = new Matrix(); Matrix scaleNarrowMatrix = new Matrix();
scaleNarrowMatrix.postScale(.5f, 1.2f); scaleNarrowMatrix.postScale(.5f, 1.2f);
advancedFrameProcessor = new AdvancedFrameProcessor(getApplicationContext(), scaleNarrowMatrix); advancedFrameProcessor = new AdvancedFrameProcessor(getApplicationContext(), scaleNarrowMatrix);
...@@ -158,7 +158,7 @@ public final class AdvancedFrameProcessorPixelTest { ...@@ -158,7 +158,7 @@ public final class AdvancedFrameProcessorPixelTest {
@Test @Test
public void updateProgramAndDraw_rotate90_producesExpectedOutput() throws Exception { public void updateProgramAndDraw_rotate90_producesExpectedOutput() throws Exception {
final String testId = "updateProgramAndDraw_rotate90"; String testId = "updateProgramAndDraw_rotate90";
Matrix rotate90Matrix = new Matrix(); Matrix rotate90Matrix = new Matrix();
rotate90Matrix.postRotate(/* degrees= */ 90); rotate90Matrix.postRotate(/* degrees= */ 90);
advancedFrameProcessor = new AdvancedFrameProcessor(getApplicationContext(), rotate90Matrix); advancedFrameProcessor = new AdvancedFrameProcessor(getApplicationContext(), rotate90Matrix);
......
...@@ -85,7 +85,7 @@ public final class FrameProcessorChainPixelTest { ...@@ -85,7 +85,7 @@ public final class FrameProcessorChainPixelTest {
@Test @Test
public void processData_noEdits_producesExpectedOutput() throws Exception { public void processData_noEdits_producesExpectedOutput() throws Exception {
final String testId = "processData_noEdits"; String testId = "processData_noEdits";
setUpAndPrepareFirstFrame(); setUpAndPrepareFirstFrame();
Bitmap expectedBitmap = BitmapTestUtil.readBitmap(FIRST_FRAME_PNG_ASSET_STRING); Bitmap expectedBitmap = BitmapTestUtil.readBitmap(FIRST_FRAME_PNG_ASSET_STRING);
...@@ -103,7 +103,7 @@ public final class FrameProcessorChainPixelTest { ...@@ -103,7 +103,7 @@ public final class FrameProcessorChainPixelTest {
@Test @Test
public void processData_withAdvancedFrameProcessor_translateRight_producesExpectedOutput() public void processData_withAdvancedFrameProcessor_translateRight_producesExpectedOutput()
throws Exception { throws Exception {
final String testId = "processData_withAdvancedFrameProcessor_translateRight"; String testId = "processData_withAdvancedFrameProcessor_translateRight";
Matrix translateRightMatrix = new Matrix(); Matrix translateRightMatrix = new Matrix();
translateRightMatrix.postTranslate(/* dx= */ 1, /* dy= */ 0); translateRightMatrix.postTranslate(/* dx= */ 1, /* dy= */ 0);
GlFrameProcessor glFrameProcessor = GlFrameProcessor glFrameProcessor =
...@@ -126,7 +126,7 @@ public final class FrameProcessorChainPixelTest { ...@@ -126,7 +126,7 @@ public final class FrameProcessorChainPixelTest {
@Test @Test
public void processData_withAdvancedAndScaleToFitFrameProcessors_producesExpectedOutput() public void processData_withAdvancedAndScaleToFitFrameProcessors_producesExpectedOutput()
throws Exception { throws Exception {
final String testId = "processData_withAdvancedAndScaleToFitFrameProcessors"; String testId = "processData_withAdvancedAndScaleToFitFrameProcessors";
Matrix translateRightMatrix = new Matrix(); Matrix translateRightMatrix = new Matrix();
translateRightMatrix.postTranslate(/* dx= */ 1, /* dy= */ 0); translateRightMatrix.postTranslate(/* dx= */ 1, /* dy= */ 0);
GlFrameProcessor translateRightFrameProcessor = GlFrameProcessor translateRightFrameProcessor =
...@@ -153,7 +153,7 @@ public final class FrameProcessorChainPixelTest { ...@@ -153,7 +153,7 @@ public final class FrameProcessorChainPixelTest {
@Test @Test
public void processData_withScaleToFitAndAdvancedFrameProcessors_producesExpectedOutput() public void processData_withScaleToFitAndAdvancedFrameProcessors_producesExpectedOutput()
throws Exception { throws Exception {
final String testId = "processData_withScaleToFitAndAdvancedFrameProcessors"; String testId = "processData_withScaleToFitAndAdvancedFrameProcessors";
GlFrameProcessor rotate45FrameProcessor = GlFrameProcessor rotate45FrameProcessor =
new ScaleToFitFrameProcessor.Builder(getApplicationContext()) new ScaleToFitFrameProcessor.Builder(getApplicationContext())
.setRotationDegrees(45) .setRotationDegrees(45)
...@@ -180,7 +180,7 @@ public final class FrameProcessorChainPixelTest { ...@@ -180,7 +180,7 @@ public final class FrameProcessorChainPixelTest {
@Test @Test
public void processData_withScaleToFitFrameProcessor_requestOutputHeight_producesExpectedOutput() public void processData_withScaleToFitFrameProcessor_requestOutputHeight_producesExpectedOutput()
throws Exception { throws Exception {
final String testId = "processData_withScaleToFitFrameProcessor_requestOutputHeight"; String testId = "processData_withScaleToFitFrameProcessor_requestOutputHeight";
// TODO(b/213190310): After creating a Presentation class, move VideoSamplePipeline // TODO(b/213190310): After creating a Presentation class, move VideoSamplePipeline
// resolution-based adjustments (ex. in cl/419619743) to that Presentation class, so we can // resolution-based adjustments (ex. in cl/419619743) to that Presentation class, so we can
// test that rotation doesn't distort the image. // test that rotation doesn't distort the image.
...@@ -204,7 +204,7 @@ public final class FrameProcessorChainPixelTest { ...@@ -204,7 +204,7 @@ public final class FrameProcessorChainPixelTest {
@Test @Test
public void processData_withScaleToFitFrameProcessor_rotate45_producesExpectedOutput() public void processData_withScaleToFitFrameProcessor_rotate45_producesExpectedOutput()
throws Exception { throws Exception {
final String testId = "processData_withScaleToFitFrameProcessor_rotate45"; String testId = "processData_withScaleToFitFrameProcessor_rotate45";
// TODO(b/213190310): After creating a Presentation class, move VideoSamplePipeline // TODO(b/213190310): After creating a Presentation class, move VideoSamplePipeline
// resolution-based adjustments (ex. in cl/419619743) to that Presentation class, so we can // resolution-based adjustments (ex. in cl/419619743) to that Presentation class, so we can
// test that rotation doesn't distort the image. // test that rotation doesn't distort the image.
......
...@@ -46,8 +46,7 @@ public class TransformationTest { ...@@ -46,8 +46,7 @@ public class TransformationTest {
@Test @Test
public void transform() throws Exception { public void transform() throws Exception {
final String testId = TAG + "_transform"; String testId = TAG + "_transform";
Context context = ApplicationProvider.getApplicationContext(); Context context = ApplicationProvider.getApplicationContext();
Transformer transformer = new Transformer.Builder(context).build(); Transformer transformer = new Transformer.Builder(context).build();
// TODO(b/223381524): Remove analysis failure suppression after ssim calculation doesn't fail. // TODO(b/223381524): Remove analysis failure suppression after ssim calculation doesn't fail.
...@@ -60,8 +59,7 @@ public class TransformationTest { ...@@ -60,8 +59,7 @@ public class TransformationTest {
@Test @Test
public void transformWithDecodeEncode() throws Exception { public void transformWithDecodeEncode() throws Exception {
final String testId = TAG + "_transformForceCodecUse"; String testId = TAG + "_transformForceCodecUse";
Context context = ApplicationProvider.getApplicationContext(); Context context = ApplicationProvider.getApplicationContext();
Transformer transformer = Transformer transformer =
new Transformer.Builder(context) new Transformer.Builder(context)
...@@ -102,7 +100,7 @@ public class TransformationTest { ...@@ -102,7 +100,7 @@ public class TransformationTest {
@Test @Test
public void transformToSpecificBitrate() throws Exception { public void transformToSpecificBitrate() throws Exception {
final String testId = TAG + "_transformWithSpecificBitrate"; String testId = TAG + "_transformWithSpecificBitrate";
Context context = ApplicationProvider.getApplicationContext(); Context context = ApplicationProvider.getApplicationContext();
Transformer transformer = Transformer transformer =
new Transformer.Builder(context) new Transformer.Builder(context)
...@@ -123,8 +121,7 @@ public class TransformationTest { ...@@ -123,8 +121,7 @@ public class TransformationTest {
@Test @Test
public void transform4K60() throws Exception { public void transform4K60() throws Exception {
final String testId = TAG + "_transform4K60"; String testId = TAG + "_transform4K60";
Context context = ApplicationProvider.getApplicationContext(); Context context = ApplicationProvider.getApplicationContext();
Transformer transformer = new Transformer.Builder(context).build(); Transformer transformer = new Transformer.Builder(context).build();
// TODO(b/223381524): Remove analysis failure suppression after ssim calculation doesn't fail. // TODO(b/223381524): Remove analysis failure suppression after ssim calculation doesn't fail.
...@@ -137,8 +134,7 @@ public class TransformationTest { ...@@ -137,8 +134,7 @@ public class TransformationTest {
@Test @Test
public void transformNoAudio() throws Exception { public void transformNoAudio() throws Exception {
final String testId = TAG + "_transformNoAudio"; String testId = TAG + "_transformNoAudio";
Context context = ApplicationProvider.getApplicationContext(); Context context = ApplicationProvider.getApplicationContext();
Transformer transformer = new Transformer.Builder(context).setRemoveAudio(true).build(); Transformer transformer = new Transformer.Builder(context).setRemoveAudio(true).build();
// TODO(b/223381524): Remove analysis failure suppression after ssim calculation doesn't fail. // TODO(b/223381524): Remove analysis failure suppression after ssim calculation doesn't fail.
...@@ -151,8 +147,7 @@ public class TransformationTest { ...@@ -151,8 +147,7 @@ public class TransformationTest {
@Test @Test
public void transformNoVideo() throws Exception { public void transformNoVideo() throws Exception {
final String testId = TAG + "_transformNoVideo"; String testId = TAG + "_transformNoVideo";
Context context = ApplicationProvider.getApplicationContext(); Context context = ApplicationProvider.getApplicationContext();
Transformer transformer = new Transformer.Builder(context).setRemoveVideo(true).build(); Transformer transformer = new Transformer.Builder(context).setRemoveVideo(true).build();
new TransformerAndroidTestRunner.Builder(context, transformer) new TransformerAndroidTestRunner.Builder(context, transformer)
...@@ -162,7 +157,7 @@ public class TransformationTest { ...@@ -162,7 +157,7 @@ public class TransformationTest {
@Test @Test
public void transformSef() throws Exception { public void transformSef() throws Exception {
final String testId = TAG + "_transformSef"; String testId = TAG + "_transformSef";
if (Util.SDK_INT < 25) { if (Util.SDK_INT < 25) {
// TODO(b/210593256): Remove test skipping after removing the MediaMuxer dependency. // TODO(b/210593256): Remove test skipping after removing the MediaMuxer dependency.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment