diff options
author | Mathias Agopian <mathias@google.com> | 2013-05-09 20:37:10 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2013-05-10 18:03:31 -0700 |
commit | 6c7f25afb75ac155bad0b3bc17c0089d0337d060 (patch) | |
tree | 26dae889e5ea8276c5391f0bad4a2fe05bc03f7d /services | |
parent | b6df7d0e4c2117ca476662bd52b6745b3d8a305f (diff) | |
download | frameworks_native-6c7f25afb75ac155bad0b3bc17c0089d0337d060.tar.gz frameworks_native-6c7f25afb75ac155bad0b3bc17c0089d0337d060.tar.bz2 frameworks_native-6c7f25afb75ac155bad0b3bc17c0089d0337d060.zip |
reformat Rect.{cpp|h}
Change-Id: I45b1f6646541a1abacce1e70df00a770e47b820e
Diffstat (limited to 'services')
-rw-r--r-- | services/surfaceflinger/DisplayDevice.cpp | 2 | ||||
-rw-r--r-- | services/surfaceflinger/Layer.cpp | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/services/surfaceflinger/DisplayDevice.cpp b/services/surfaceflinger/DisplayDevice.cpp index 42b30cc9e..b001bdb0f 100644 --- a/services/surfaceflinger/DisplayDevice.cpp +++ b/services/surfaceflinger/DisplayDevice.cpp @@ -416,7 +416,7 @@ void DisplayDevice::setProjection(int orientation, mScissor = mGlobalTransform.transform(viewport); if (mScissor.isEmpty()) { - mScissor.set(getBounds()); + mScissor = getBounds(); } mOrientation = orientation; diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index 989658157..07f9b8b98 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -276,6 +276,8 @@ Rect Layer::computeBounds() const { if (!s.active.crop.isEmpty()) { win.intersect(s.active.crop, &win); } + // subtract the transparent region and snap to the bounds + win = Region(win).subtract(s.activeTransparentRegion).getBounds(); return win; } @@ -666,6 +668,8 @@ void Layer::computeGeometry(const sp<const DisplayDevice>& hw, LayerMesh* mesh) if (!s.active.crop.isEmpty()) { win.intersect(s.active.crop, &win); } + // subtract the transparent region and snap to the bounds + win = Region(win).subtract(s.activeTransparentRegion).getBounds(); if (mesh) { tr.transform(mesh->mVertices[0], win.left, win.top); tr.transform(mesh->mVertices[1], win.left, win.bottom); |