diff options
Diffstat (limited to 'gralloc/gr_utils.cpp')
-rw-r--r-- | gralloc/gr_utils.cpp | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/gralloc/gr_utils.cpp b/gralloc/gr_utils.cpp index 997c8b94..2f8f5505 100644 --- a/gralloc/gr_utils.cpp +++ b/gralloc/gr_utils.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2019, The Linux Foundation. All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -235,32 +235,6 @@ bool IsGPUFlagSupported(uint64_t usage) { return ret; } -int GetBpp(int format) { - if (IsUncompressedRGBFormat(format)) { - return GetBppForUncompressedRGB(format); - } - switch (format) { - case HAL_PIXEL_FORMAT_COMPRESSED_RGBA_ASTC_4x4_KHR: - case HAL_PIXEL_FORMAT_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR: - case HAL_PIXEL_FORMAT_RAW8: - case HAL_PIXEL_FORMAT_Y8: - return 1; - case HAL_PIXEL_FORMAT_RAW16: - case HAL_PIXEL_FORMAT_Y16: - case HAL_PIXEL_FORMAT_YCbCr_422_SP: - case HAL_PIXEL_FORMAT_YCrCb_422_SP: - case HAL_PIXEL_FORMAT_YCbCr_422_I: - case HAL_PIXEL_FORMAT_YCrCb_422_I: - case HAL_PIXEL_FORMAT_CbYCrY_422_I: - return 2; - case HAL_PIXEL_FORMAT_YCbCr_420_P010_VENUS: - case HAL_PIXEL_FORMAT_YCbCr_420_P010: - return 3; - default: - return -1; - } -} - // Returns the final buffer size meant to be allocated with ion unsigned int GetSize(const BufferInfo &info, unsigned int alignedw, unsigned int alignedh) { unsigned int size = 0; |