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

Commit 97a57e0e authored by Nataniel Borges's avatar Nataniel Borges Committed by Android (Google) Code Review
Browse files

Merge "Remove id from RegionProto object"

parents 70435e9b 1c0d91c8
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;
}