summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2019-10-31 13:47:42 -0700
committer Colin Cross <ccross@android.com> 2019-10-31 13:47:42 -0700
commitf4e74b8fa017083ec2445b3ee99cff561d44c94f (patch)
treea1cbb6d6397c72067d9b0a3a0669d53486003288
parent1b908876297ba6c630020426baa6bc483ffcc64f (diff)
Fix fallthrough warning
Fix a single fallthrough warning and re-enable -Wimplicit-fallthrough. Test: m libhwui Change-Id: I850f53f717417f70c9d0416176d03fd64473d1ba
-rw-r--r--libs/hwui/Android.bp3
-rw-r--r--libs/hwui/HardwareBitmapUploader.cpp1
2 files changed, 1 insertions, 3 deletions
diff --git a/libs/hwui/Android.bp b/libs/hwui/Android.bp
index f51848e5691a..4c08a3829934 100644
--- a/libs/hwui/Android.bp
+++ b/libs/hwui/Android.bp
@@ -234,9 +234,6 @@ cc_defaults {
"protos/graphicsstats.proto",
],
- // Allow implicit fallthroughs in HardwareBitmapUploader.cpp until they are fixed.
- cflags: ["-Wno-implicit-fallthrough"],
-
proto: {
export_proto_headers: true,
},
diff --git a/libs/hwui/HardwareBitmapUploader.cpp b/libs/hwui/HardwareBitmapUploader.cpp
index 9bb6031b76ac..b64588e0dcd2 100644
--- a/libs/hwui/HardwareBitmapUploader.cpp
+++ b/libs/hwui/HardwareBitmapUploader.cpp
@@ -302,6 +302,7 @@ static FormatInfo determineFormat(const SkBitmap& skBitmap, bool usingGL) {
switch (skBitmap.info().colorType()) {
case kRGBA_8888_SkColorType:
formatInfo.isSupported = true;
+ [[fallthrough]];
// ARGB_4444 is upconverted to RGBA_8888
case kARGB_4444_SkColorType:
formatInfo.pixelFormat = PIXEL_FORMAT_RGBA_8888;