diff options
-rw-r--r-- | include/ui/ColorSpace.h | 8 | ||||
-rw-r--r-- | libs/math/Android.bp | 21 | ||||
-rw-r--r-- | libs/math/MODULE_LICENSE_APACHE2 | 0 | ||||
-rw-r--r-- | libs/math/NOTICE | 190 | ||||
-rw-r--r-- | libs/math/include/math/TMatHelpers.h (renamed from include/ui/TMatHelpers.h) | 9 | ||||
-rw-r--r-- | libs/math/include/math/TQuatHelpers.h (renamed from include/ui/TQuatHelpers.h) | 8 | ||||
-rw-r--r-- | libs/math/include/math/TVecHelpers.h (renamed from include/ui/TVecHelpers.h) | 6 | ||||
-rw-r--r-- | libs/math/include/math/half.h (renamed from include/ui/half.h) | 5 | ||||
-rw-r--r-- | libs/math/include/math/mat2.h (renamed from include/ui/mat2.h) | 9 | ||||
-rw-r--r-- | libs/math/include/math/mat3.h (renamed from include/ui/mat3.h) | 11 | ||||
-rw-r--r-- | libs/math/include/math/mat4.h (renamed from include/ui/mat4.h) | 15 | ||||
-rw-r--r-- | libs/math/include/math/quat.h (renamed from include/ui/quat.h) | 13 | ||||
-rw-r--r-- | libs/math/include/math/scalar.h (renamed from include/ui/scalar.h) | 5 | ||||
-rw-r--r-- | libs/math/include/math/vec2.h (renamed from include/ui/vec2.h) | 9 | ||||
-rw-r--r-- | libs/math/include/math/vec3.h (renamed from include/ui/vec3.h) | 9 | ||||
-rw-r--r-- | libs/math/include/math/vec4.h (renamed from include/ui/vec4.h) | 9 | ||||
-rw-r--r-- | libs/math/tests/Android.bp | 39 | ||||
-rw-r--r-- | libs/math/tests/half_test.cpp (renamed from libs/ui/tests/half_test.cpp) | 4 | ||||
-rw-r--r-- | libs/math/tests/mat_test.cpp (renamed from libs/ui/tests/mat_test.cpp) | 4 | ||||
-rw-r--r-- | libs/math/tests/quat_test.cpp (renamed from libs/ui/tests/quat_test.cpp) | 8 | ||||
-rw-r--r-- | libs/math/tests/vec_test.cpp (renamed from libs/ui/tests/vec_test.cpp) | 2 | ||||
-rw-r--r-- | libs/ui/Android.bp | 6 | ||||
-rw-r--r-- | libs/ui/tests/Android.bp | 20 | ||||
-rw-r--r-- | services/surfaceflinger/DisplayHardware/HWC2.h | 2 | ||||
-rw-r--r-- | services/surfaceflinger/Effects/Daltonizer.cpp | 2 | ||||
-rw-r--r-- | services/surfaceflinger/Effects/Daltonizer.h | 2 | ||||
-rw-r--r-- | services/surfaceflinger/RenderEngine/RenderEngine.h | 2 | ||||
-rw-r--r-- | services/surfaceflinger/RenderEngine/Texture.h | 2 | ||||
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger.h | 2 | ||||
-rw-r--r-- | services/surfaceflinger/Transform.h | 4 |
30 files changed, 311 insertions, 115 deletions
diff --git a/include/ui/ColorSpace.h b/include/ui/ColorSpace.h index e9260b5e23..8c4acb79c6 100644 --- a/include/ui/ColorSpace.h +++ b/include/ui/ColorSpace.h @@ -23,10 +23,10 @@ #include <memory> #include <string> -#include <ui/mat3.h> -#include <ui/scalar.h> -#include <ui/vec2.h> -#include <ui/vec3.h> +#include <math/mat3.h> +#include <math/scalar.h> +#include <math/vec2.h> +#include <math/vec3.h> namespace android { diff --git a/libs/math/Android.bp b/libs/math/Android.bp new file mode 100644 index 0000000000..3ef8b4aa05 --- /dev/null +++ b/libs/math/Android.bp @@ -0,0 +1,21 @@ +// Copyright (C) 2017 The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +cc_library_static { + name: "libmath", + host_supported: true, + export_include_dirs: ["include"], +} + +subdirs = ["tests"] diff --git a/libs/math/MODULE_LICENSE_APACHE2 b/libs/math/MODULE_LICENSE_APACHE2 new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/libs/math/MODULE_LICENSE_APACHE2 diff --git a/libs/math/NOTICE b/libs/math/NOTICE new file mode 100644 index 0000000000..c5b1efa7aa --- /dev/null +++ b/libs/math/NOTICE @@ -0,0 +1,190 @@ + + Copyright (c) 2005-2008, The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + diff --git a/include/ui/TMatHelpers.h b/libs/math/include/math/TMatHelpers.h index 8edf5f82e3..478e702b62 100644 --- a/include/ui/TMatHelpers.h +++ b/libs/math/include/math/TMatHelpers.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef UI_TMATHELPERS_H_ -#define UI_TMATHELPERS_H_ +#pragma once #include <math.h> #include <stdint.h> @@ -26,8 +25,8 @@ #include <iomanip> #include <stdexcept> -#include <ui/quat.h> -#include <ui/TVecHelpers.h> +#include <math/quat.h> +#include <math/TVecHelpers.h> #include <utils/String8.h> @@ -636,5 +635,3 @@ public: #undef UNLIKELY #undef PURE #undef CONSTEXPR - -#endif // UI_TMATHELPERS_H_ diff --git a/include/ui/TQuatHelpers.h b/libs/math/include/math/TQuatHelpers.h index 2f0f70fb60..f0a71aebcd 100644 --- a/include/ui/TQuatHelpers.h +++ b/libs/math/include/math/TQuatHelpers.h @@ -15,8 +15,7 @@ */ -#ifndef UI_TQUATHELPERS_H_ -#define UI_TQUATHELPERS_H_ +#pragma once #include <math.h> #include <stdint.h> @@ -24,7 +23,7 @@ #include <iostream> -#include <ui/vec3.h> +#include <math/vec3.h> #define PURE __attribute__((pure)) @@ -299,6 +298,3 @@ public: // ------------------------------------------------------------------------------------- } // namespace details } // namespace android - - -#endif // UI_TQUATHELPERS_H_ diff --git a/include/ui/TVecHelpers.h b/libs/math/include/math/TVecHelpers.h index 1884608fa2..20f852fd9f 100644 --- a/include/ui/TVecHelpers.h +++ b/libs/math/include/math/TVecHelpers.h @@ -15,8 +15,7 @@ */ -#ifndef UI_TVECHELPERS_H_ -#define UI_TVECHELPERS_H_ +#pragma once #include <math.h> #include <stdint.h> @@ -607,6 +606,3 @@ public: // ------------------------------------------------------------------------------------- } // namespace details } // namespace android - - -#endif // UI_TVECHELPERS_H_ diff --git a/include/ui/half.h b/libs/math/include/math/half.h index 7a271dc57b..3ca8bd1873 100644 --- a/include/ui/half.h +++ b/libs/math/include/math/half.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef UI_HALF_H -#define UI_HALF_H +#pragma once #include <stdint.h> #include <iosfwd> @@ -204,5 +203,3 @@ public: #undef LIKELY #undef UNLIKELY #undef CONSTEXPR - -#endif // UI_HALF_H diff --git a/include/ui/mat2.h b/libs/math/include/math/mat2.h index 37c7221b14..3e6cd4c794 100644 --- a/include/ui/mat2.h +++ b/libs/math/include/math/mat2.h @@ -14,11 +14,10 @@ * limitations under the License. */ -#ifndef UI_MAT2_H_ -#define UI_MAT2_H_ +#pragma once -#include <ui/TMatHelpers.h> -#include <ui/vec2.h> +#include <math/TMatHelpers.h> +#include <math/vec2.h> #include <stdint.h> #include <sys/types.h> @@ -376,5 +375,3 @@ typedef details::TMat22<float> mat2f; #undef PURE #undef CONSTEXPR - -#endif // UI_MAT2_H_ diff --git a/include/ui/mat3.h b/libs/math/include/math/mat3.h index 4f5dba9c3e..5c8a9b2573 100644 --- a/include/ui/mat3.h +++ b/libs/math/include/math/mat3.h @@ -14,12 +14,11 @@ * limitations under the License. */ -#ifndef UI_MAT3_H_ -#define UI_MAT3_H_ +#pragma once -#include <ui/quat.h> -#include <ui/TMatHelpers.h> -#include <ui/vec3.h> +#include <math/quat.h> +#include <math/TMatHelpers.h> +#include <math/vec3.h> #include <stdint.h> #include <sys/types.h> @@ -439,5 +438,3 @@ typedef details::TMat33<float> mat3f; #undef PURE #undef CONSTEXPR - -#endif // UI_MAT3_H_ diff --git a/include/ui/mat4.h b/libs/math/include/math/mat4.h index f63d40aa6a..6119ba7f68 100644 --- a/include/ui/mat4.h +++ b/libs/math/include/math/mat4.h @@ -14,14 +14,13 @@ * limitations under the License. */ -#ifndef UI_MAT4_H_ -#define UI_MAT4_H_ +#pragma once -#include <ui/mat3.h> -#include <ui/quat.h> -#include <ui/TMatHelpers.h> -#include <ui/vec3.h> -#include <ui/vec4.h> +#include <math/mat3.h> +#include <math/quat.h> +#include <math/TMatHelpers.h> +#include <math/vec3.h> +#include <math/vec4.h> #include <stdint.h> #include <sys/types.h> @@ -585,5 +584,3 @@ typedef details::TMat44<float> mat4f; #undef PURE #undef CONSTEXPR - -#endif // UI_MAT4_H_ diff --git a/include/ui/quat.h b/libs/math/include/math/quat.h index 5b8cd8b9fe..1936a2baec 100644 --- a/include/ui/quat.h +++ b/libs/math/include/math/quat.h @@ -14,13 +14,12 @@ * limitations under the License. */ -#ifndef UI_QUAT_H_ -#define UI_QUAT_H_ +#pragma once -#include <ui/half.h> -#include <ui/TQuatHelpers.h> -#include <ui/vec3.h> -#include <ui/vec4.h> +#include <math/half.h> +#include <math/TQuatHelpers.h> +#include <math/vec3.h> +#include <math/vec4.h> #include <stdint.h> #include <sys/types.h> @@ -191,5 +190,3 @@ constexpr inline quatd operator"" _kd(unsigned long long v) { // NOLINT #pragma clang diagnostic pop #undef PURE - -#endif // UI_QUAT_H_ diff --git a/include/ui/scalar.h b/libs/math/include/math/scalar.h index 5f8329e091..2eced92e76 100644 --- a/include/ui/scalar.h +++ b/libs/math/include/math/scalar.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef UI_SCALAR_H -#define UI_SCALAR_H +#pragma once #include <algorithm> #include <cmath> @@ -43,5 +42,3 @@ static constexpr T lerp(T x, T y, T a) noexcept { } } // namespace std - -#endif // UI_SCALAR_H diff --git a/include/ui/vec2.h b/libs/math/include/math/vec2.h index 308d2b802a..a34763347c 100644 --- a/include/ui/vec2.h +++ b/libs/math/include/math/vec2.h @@ -14,11 +14,10 @@ * limitations under the License. */ -#ifndef UI_VEC2_H_ -#define UI_VEC2_H_ +#pragma once -#include <ui/TVecHelpers.h> -#include <ui/half.h> +#include <math/TVecHelpers.h> +#include <math/half.h> #include <assert.h> #include <stdint.h> #include <sys/types.h> @@ -124,5 +123,3 @@ typedef details::TVec2<bool> bool2; } // namespace android #pragma clang diagnostic pop - -#endif // UI_VEC2_H_ diff --git a/include/ui/vec3.h b/libs/math/include/math/vec3.h index e3a6d14807..009fd84e3b 100644 --- a/include/ui/vec3.h +++ b/libs/math/include/math/vec3.h @@ -14,11 +14,10 @@ * limitations under the License. */ -#ifndef UI_VEC3_H_ -#define UI_VEC3_H_ +#pragma once -#include <ui/vec2.h> -#include <ui/half.h> +#include <math/vec2.h> +#include <math/half.h> #include <stdint.h> #include <sys/types.h> @@ -130,5 +129,3 @@ typedef details::TVec3<bool> bool3; } // namespace android #pragma clang diagnostic pop - -#endif // UI_VEC3_H_ diff --git a/include/ui/vec4.h b/libs/math/include/math/vec4.h index 9346fb378b..1e279fe3f2 100644 --- a/include/ui/vec4.h +++ b/libs/math/include/math/vec4.h @@ -14,11 +14,10 @@ * limitations under the License. */ -#ifndef UI_VEC4_H_ -#define UI_VEC4_H_ +#pragma once -#include <ui/vec3.h> -#include <ui/half.h> +#include <math/vec3.h> +#include <math/half.h> #include <stdint.h> #include <sys/types.h> @@ -127,5 +126,3 @@ typedef details::TVec4<bool> bool4; } // namespace android #pragma clang diagnostic pop - -#endif // UI_VEC4_H_ diff --git a/libs/math/tests/Android.bp b/libs/math/tests/Android.bp new file mode 100644 index 0000000000..0ed24a2a1e --- /dev/null +++ b/libs/math/tests/Android.bp @@ -0,0 +1,39 @@ +// +// Copyright (C) 2014 The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +cc_test { + name: "vec_test", + srcs: ["vec_test.cpp"], + static_libs: ["libmath"], +} + +cc_test { + name: "mat_test", + srcs: ["mat_test.cpp"], + static_libs: ["libmath"], +} + +cc_test { + name: "half_test", + srcs: ["half_test.cpp"], + static_libs: ["libmath"], +} + +cc_test { + name: "quat_test", + srcs: ["quat_test.cpp"], + static_libs: ["libmath"], +} diff --git a/libs/ui/tests/half_test.cpp b/libs/math/tests/half_test.cpp index b2a5e5cbc2..496a7ef56d 100644 --- a/libs/ui/tests/half_test.cpp +++ b/libs/math/tests/half_test.cpp @@ -19,8 +19,8 @@ #include <math.h> #include <stdlib.h> -#include <ui/half.h> -#include <ui/vec4.h> +#include <math/half.h> +#include <math/vec4.h> #include <gtest/gtest.h> diff --git a/libs/ui/tests/mat_test.cpp b/libs/math/tests/mat_test.cpp index 0f8e631b6b..c365366384 100644 --- a/libs/ui/tests/mat_test.cpp +++ b/libs/math/tests/mat_test.cpp @@ -24,8 +24,8 @@ #include <gtest/gtest.h> -#include <ui/mat2.h> -#include <ui/mat4.h> +#include <math/mat2.h> +#include <math/mat4.h> namespace android { diff --git a/libs/ui/tests/quat_test.cpp b/libs/math/tests/quat_test.cpp index f5cb659422..c20771eed2 100644 --- a/libs/ui/tests/quat_test.cpp +++ b/libs/math/tests/quat_test.cpp @@ -22,10 +22,10 @@ #include <random> #include <functional> -#include <ui/quat.h> -#include <ui/mat4.h> -#include <ui/vec3.h> -#include <ui/vec4.h> +#include <math/quat.h> +#include <math/mat4.h> +#include <math/vec3.h> +#include <math/vec4.h> #include <gtest/gtest.h> diff --git a/libs/ui/tests/vec_test.cpp b/libs/math/tests/vec_test.cpp index 7c749a7b1e..79ae2e46f9 100644 --- a/libs/ui/tests/vec_test.cpp +++ b/libs/math/tests/vec_test.cpp @@ -19,7 +19,7 @@ #include <math.h> #include <stdlib.h> -#include <ui/vec4.h> +#include <math/vec4.h> #include <gtest/gtest.h> diff --git a/libs/ui/Android.bp b/libs/ui/Android.bp index ea18644940..d1bfa18e5c 100644 --- a/libs/ui/Android.bp +++ b/libs/ui/Android.bp @@ -78,9 +78,13 @@ cc_library_shared { static_libs: [ "libarect", + "libmath", ], - export_static_lib_headers: ["libarect"], + export_static_lib_headers: [ + "libarect", + "libmath", + ], } subdirs = ["tests"] diff --git a/libs/ui/tests/Android.bp b/libs/ui/tests/Android.bp index c4f34d5fdc..6733505090 100644 --- a/libs/ui/tests/Android.bp +++ b/libs/ui/tests/Android.bp @@ -21,26 +21,6 @@ cc_test { } cc_test { - name: "vec_test", - srcs: ["vec_test.cpp"], -} - -cc_test { - name: "mat_test", - srcs: ["mat_test.cpp"], -} - -cc_test { - name: "half_test", - srcs: ["half_test.cpp"], -} - -cc_test { - name: "quat_test", - srcs: ["quat_test.cpp"], -} - -cc_test { name: "colorspace_test", shared_libs: ["libui"], srcs: ["colorspace_test.cpp"], diff --git a/services/surfaceflinger/DisplayHardware/HWC2.h b/services/surfaceflinger/DisplayHardware/HWC2.h index e129a3a54a..4419dc1172 100644 --- a/services/surfaceflinger/DisplayHardware/HWC2.h +++ b/services/surfaceflinger/DisplayHardware/HWC2.h @@ -24,7 +24,7 @@ #undef HWC2_USE_CPP11 #include <ui/HdrCapabilities.h> -#include <ui/mat4.h> +#include <math/mat4.h> #include <utils/Log.h> #include <utils/StrongPointer.h> diff --git a/services/surfaceflinger/Effects/Daltonizer.cpp b/services/surfaceflinger/Effects/Daltonizer.cpp index a104e8f780..c953c68dd4 100644 --- a/services/surfaceflinger/Effects/Daltonizer.cpp +++ b/services/surfaceflinger/Effects/Daltonizer.cpp @@ -15,7 +15,7 @@ */ #include "Daltonizer.h" -#include <ui/mat4.h> +#include <math/mat4.h> namespace android { diff --git a/services/surfaceflinger/Effects/Daltonizer.h b/services/surfaceflinger/Effects/Daltonizer.h index d21b155f85..2fb60e96d2 100644 --- a/services/surfaceflinger/Effects/Daltonizer.h +++ b/services/surfaceflinger/Effects/Daltonizer.h @@ -17,7 +17,7 @@ #ifndef SF_EFFECTS_DALTONIZER_H_ #define SF_EFFECTS_DALTONIZER_H_ -#include <ui/mat4.h> +#include <math/mat4.h> namespace android { diff --git a/services/surfaceflinger/RenderEngine/RenderEngine.h b/services/surfaceflinger/RenderEngine/RenderEngine.h index 0259881eee..d19137be1f 100644 --- a/services/surfaceflinger/RenderEngine/RenderEngine.h +++ b/services/surfaceflinger/RenderEngine/RenderEngine.h @@ -23,7 +23,7 @@ #include <EGL/egl.h> #include <EGL/eglext.h> -#include <ui/mat4.h> +#include <math/mat4.h> #include <Transform.h> #define EGL_NO_CONFIG ((EGLConfig)0) diff --git a/services/surfaceflinger/RenderEngine/Texture.h b/services/surfaceflinger/RenderEngine/Texture.h index 8cf85fc7f9..a07e0c3c37 100644 --- a/services/surfaceflinger/RenderEngine/Texture.h +++ b/services/surfaceflinger/RenderEngine/Texture.h @@ -15,7 +15,7 @@ */ #include <stdint.h> -#include <ui/mat4.h> +#include <math/mat4.h> #ifndef SF_RENDER_ENGINE_TEXTURE_H #define SF_RENDER_ENGINE_TEXTURE_H diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h index f52bd2d5a8..c43786ad04 100644 --- a/services/surfaceflinger/SurfaceFlinger.h +++ b/services/surfaceflinger/SurfaceFlinger.h @@ -40,7 +40,7 @@ #include <ui/FenceTime.h> #include <ui/PixelFormat.h> -#include <ui/mat4.h> +#include <math/mat4.h> #include <gui/FrameTimestamps.h> #include <gui/ISurfaceComposer.h> diff --git a/services/surfaceflinger/Transform.h b/services/surfaceflinger/Transform.h index 66463a02e3..6640a13839 100644 --- a/services/surfaceflinger/Transform.h +++ b/services/surfaceflinger/Transform.h @@ -22,8 +22,8 @@ #include <ui/Point.h> #include <ui/Rect.h> -#include <ui/vec2.h> -#include <ui/vec3.h> +#include <math/vec2.h> +#include <math/vec3.h> #include <hardware/hardware.h> |