Trace drawing state

Some state that was dumped was still the current state, creating
misalignment between what was visible on screen and what was being
dumped. Make sure to dump all state consistently.

Test: adb shell service call SurfaceFlinger 1025 i32 1 &&
adb shell service call SurfaceFlinger 1025 i32 0 &&
adb pull /data/misc/trace/layerstrace.pb
Inspect with WindowScope

Change-Id: I16ea06764328fd8c506ed90dfc59929f7d26d156
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 67e4607..386d42b 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -602,7 +602,7 @@
             std::vector<OccupancyTracker::Segment>&& history);
     void dumpBufferingStats(String8& result) const;
     void dumpWideColorInfo(String8& result) const;
-    LayersProto dumpProtoInfo() const;
+    LayersProto dumpProtoInfo(LayerVector::StateSet stateSet) const;
 
     bool isLayerTripleBufferingDisabled() const {
         return this->mLayerTripleBufferingDisabled;