SF: Simplify layer tracing

As preparation to support transaction tracing, do the
following:
1. refactor the ring buffer code so it can be reused
2. remove layer async tracing since we will use
transaction tracing for always on tracing

Test: presubmit
Test: capture sf trace via bugreport
Bug: 200284593

Change-Id: I28388c6db27a420c078e1cc33b0b378c55c6c5d6
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index 3da07e8..5af8dda 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -57,7 +57,7 @@
 #include "Scheduler/LayerInfo.h"
 #include "Scheduler/Seamlessness.h"
 #include "SurfaceFlinger.h"
-#include "SurfaceTracing.h"
+#include "Tracing/LayerTracing.h"
 #include "TransactionCallbackInvoker.h"
 
 using namespace android::surfaceflinger;
@@ -691,7 +691,7 @@
     // external mStateLock. If writing drawing state, this function should be called on the
     // main or tracing thread.
     void writeToProtoCommonState(LayerProto* layerInfo, LayerVector::StateSet,
-                                 uint32_t traceFlags = SurfaceTracing::TRACE_ALL);
+                                 uint32_t traceFlags = LayerTracing::TRACE_ALL);
 
     gui::WindowInfo::Type getWindowType() const { return mWindowType; }