[SurfaceFlinger] Avoid comparing to identity matrix.

hasColorTransform is called every time on every layer that needs to be client
composited. This patch adds a boolean for that check and move that check to
when color transform matrix is set.

BUG: 111562338
Test: Build, flash and boot.
Change-Id: Icbd17458dc194f10f744ee7cc72c3462ae239a28
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index e2d1178..5d05f05 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -182,6 +182,7 @@
 
         sp<NativeHandle> sidebandStream;
         mat4 colorTransform;
+        bool hasColorTransform;
     };
 
     explicit Layer(const LayerCreationArgs& args);