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

Commit b7d63893 authored by Chavi Weingarten's avatar Chavi Weingarten Committed by Android (Google) Code Review
Browse files

Merge "Add current frame and barrier layer info to protobuf."

parents 34b193b5 adc40c22
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -2004,6 +2004,16 @@ void Layer::writeToProto(LayerProto* layerInfo, LayerVector::StateSet stateSet)
    layerInfo->set_refresh_pending(isBufferLatched());
    layerInfo->set_window_type(state.type);
    layerInfo->set_app_id(state.appId);
    layerInfo->set_curr_frame(mCurrentFrameNumber);

    for (const auto& pendingState : mPendingStates) {
        auto barrierLayer = pendingState.barrierLayer.promote();
        if (barrierLayer != nullptr) {
            BarrierLayerProto* barrierLayerProto = layerInfo->add_barrier_layer();
            barrierLayerProto->set_id(barrierLayer->sequence);
            barrierLayerProto->set_frame_number(pendingState.frameNumber);
        }
    }
}

void Layer::writeToProto(LayerProto* layerInfo, int32_t displayId) {
+11 −0
Original line number Diff line number Diff line
@@ -82,6 +82,10 @@ message LayerProto {
  optional bool is_protected = 36;
  // If active_buffer is not null, record its transform
  optional TransformProto buffer_transform = 37;
  // Current frame number being rendered.
  optional uint64 curr_frame = 38;
  // A list of barriers that the layer is waiting to update state.
  repeated BarrierLayerProto barrier_layer = 39;
}

message PositionProto {
@@ -133,3 +137,10 @@ message ColorProto {
  optional float b = 3;
  optional float a = 4;
}

message BarrierLayerProto {
  // layer id the barrier is waiting on.
  optional int32 id = 1;
  // frame number the barrier is waiting on.
  optional uint64 frame_number = 2;
}