From d66be0ae6929fee064a229d6c6bac3a871aba137 Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Thu, 5 Oct 2017 13:51:32 -0700 Subject: Use -Werror in frameworks/native/libs/gui and ui * Remove unused variable and function. * Suppress warning of unused return results. Bug: 66996870 Test: build with WITH_TIDY=1 Change-Id: If6f445be1e7677a37bf780844a79b84d6d7e1c1e --- libs/ui/GraphicBufferMapper.cpp | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'libs/ui/GraphicBufferMapper.cpp') 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(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) { -- cgit v1.2.3-59-g8ed1b