diff options
Diffstat (limited to 'libs/ui')
| -rw-r--r-- | libs/ui/Android.bp | 5 | ||||
| -rw-r--r-- | libs/ui/GraphicBufferMapper.cpp | 23 | ||||
| -rw-r--r-- | libs/ui/tests/Android.bp | 2 |
3 files changed, 6 insertions, 24 deletions
diff --git a/libs/ui/Android.bp b/libs/ui/Android.bp index 28b8ab3fa5..14c0d5cc29 100644 --- a/libs/ui/Android.bp +++ b/libs/ui/Android.bp @@ -20,9 +20,12 @@ cc_library_shared { }, clang: true, + cflags: [ + "-Wall", + "-Werror", + ], cppflags: [ "-Weverything", - "-Werror", // The static constructors and destructors in this library have not been noted to // introduce significant overheads diff --git a/libs/ui/GraphicBufferMapper.cpp b/libs/ui/GraphicBufferMapper.cpp index 5b0e7f6020..d5a30d7023 100644 --- a/libs/ui/GraphicBufferMapper.cpp +++ b/libs/ui/GraphicBufferMapper.cpp @@ -125,29 +125,6 @@ status_t GraphicBufferMapper::lockAsync(buffer_handle_t handle, return static_cast<status_t>(error); } -static inline bool isValidYCbCrPlane(const android_flex_plane_t& plane) { - if (plane.bits_per_component != 8) { - ALOGV("Invalid number of bits per component: %d", - plane.bits_per_component); - return false; - } - if (plane.bits_used != 8) { - ALOGV("Invalid number of bits used: %d", plane.bits_used); - return false; - } - - bool hasValidIncrement = plane.h_increment == 1 || - (plane.component != FLEX_COMPONENT_Y && plane.h_increment == 2); - hasValidIncrement = hasValidIncrement && plane.v_increment > 0; - if (!hasValidIncrement) { - ALOGV("Invalid increment: h %d v %d", plane.h_increment, - plane.v_increment); - return false; - } - - return true; -} - status_t GraphicBufferMapper::lockAsyncYCbCr(buffer_handle_t handle, uint32_t usage, const Rect& bounds, android_ycbcr *ycbcr, int fenceFd) { diff --git a/libs/ui/tests/Android.bp b/libs/ui/tests/Android.bp index 6733505090..08067fcf5d 100644 --- a/libs/ui/tests/Android.bp +++ b/libs/ui/tests/Android.bp @@ -18,10 +18,12 @@ cc_test { name: "Region_test", shared_libs: ["libui"], srcs: ["Region_test.cpp"], + cflags: ["-Wall", "-Werror"], } cc_test { name: "colorspace_test", shared_libs: ["libui"], srcs: ["colorspace_test.cpp"], + cflags: ["-Wall", "-Werror"], } |