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

Commit 34890724 authored by chaviw's avatar chaviw Committed by android-build-merger
Browse files

Add current frame and barrier layer info to protobuf.

am: 9885bd4b

Change-Id: I97fd95612ed7c84dc97dc50e112d898d9647b7bc
parents d9a50d72 9885bd4b
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -1987,6 +1987,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 hwcId) {
+11 −0
Original line number Diff line number Diff line
@@ -80,6 +80,10 @@ message LayerProto {
  optional int32 hwc_composition_type = 35;
  // If it's a buffer layer, indicate if the content is protected
  optional bool is_protected = 36;
  // Current frame number being rendered.
  optional uint64 curr_frame = 37;
  // A list of barriers that the layer is waiting to update state.
  repeated BarrierLayerProto barrier_layer = 38;
}

message PositionProto {
@@ -131,3 +135,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;
}