Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Unified Diff: webrtc/api/android/java/src/org/webrtc/RendererCommon.java

Issue 2377003002: Format all Java in WebRTC. (Closed)
Patch Set: Manual changes. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/api/android/java/src/org/webrtc/RendererCommon.java
diff --git a/webrtc/api/android/java/src/org/webrtc/RendererCommon.java b/webrtc/api/android/java/src/org/webrtc/RendererCommon.java
index 55547eb2087475bb819dacf929b5d51dc4397595..56fea726f82b6c696d84efcf4fea7f3440078536 100644
--- a/webrtc/api/android/java/src/org/webrtc/RendererCommon.java
+++ b/webrtc/api/android/java/src/org/webrtc/RendererCommon.java
@@ -42,8 +42,8 @@ public class RendererCommon {
*/
void drawOes(int oesTextureId, float[] texMatrix, int frameWidth, int frameHeight,
int viewportX, int viewportY, int viewportWidth, int viewportHeight);
- void drawRgb(int textureId, float[] texMatrix, int frameWidth, int frameHeight,
- int viewportX, int viewportY, int viewportWidth, int viewportHeight);
+ void drawRgb(int textureId, float[] texMatrix, int frameWidth, int frameHeight, int viewportX,
+ int viewportY, int viewportWidth, int viewportHeight);
void drawYuv(int[] yuvTextures, float[] texMatrix, int frameWidth, int frameHeight,
int viewportX, int viewportY, int viewportWidth, int viewportHeight);
@@ -117,28 +117,16 @@ public class RendererCommon {
// This limits excessive cropping when adjusting display size.
private static float BALANCED_VISIBLE_FRACTION = 0.5625f;
public static final float[] identityMatrix() {
- return new float[] {
- 1, 0, 0, 0,
- 0, 1, 0, 0,
- 0, 0, 1, 0,
- 0, 0, 0, 1};
+ return new float[] {1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1};
magjed_webrtc 2016/09/28 13:45:04 Revert these changes.
}
// Matrix with transform y' = 1 - y.
public static final float[] verticalFlipMatrix() {
- return new float[] {
- 1, 0, 0, 0,
- 0, -1, 0, 0,
- 0, 0, 1, 0,
- 0, 1, 0, 1};
+ return new float[] {1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1};
}
// Matrix with transform x' = 1 - x.
public static final float[] horizontalFlipMatrix() {
- return new float[] {
- -1, 0, 0, 0,
- 0, 1, 0, 0,
- 0, 0, 1, 0,
- 1, 0, 0, 1};
+ return new float[] {-1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1};
}
/**
@@ -189,8 +177,8 @@ public class RendererCommon {
/**
* Calculate display size based on scaling type, video aspect ratio, and maximum display size.
*/
- public static Point getDisplaySize(ScalingType scalingType, float videoAspectRatio,
- int maxDisplayWidth, int maxDisplayHeight) {
+ public static Point getDisplaySize(
+ ScalingType scalingType, float videoAspectRatio, int maxDisplayWidth, int maxDisplayHeight) {
return getDisplaySize(convertScalingTypeToVisibleFraction(scalingType), videoAspectRatio,
maxDisplayWidth, maxDisplayHeight);
}
@@ -230,17 +218,17 @@ public class RendererCommon {
* Calculate display size based on minimum fraction of the video that must remain visible,
* video aspect ratio, and maximum display size.
*/
- private static Point getDisplaySize(float minVisibleFraction, float videoAspectRatio,
- int maxDisplayWidth, int maxDisplayHeight) {
+ private static Point getDisplaySize(
+ float minVisibleFraction, float videoAspectRatio, int maxDisplayWidth, int maxDisplayHeight) {
// If there is no constraint on the amount of cropping, fill the allowed display area.
if (minVisibleFraction == 0 || videoAspectRatio == 0) {
return new Point(maxDisplayWidth, maxDisplayHeight);
}
// Each dimension is constrained on max display size and how much we are allowed to crop.
- final int width = Math.min(maxDisplayWidth,
- Math.round(maxDisplayHeight / minVisibleFraction * videoAspectRatio));
- final int height = Math.min(maxDisplayHeight,
- Math.round(maxDisplayWidth / minVisibleFraction / videoAspectRatio));
+ final int width = Math.min(
+ maxDisplayWidth, Math.round(maxDisplayHeight / minVisibleFraction * videoAspectRatio));
+ final int height = Math.min(
+ maxDisplayHeight, Math.round(maxDisplayWidth / minVisibleFraction / videoAspectRatio));
return new Point(width, height);
}
}

Powered by Google App Engine
This is Rietveld 408576698