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, 10 insertions, 7 deletions
diff --git a/services/surfaceflinger/LayerProtoHelper.cpp b/services/surfaceflinger/LayerProtoHelper.cpp
index 0fe1421926..b1db6d34a3 100644
--- a/services/surfaceflinger/LayerProtoHelper.cpp
+++ b/services/surfaceflinger/LayerProtoHelper.cpp
@@ -17,6 +17,7 @@
// 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"
@@ -131,8 +132,12 @@ void LayerProtoHelper::writeToProto(
}
InputWindowInfoProto* proto = getInputWindowInfoProto();
- proto->set_layout_params_flags(inputInfo.layoutParamsFlags);
- proto->set_layout_params_type(inputInfo.layoutParamsType);
+ 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));
LayerProtoHelper::writeToProto({inputInfo.frameLeft, inputInfo.frameTop, inputInfo.frameRight,
inputInfo.frameBottom},
@@ -142,13 +147,11 @@ void LayerProtoHelper::writeToProto(
proto->set_surface_inset(inputInfo.surfaceInset);
proto->set_visible(inputInfo.visible);
- proto->set_can_receive_keys(inputInfo.canReceiveKeys);
- proto->set_has_focus(inputInfo.hasFocus);
+ proto->set_focusable(inputInfo.focusable);
proto->set_has_wallpaper(inputInfo.hasWallpaper);
proto->set_global_scale_factor(inputInfo.globalScaleFactor);
- proto->set_window_x_scale(inputInfo.windowXScale);
- proto->set_window_y_scale(inputInfo.windowYScale);
+ LayerProtoHelper::writeToProto(inputInfo.transform, proto->mutable_transform());
proto->set_replace_touchable_region_with_crop(inputInfo.replaceTouchableRegionWithCrop);
auto cropLayer = touchableRegionBounds.promote();
if (cropLayer != nullptr) {
@@ -171,4 +174,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"
+#pragma clang diagnostic pop // ignored "-Wconversion -Wextra"