SurfaceFlinger: add a crop to the layer state

This change adds a crop rectangle specified in window coordinates to the layer
state.  The all window pixels outside this crop rectangle are treated as though
they were fully transparent.  This change also adds the plumbing necessary for
WindowManager to set that crop.

Change-Id: I582bc445dc8c97d4c943d4db8d582a6ef5a66081
diff --git a/include/ui/Rect.h b/include/ui/Rect.h
index bd82061..308da7b 100644
--- a/include/ui/Rect.h
+++ b/include/ui/Rect.h
@@ -147,7 +147,7 @@
     // a ROT90 then the output rectangle is defined in a space extending to
     // (height, width).  Otherwise the output rectangle is in the same space as
     // the input.
-    Rect transform(uint32_t xform, int32_t width, int32_t height);
+    Rect transform(uint32_t xform, int32_t width, int32_t height) const;
 };
 
 ANDROID_BASIC_TYPES_TRAITS(Rect)