Commit eea1e99d authored by Wei-Yin Chen (陳威尹)'s avatar Wei-Yin Chen (陳威尹) Committed by Commit Bot

Revert "Enable -Wunreachable-code on Android."

This reverts commit 4a511800.

Reason for revert: break compile on many Android bots. See crbug.com/1064847.

Original change's description:
> Enable -Wunreachable-code on Android.
> 
> Bug: 346399
> Change-Id: I41c8cf8581bff1256a28a15c80bdd59a599b0cc2
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2119759
> Auto-Submit: Nico Weber <thakis@chromium.org>
> Reviewed-by: Bo <boliu@chromium.org>
> Commit-Queue: Bo <boliu@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#753406}

TBR=thakis@chromium.org,boliu@chromium.org

Change-Id: I8cc1fea613255b63987bc1b1cc1c0af1972cf4b7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 346399
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2121468Reviewed-by: default avatarWei-Yin Chen (陳威尹) <wychen@chromium.org>
Commit-Queue: Wei-Yin Chen (陳威尹) <wychen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#753506}
parent fa03e474
......@@ -156,16 +156,11 @@ std::unique_ptr<HttpResponse> HandleSetImageResponse(
bool header_exist = false;
if (query.find("header") != query.end()) {
// TODO(thakis): It looks like the break in the loop should be in the if.
// Check and fix.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunreachable-code"
for (const auto& header : query.at("header")) {
if (request.headers.find(header) != request.headers.end())
header_exist = true;
break;
}
#pragma GCC diagnostic pop
}
std::string decoded_resource;
......
......@@ -1591,9 +1591,10 @@ config("chromium_code") {
# TODO(thakis): Enable this more often, https://crbug.com/346399
# use_libfuzzer: https://crbug.com/1063180
# cros/arm has warnings in nacl code.
if (!is_nacl && !use_libfuzzer &&
(target_os == "android" || target_os == "chromeos" ||
target_os == "fuchsia" || target_os == "linux")) {
(target_os == "chromeos" || target_os == "fuchsia" ||
target_os == "linux")) {
cflags += [ "-Wunreachable-code" ]
}
......
......@@ -781,16 +781,13 @@ bool ImageData::ImageDataInCanvasColorSettings(
src_pixel_format = skcms_PixelFormat_RGBA_ffff;
skcms_PixelFormat dst_pixel_format = skcms_PixelFormat_RGBA_8888;
if (canvas_pixel_format == CanvasPixelFormat::kF16) {
dst_pixel_format = skcms_PixelFormat_RGBA_hhhh;
}
#if SK_PMCOLOR_BYTE_ORDER(B, G, R, A)
else if (canvas_pixel_format ==
CanvasColorParams::GetNativeCanvasPixelFormat() &&
u8_color_type == kN32ColorType) {
if (canvas_pixel_format == CanvasColorParams::GetNativeCanvasPixelFormat() &&
u8_color_type == kN32ColorType &&
kN32_SkColorType == kBGRA_8888_SkColorType) {
dst_pixel_format = skcms_PixelFormat_BGRA_8888;
} else if (canvas_pixel_format == CanvasPixelFormat::kF16) {
dst_pixel_format = skcms_PixelFormat_RGBA_hhhh;
}
#endif
skcms_AlphaFormat src_alpha_format = skcms_AlphaFormat_Unpremul;
skcms_AlphaFormat dst_alpha_format = skcms_AlphaFormat_Unpremul;
......
......@@ -2858,11 +2858,7 @@ void WebGLImageConversion::ImageExtractor::ExtractImage(
if (!skia_image)
return;
#if SK_B32_SHIFT
image_source_format_ = kDataFormatRGBA8;
#else
image_source_format_ = kDataFormatBGRA8;
#endif
image_source_format_ = SK_B32_SHIFT ? kDataFormatRGBA8 : kDataFormatBGRA8;
image_source_unpack_alignment_ =
0; // FIXME: this seems to always be zero - why use at all?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment