Loading services/surfaceflinger/Layer.cpp +5 −0 Original line number Original line Diff line number Diff line Loading @@ -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) { Loading services/surfaceflinger/LayerProtoHelper.cpp +8 −0 Original line number Original line Diff line number Diff line Loading @@ -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 services/surfaceflinger/LayerProtoHelper.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -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 Loading services/surfaceflinger/layerproto/layers.proto +6 −0 Original line number Original line Diff line number Diff line Loading @@ -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 { Loading Loading @@ -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 Loading
services/surfaceflinger/Layer.cpp +5 −0 Original line number Original line Diff line number Diff line Loading @@ -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) { Loading
services/surfaceflinger/LayerProtoHelper.cpp +8 −0 Original line number Original line Diff line number Diff line Loading @@ -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
services/surfaceflinger/LayerProtoHelper.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -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 Loading
services/surfaceflinger/layerproto/layers.proto +6 −0 Original line number Original line Diff line number Diff line Loading @@ -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 { Loading Loading @@ -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