diff options
author | Jamie Gennis <jgennis@google.com> | 2012-05-10 20:43:55 -0700 |
---|---|---|
committer | Jamie Gennis <jgennis@google.com> | 2012-05-11 03:16:02 -0700 |
commit | f15a83f5814219c167f87cb8aaea622fc8493499 (patch) | |
tree | 131d3c92aa0f1e75b110b187b8ee6859be5d0bc5 /include/private | |
parent | f30fd01497a53cbff8692721026c3f7b6830158e (diff) | |
download | frameworks_native-f15a83f5814219c167f87cb8aaea622fc8493499.zip frameworks_native-f15a83f5814219c167f87cb8aaea622fc8493499.tar.gz frameworks_native-f15a83f5814219c167f87cb8aaea622fc8493499.tar.bz2 |
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
Diffstat (limited to 'include/private')
-rw-r--r-- | include/private/gui/LayerState.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/private/gui/LayerState.h b/include/private/gui/LayerState.h index ca277e0..9151c11 100644 --- a/include/private/gui/LayerState.h +++ b/include/private/gui/LayerState.h @@ -23,6 +23,7 @@ #include <utils/Errors.h> #include <ui/Region.h> +#include <ui/Rect.h> #include <gui/ISurface.h> namespace android { @@ -40,6 +41,7 @@ struct layer_state_t { { matrix.dsdx = matrix.dtdy = 1.0f; matrix.dsdy = matrix.dtdx = 0.0f; + crop.makeInvalid(); } status_t write(Parcel& output) const; @@ -64,6 +66,7 @@ struct layer_state_t { uint8_t mask; uint8_t reserved; matrix22_t matrix; + Rect crop; // non POD must be last. see write/read Region transparentRegion; }; |