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

Commit 1c0d91c8 authored by Nataniel Borges's avatar Nataniel Borges
Browse files

Remove id from RegionProto object

The region proto object contains an Id, which is assigned to the memory
address of the Region object.

This information is not necessary on winscope traces, remove.

Test: Flash a device. Collect a SF trace. Open trace in winscope. Check
if Id for region objects is removed from the property list

Change-Id: I4f91745d79d9f1812915836e5e7ac3b416c2052a
parent 114998a8
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -49,8 +49,6 @@ void LayerProtoHelper::writeToProto(const Region& region,
    Region::const_iterator const tail = region.end();
    // Use a lambda do avoid writing the object header when the object is empty
    RegionProto* regionProto = getRegionProto();
    uint64_t address = reinterpret_cast<uint64_t>(&region);
    regionProto->set_id(address);
    while (head != tail) {
        std::function<RectProto*()> getProtoRect = [&]() { return regionProto->add_rect(); };
        writeToProto(*head, getProtoRect);
+0 −1
Original line number Diff line number Diff line
@@ -132,7 +132,6 @@ LayerProtoParser::Layer LayerProtoParser::generateLayer(const LayerProto& layerP

LayerProtoParser::Region LayerProtoParser::generateRegion(const RegionProto& regionProto) {
    LayerProtoParser::Region region;
    region.id = regionProto.id();
    for (int i = 0; i < regionProto.rect_size(); i++) {
        const RectProto& rectProto = regionProto.rect(i);
        region.rects.push_back(generateRect(rectProto));
+1 −1
Original line number Diff line number Diff line
@@ -117,7 +117,7 @@ message TransformProto {
}

message RegionProto {
  uint64 id = 1;
  reserved 1;  // Previously: uint64 id
  repeated RectProto rect = 2;
}