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

Commit 84a46182 authored by Nataniel Borges's avatar Nataniel Borges
Browse files

Add the transform type to the Winscope protobuf

Test: Record a SF trace. Open it in Winscope. Transforms should have a
value information in the properties list

Change-Id: I64c90c82f0004926d704f26cc1e1f8d9097f61b1
parent 543f6beb
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -92,12 +92,10 @@ void LayerProtoHelper::writeToProto(const half4 color, std::function<ColorProto*

void LayerProtoHelper::writeToProto(const ui::Transform& transform,
                                    TransformProto* transformProto) {
    const uint32_t type = transform.getType();
    const uint32_t type = transform.getType() | (transform.getOrientation() << 8);
    transformProto->set_type(type);

    if (type &
        (ui::Transform::SCALE | ui::Transform::ROTATE | ui::Transform::TRANSLATE |
         ui::Transform::UNKNOWN)) {
    if (type & (ui::Transform::SCALE | ui::Transform::UNKNOWN)) {
        transformProto->set_dsdx(transform[0][0]);
        transformProto->set_dtdx(transform[0][1]);
        transformProto->set_dsdy(transform[1][0]);