drm_hwcomposer: Support default values for Rect structures

This commit introduces two improvements:
1. Introduces frontend-agnostic structures for rects.
2. Support default values in them so that the backend can handle
   cases where rects are not specified by the client, like
   the client layer display frame, etc.
   This reduces the complexity of the Internal layer, making it
   feasible to use a single Frontend<->Internal layer API for
   regular layers, as well as for the Client and Output layers.

Change-Id: Iab5030ad523d36ea4c5af142f6f628952467d6ab
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
diff --git a/backend/Backend.cpp b/backend/Backend.cpp
index 91cb84d..bf45c08 100644
--- a/backend/Backend.cpp
+++ b/backend/Backend.cpp
@@ -108,7 +108,10 @@
   for (size_t z_order = 0; z_order < layers.size(); ++z_order) {
     if (z_order >= first_z && z_order < first_z + size) {
       auto &df = layers[z_order]->GetLayerData().pi.display_frame;
-      pixops += (df.right - df.left) * (df.bottom - df.top);
+      if (df.i_rect) {
+        pixops += (df.i_rect->right - df.i_rect->left) *
+                  (df.i_rect->bottom - df.i_rect->top);
+      }
     }
   }
   return pixops;