Commit 27e71d2f by huangdarwin Committed by Rohit Singh

Transformer: Simplify EncoderWrapper rotationDegrees logic.

Small refactoring change to simplify the logic a tiny bit by removing one
unnecessary variable. No functional change intended.

PiperOrigin-RevId: 501566533
parent 8ccb8b64
......@@ -425,8 +425,7 @@ import org.checkerframework.dataflow.qual.Pure;
// frame before encoding, so the encoded frame's width >= height, and sets
// rotationDegrees in the output Format to ensure the frame is displayed in the correct
// orientation.
boolean flipOrientation = requestedWidth < requestedHeight;
if (flipOrientation) {
if (requestedWidth < requestedHeight) {
int temp = requestedWidth;
requestedWidth = requestedHeight;
requestedHeight = temp;
......@@ -477,7 +476,7 @@ import org.checkerframework.dataflow.qual.Pure;
fallbackListener.onTransformationRequestFinalized(
createSupportedTransformationRequest(
transformationRequest,
/* hasOutputFormatRotation= */ flipOrientation,
/* hasOutputFormatRotation= */ outputRotationDegrees != 0,
requestedEncoderFormat,
encoderSupportedFormat,
supportedFallbackHdrMode));
......
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