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/Layer.h b/services/surfaceflinger/Layer.h
index 1188621..393599f 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -101,6 +101,7 @@
     uint32_t getEffectiveUsage(uint32_t usage) const;
     uint32_t getTransformHint() const;
     bool isCropped() const;
+    Rect computeBufferCrop() const;
     static bool getOpacityForFormat(uint32_t format);
 
     // -----------------------------------------------------------------------