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

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

Merge "Add ColorSaturation to proto dump"

parents 69a2660a ddeae26f
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -1930,6 +1930,11 @@ void Layer::writeToProtoDrawingState(LayerProto* layerInfo, uint32_t traceFlags)
                                       [&]() { return layerInfo->mutable_visible_region(); });
                                       [&]() { return layerInfo->mutable_visible_region(); });
        LayerProtoHelper::writeToProto(surfaceDamageRegion,
        LayerProtoHelper::writeToProto(surfaceDamageRegion,
                                       [&]() { return layerInfo->mutable_damage_region(); });
                                       [&]() { return layerInfo->mutable_damage_region(); });

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


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


} // namespace surfaceflinger
} // namespace surfaceflinger
+6 −0
Original line number Original line 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
  // length of the shadow to draw around the layer, it may be set on the
  // layer or set by a parent layer.
  // layer or set by a parent layer.
  float shadow_radius = 49;
  float shadow_radius = 49;
  ColorTransformProto color_transform = 50;
}
}


message PositionProto {
message PositionProto {
@@ -181,3 +182,8 @@ message InputWindowInfoProto {
    bool replace_touchable_region_with_crop = 14;
    bool replace_touchable_region_with_crop = 14;
    RectProto touchable_region_crop = 15;
    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