SF Generalization of Refresh Rates: Adding layer priority hint

Test: Device boots. Observe logs for errors.
Test: Open Swappy and Chrome in split screen, tap between apps,
      SF prints the correct priority.
Test: Open Chrome, play video. SF prints correct priority.
Test: SF prints the correct priority received.
Bug: 142507166
Change-Id: I5fa8a857c950db01f42a380a72d098039badc289
diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp
index a7c4f46..8b448ff 100644
--- a/libs/gui/LayerState.cpp
+++ b/libs/gui/LayerState.cpp
@@ -110,6 +110,9 @@
         }
     }
     output.writeFloat(shadowRadius);
+
+    output.writeInt32(frameRateSelectionPriority);
+
     return NO_ERROR;
 }
 
@@ -188,6 +191,9 @@
         listeners.emplace_back(listener, callbackIds);
     }
     shadowRadius = input.readFloat();
+
+    frameRateSelectionPriority = input.readInt32();
+
     return NO_ERROR;
 }
 
@@ -406,12 +412,14 @@
         what |= eMetadataChanged;
         metadata.merge(other.metadata);
     }
-
     if (other.what & eShadowRadiusChanged) {
         what |= eShadowRadiusChanged;
         shadowRadius = other.shadowRadius;
     }
-
+    if (other.what & eFrameRateSelectionPriority) {
+        what |= eFrameRateSelectionPriority;
+        frameRateSelectionPriority = other.frameRateSelectionPriority;
+    }
     if ((other.what & what) != other.what) {
         ALOGE("Unmerged SurfaceComposer Transaction properties. LayerState::merge needs updating? "
               "other.what=0x%" PRIu64 " what=0x%" PRIu64,