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/services/surfaceflinger/LayerBase.h b/services/surfaceflinger/LayerBase.h
index d123d9b..31f6dfd 100644
--- a/services/surfaceflinger/LayerBase.h
+++ b/services/surfaceflinger/LayerBase.h
@@ -78,6 +78,7 @@
                 uint32_t        tint;
                 Transform       transform;
                 Region          transparentRegion;
+                Rect            crop;
             };
 
     virtual void setName(const String8& name);
@@ -91,6 +92,7 @@
             bool setMatrix(const layer_state_t::matrix22_t& matrix);
             bool setTransparentRegionHint(const Region& opaque);
             bool setFlags(uint8_t flags, uint8_t mask);
+            bool setCrop(const Rect& crop);
             
             void commitTransaction();
             bool requestTransaction();