diff options
| author | Chet Haase <chet@google.com> | 2013-05-23 07:57:17 -0700 |
|---|---|---|
| committer | Chet Haase <chet@google.com> | 2013-05-23 07:57:17 -0700 |
| commit | c725903eec82aa73ebe9682d142904c06321bc2c (patch) | |
| tree | 0de52325852945b3a66f0c35f0329647944728e5 | |
| parent | 30c798d58772efd595fffebd9d0d54f717e34ed6 (diff) | |
| download | frameworks_base-c725903eec82aa73ebe9682d142904c06321bc2c.zip frameworks_base-c725903eec82aa73ebe9682d142904c06321bc2c.tar.gz frameworks_base-c725903eec82aa73ebe9682d142904c06321bc2c.tar.bz2 | |
Restore previous alpha value on noop'd DisplayList operations
Previously, when a DisplayList operation was rejected because it was not
in the clip bounds, the code would not properly restore the previous
state, leading to errors in alpha values of the noop'd op being applied
to unrelated operations later in the DisplayList.
Issue #9051935 Flash of grey background when transitioning to conversation view
Change-Id: I56645cc9ebf2e07be0228ca5e249213dbeb10d7d
| -rw-r--r-- | libs/hwui/DisplayList.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/hwui/DisplayList.cpp b/libs/hwui/DisplayList.cpp index c11741c..648da9c 100644 --- a/libs/hwui/DisplayList.cpp +++ b/libs/hwui/DisplayList.cpp @@ -501,8 +501,10 @@ void DisplayList::iterate(OpenGLRenderer& renderer, T& handler, const int level) setViewProperties<T>(renderer, handler, level + 1); if (mClipToBounds && renderer.quickRejectNoScissor(0, 0, mWidth, mHeight)) { - DISPLAY_LIST_LOGD("%*sRestoreToCount %d", level * 2, "", restoreTo); + DISPLAY_LIST_LOGD("%*sRestoreToCount %d", (level + 1) * 2, "", restoreTo); handler(mRestoreToCountOp->reinit(restoreTo), PROPERTY_SAVECOUNT, mClipToBounds); + renderer.restoreToCount(restoreTo); + renderer.setOverrideLayerAlpha(1.0f); return; } |
