Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fc4b6ed2 authored by Doğancan Emek's avatar Doğancan Emek
Browse files

Adding DPI to Traces

To enable Flickr testing on large screen devices, a DPI value needed to be added on the traces

Test: add_dpi_to_traces

Bug: 284145257

Change-Id: I1063c971dbddabf670004147944ee398cd832c9a
parent cd760e3f
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -6127,6 +6127,13 @@ google::protobuf::RepeatedPtrField<DisplayProto> SurfaceFlinger::dumpDisplayProt
        displayProto->set_id(display->getId().value);
        displayProto->set_name(display->getDisplayName());
        displayProto->set_layer_stack(display->getLayerStack().id);

        if (!display->isVirtual()) {
            const auto dpi = display->refreshRateSelector().getActiveMode().modePtr->getDpi();
            displayProto->set_dpi_x(dpi.x);
            displayProto->set_dpi_y(dpi.y);
        }

        LayerProtoHelper::writeSizeToProto(display->getWidth(), display->getHeight(),
                                           [&]() { return displayProto->mutable_size(); });
        LayerProtoHelper::writeToProto(display->getLayerStackSpaceRect(), [&]() {
+4 −0
Original line number Diff line number Diff line
@@ -35,4 +35,8 @@ message DisplayProto {
    TransformProto transform = 6;

    bool is_virtual = 7;

    double dpi_x = 8;

    double dpi_y = 9;
}