Remove redundent layer setDataspace calls.

Cache the layer's dataspace in hwc2 and only send
to the HAL when it changes. Allows HAL to optimize
use of layer.

Bug: 38396128
Test: Manually checked systraces on Pixel
Change-Id: Ia94bebe7de9f79d01ae19b9917591837d865fea9
diff --git a/services/surfaceflinger/DisplayHardware/HWC2.h b/services/surfaceflinger/DisplayHardware/HWC2.h
index 97582a7..15a43df 100644
--- a/services/surfaceflinger/DisplayHardware/HWC2.h
+++ b/services/surfaceflinger/DisplayHardware/HWC2.h
@@ -326,6 +326,7 @@
     hwc2_display_t mDisplayId;
     Device& mDevice;
     hwc2_layer_t mId;
+    android_dataspace mDataSpace = HAL_DATASPACE_UNKNOWN;
 };
 
 } // namespace HWC2