Decompose transform matrix in native (for android).

Summary:
This diff translates implementation of transform matrix decomposition from JS to java. This is to support offloading animations of transform property, in which case it is required that we can calculate decomposed transform in the UI thread.

Since the matrix decomposition code is not being used for other platform I went ahead and deleted parts that are no longer being used.

**Test plan**
Run UIExplorer Transform example before and after - compare the results
Closes https://github.com/facebook/react-native/pull/7916

Reviewed By: ritzau

Differential Revision: D3398393

Pulled By: astreet

fbshipit-source-id: 9881c3f565e2050e415849b0f76a0cefe11c6afb
This commit is contained in:
Krzysztof Magiera
2016-06-21 11:24:31 -07:00
committed by Facebook Github Bot 8
parent d1690a8f9e
commit a59afb98d5
5 changed files with 534 additions and 43 deletions

View File

@@ -81,13 +81,6 @@ function processTransform(transform: Object): Object {
}
});
// Android does not support the direct application of a transform matrix to
// a view, so we need to decompose the result matrix into transforms that can
// get applied in the specific order of (1) translate (2) scale (3) rotate.
// Once we can directly apply a matrix, we can remove this decomposition.
if (Platform.OS === 'android') {
return MatrixMath.decomposeMatrix(result);
}
return result;
}