diff options
author | Naseer Ahmed <naseer@codeaurora.org> | 2015-11-02 20:34:29 -0500 |
---|---|---|
committer | Naseer Ahmed <naseer@codeaurora.org> | 2015-11-03 08:02:01 -0500 |
commit | b8ecfbf5a7106bb57f55921da76c1f3e1e897b42 (patch) | |
tree | 2cfc1d1bcfaee761561a375f0dc89889f947cd06 /libcopybit | |
parent | efd6a3531638a2ed1b0de49b7f5b2a7f8035b3f5 (diff) | |
download | display-b8ecfbf5a7106bb57f55921da76c1f3e1e897b42.tar.gz |
display: Enable clang for all display modules
Change-Id: I71e3fa3f7d44253b8e01d1eafe086b1898d65a8e
Diffstat (limited to 'libcopybit')
-rw-r--r-- | libcopybit/Android.mk | 3 | ||||
-rw-r--r-- | libcopybit/copybit_c2d.cpp | 41 |
2 files changed, 12 insertions, 32 deletions
diff --git a/libcopybit/Android.mk b/libcopybit/Android.mk index f6f7ed51..a1658264 100644 --- a/libcopybit/Android.mk +++ b/libcopybit/Android.mk @@ -26,8 +26,9 @@ LOCAL_MODULE_RELATIVE_PATH := hw LOCAL_MODULE_TAGS := optional LOCAL_C_INCLUDES := $(common_includes) $(kernel_includes) LOCAL_SHARED_LIBRARIES := $(common_libs) libdl libmemalloc -LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"qdcopybit\" +LOCAL_CFLAGS := $(common_flags) -DLOG_TAG=\"qdcopybit\" -Wno-sign-conversion LOCAL_ADDITIONAL_DEPENDENCIES := $(common_deps) +LOCAL_CLANG := true ifeq ($(TARGET_USES_C2D_COMPOSITION),true) LOCAL_CFLAGS += -DCOPYBIT_Z180=1 -DC2D_SUPPORT_DISPLAY=1 diff --git a/libcopybit/copybit_c2d.cpp b/libcopybit/copybit_c2d.cpp index 9936eb66..240ba26c 100644 --- a/libcopybit/copybit_c2d.cpp +++ b/libcopybit/copybit_c2d.cpp @@ -194,22 +194,22 @@ static int open_copybit(const struct hw_module_t* module, const char* name, struct hw_device_t** device); static struct hw_module_methods_t copybit_module_methods = { -open: open_copybit + .open = open_copybit, }; /* * The COPYBIT Module */ struct copybit_module_t HAL_MODULE_INFO_SYM = { -common: { -tag: HARDWARE_MODULE_TAG, - version_major: 1, - version_minor: 0, - id: COPYBIT_HARDWARE_MODULE_ID, - name: "QCT COPYBIT C2D 2.0 Module", - author: "Qualcomm", - methods: ©bit_module_methods - } + .common = { + .tag = HARDWARE_MODULE_TAG, + .version_major = 1, + .version_minor = 0, + .id = COPYBIT_HARDWARE_MODULE_ID, + .name = "QCT COPYBIT C2D 2.0 Module", + .author = "Qualcomm", + .methods = ©bit_module_methods + } }; @@ -925,27 +925,6 @@ static int get(struct copybit_device_t *dev, int name) return value; } -static int is_alpha(int cformat) -{ - int alpha = 0; - switch (cformat & 0xFF) { - case C2D_COLOR_FORMAT_8888_ARGB: - case C2D_COLOR_FORMAT_8888_RGBA: - case C2D_COLOR_FORMAT_5551_RGBA: - case C2D_COLOR_FORMAT_4444_ARGB: - alpha = 1; - break; - default: - alpha = 0; - break; - } - - if(alpha && (cformat&C2D_FORMAT_DISABLE_ALPHA)) - alpha = 0; - - return alpha; -} - /* Function to check if we need a temporary buffer for the blit. * This would happen if the requested destination stride and the * C2D stride do not match. We ignore RGB buffers, since their |