summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/LayerProtoHelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'services/surfaceflinger/LayerProtoHelper.cpp')
-rw-r--r--services/surfaceflinger/LayerProtoHelper.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/services/surfaceflinger/LayerProtoHelper.cpp b/services/surfaceflinger/LayerProtoHelper.cpp
index b1db6d34a3..0fe1421926 100644
--- a/services/surfaceflinger/LayerProtoHelper.cpp
+++ b/services/surfaceflinger/LayerProtoHelper.cpp
@@ -17,7 +17,6 @@
// TODO(b/129481165): remove the #pragma below and fix conversion issues
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wconversion"
-#pragma clang diagnostic ignored "-Wextra"
#include "LayerProtoHelper.h"
@@ -132,12 +131,8 @@ void LayerProtoHelper::writeToProto(
}
InputWindowInfoProto* proto = getInputWindowInfoProto();
- proto->set_layout_params_flags(inputInfo.flags.get());
- using U = std::underlying_type_t<InputWindowInfo::Type>;
- // TODO(b/129481165): This static assert can be safely removed once conversion warnings
- // are re-enabled.
- static_assert(std::is_same_v<U, int32_t>);
- proto->set_layout_params_type(static_cast<U>(inputInfo.type));
+ proto->set_layout_params_flags(inputInfo.layoutParamsFlags);
+ proto->set_layout_params_type(inputInfo.layoutParamsType);
LayerProtoHelper::writeToProto({inputInfo.frameLeft, inputInfo.frameTop, inputInfo.frameRight,
inputInfo.frameBottom},
@@ -147,11 +142,13 @@ void LayerProtoHelper::writeToProto(
proto->set_surface_inset(inputInfo.surfaceInset);
proto->set_visible(inputInfo.visible);
- proto->set_focusable(inputInfo.focusable);
+ proto->set_can_receive_keys(inputInfo.canReceiveKeys);
+ proto->set_has_focus(inputInfo.hasFocus);
proto->set_has_wallpaper(inputInfo.hasWallpaper);
proto->set_global_scale_factor(inputInfo.globalScaleFactor);
- LayerProtoHelper::writeToProto(inputInfo.transform, proto->mutable_transform());
+ proto->set_window_x_scale(inputInfo.windowXScale);
+ proto->set_window_y_scale(inputInfo.windowYScale);
proto->set_replace_touchable_region_with_crop(inputInfo.replaceTouchableRegionWithCrop);
auto cropLayer = touchableRegionBounds.promote();
if (cropLayer != nullptr) {
@@ -174,4 +171,4 @@ void LayerProtoHelper::writeToProto(const mat4 matrix, ColorTransformProto* colo
} // namespace android
// TODO(b/129481165): remove the #pragma below and fix conversion issues
-#pragma clang diagnostic pop // ignored "-Wconversion -Wextra"
+#pragma clang diagnostic pop // ignored "-Wconversion"