Android: Deprecated custom matrix helper functions in RendererCommon

All usage of these functions should be migrated to use
android.opengl.Matrix instead.

Bug: webrtc:9487
Change-Id: I023761b31cae7e7af9b537928b849657baa5bb8b
Reviewed-on: https://webrtc-review.googlesource.com/87263
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23853}
This commit is contained in:
Magnus Jedvert
2018-07-05 13:36:10 +02:00
committed by Commit Bot
parent d97b862593
commit b4918dad6a
3 changed files with 18 additions and 54 deletions

View File

@ -119,6 +119,7 @@ public class RendererCommon {
// This limits excessive cropping when adjusting display size.
private static float BALANCED_VISIBLE_FRACTION = 0.5625f;
// clang-format off
@Deprecated
public static final float[] identityMatrix() {
return new float[] {
1, 0, 0, 0,
@ -127,6 +128,7 @@ public class RendererCommon {
0, 0, 0, 1};
}
// Matrix with transform y' = 1 - y.
@Deprecated
public static final float[] verticalFlipMatrix() {
return new float[] {
1, 0, 0, 0,
@ -136,6 +138,7 @@ public class RendererCommon {
}
// Matrix with transform x' = 1 - x.
@Deprecated
public static final float[] horizontalFlipMatrix() {
return new float[] {
-1, 0, 0, 0,
@ -149,6 +152,7 @@ public class RendererCommon {
* Returns texture matrix that will have the effect of rotating the frame |rotationDegree|
* clockwise when rendered.
*/
@Deprecated
public static float[] rotateTextureMatrix(float[] textureMatrix, float rotationDegree) {
final float[] rotationMatrix = new float[16];
Matrix.setRotateM(rotationMatrix, 0, rotationDegree, 0, 0, 1);
@ -159,6 +163,7 @@ public class RendererCommon {
/**
* Returns new matrix with the result of a * b.
*/
@Deprecated
public static float[] multiplyMatrices(float[] a, float[] b) {
final float[] resultMatrix = new float[16];
Matrix.multiplyMM(resultMatrix, 0, a, 0, b, 0);