Add metrics for logging SurfaceControl events

Currently, we log whenever dataspaces change on a layer. We also log
when a layer is destroyed, so that we can log its last dataspace.

Bug: 329474645
Flag: EXEMPT logging
Test: GraphicsAtomTests

Change-Id: I06f4591a1b523cb565923c7d6e4103f0e294d8ad
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index 9bc557e..7fd77f5 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -242,6 +242,8 @@
         sp<Fence> mFence;
         uint32_t mTransform{0};
         ui::Dataspace mDataspace{ui::Dataspace::UNKNOWN};
+        std::chrono::steady_clock::time_point mTimeSinceDataspaceUpdate =
+                std::chrono::steady_clock::time_point::min();
         Rect mCrop;
         PixelFormat mPixelFormat{PIXEL_FORMAT_NONE};
         bool mTransformToDisplayInverse{false};