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

Commit ddeae26f authored by chaviw's avatar chaviw
Browse files

Add ColorSaturation to proto dump

Test: ColorSaturation is in the proto dump
Bug: 140917834
Change-Id: Ie3bde20f9717a2fe5c1b9a3d316cbed54e512a84
parent 6f6e2305
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1930,6 +1930,11 @@ void Layer::writeToProtoDrawingState(LayerProto* layerInfo, uint32_t traceFlags)
                                       [&]() { return layerInfo->mutable_visible_region(); });
        LayerProtoHelper::writeToProto(surfaceDamageRegion,
                                       [&]() { return layerInfo->mutable_damage_region(); });

        if (hasColorTransform()) {
            LayerProtoHelper::writeToProto(getColorTransform(),
                                           layerInfo->mutable_color_transform());
        }
    }

    if (traceFlags & SurfaceTracing::TRACE_EXTRA) {
+8 −0
Original line number Diff line number Diff line
@@ -155,5 +155,13 @@ void LayerProtoHelper::writeToProto(
    }
}

void LayerProtoHelper::writeToProto(const mat4 matrix, ColorTransformProto* colorTransformProto) {
    for (int i = 0; i < mat4::ROW_SIZE; i++) {
        for (int j = 0; j < mat4::COL_SIZE; j++) {
            colorTransformProto->add_val(matrix[i][j]);
        }
    }
}

} // namespace surfaceflinger
} // namespace android
+1 −0
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ public:
    static void writeToProto(const InputWindowInfo& inputInfo,
                             const wp<Layer>& touchableRegionBounds,
                             std::function<InputWindowInfoProto*()> getInputWindowInfoProto);
    static void writeToProto(const mat4 matrix, ColorTransformProto* colorTransformProto);
};

} // namespace surfaceflinger
+6 −0
Original line number Diff line number Diff line
@@ -101,6 +101,7 @@ message LayerProto {
  // length of the shadow to draw around the layer, it may be set on the
  // layer or set by a parent layer.
  float shadow_radius = 49;
  ColorTransformProto color_transform = 50;
}

message PositionProto {
@@ -181,3 +182,8 @@ message InputWindowInfoProto {
    bool replace_touchable_region_with_crop = 14;
    RectProto touchable_region_crop = 15;
}

message ColorTransformProto {
  // This will be a 4x4 matrix of float values
  repeated float val = 1;
}
 No newline at end of file