Add shadow radius and corner radius crop to sf and transaction trace
Bug: 136561771
Test: capture sf and transaction trace and check in winscope
Test: atest SurfaceFlinger_test
Change-Id: Ie2dce153ad8614657b6a2db43cbf7dd4912d8ddf
diff --git a/services/surfaceflinger/layerproto/LayerProtoParser.cpp b/services/surfaceflinger/layerproto/LayerProtoParser.cpp
index ef488bd..ef27847 100644
--- a/services/surfaceflinger/layerproto/LayerProtoParser.cpp
+++ b/services/surfaceflinger/layerproto/LayerProtoParser.cpp
@@ -112,7 +112,8 @@
outData.resize(dataStr.size());
memcpy(outData.data(), dataStr.data(), dataStr.size());
}
-
+ layer.cornerRadiusCrop = generateFloatRect(layerProto.corner_radius_crop());
+ layer.shadowRadius = layerProto.shadow_radius();
return layer;
}
@@ -307,8 +308,9 @@
first = false;
result.append(metadata.itemToString(entry.first, ":"));
}
- result.append("}");
-
+ result.append("},");
+ StringAppendF(&result, " cornerRadiusCrop=%s, ", cornerRadiusCrop.to_string().c_str());
+ StringAppendF(&result, " shadowRadius=%.3f, ", shadowRadius);
return result;
}