diff options
author | Chet Haase <chet@google.com> | 2012-10-23 12:54:51 -0700 |
---|---|---|
committer | Chet Haase <chet@google.com> | 2012-10-23 15:30:15 -0700 |
commit | 3561d062ff01f3455c984e4cfcd101a64a2e902f (patch) | |
tree | 200f8761630bcb930a6b5fa4ddf410e54a958932 /libs | |
parent | 74437532fe2a3e9ebd15c61327fd3f2b68c299b3 (diff) | |
download | frameworks_base-3561d062ff01f3455c984e4cfcd101a64a2e902f.zip frameworks_base-3561d062ff01f3455c984e4cfcd101a64a2e902f.tar.gz frameworks_base-3561d062ff01f3455c984e4cfcd101a64a2e902f.tar.bz2 |
Handle offscreen animations correctly
A bug in software rendering caused animations on views that are offscreen
to not get drawn, therefore the animation doesn't continue (since old-style
animations depend on the logic in the drawing code to keep running). Fix is
to special case the isAnimating case in ViewRoot to go ahead and schedule
a traversal even if the dirty rect does not intersect with the visible region.
Issue #7396035 Animations starting offscreen don't draw run/end/draw properly (sw rendering only)
Change-Id: Iae25b3a424ddc5a16ba431ecd68cf42d5500db3f
Diffstat (limited to 'libs')
-rw-r--r-- | libs/hwui/DisplayListRenderer.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/libs/hwui/DisplayListRenderer.cpp b/libs/hwui/DisplayListRenderer.cpp index 81e68bd..7a38b40 100644 --- a/libs/hwui/DisplayListRenderer.cpp +++ b/libs/hwui/DisplayListRenderer.cpp @@ -763,16 +763,17 @@ void DisplayList::outputViewProperties(OpenGLRenderer& renderer, char* indent) { } } if (mAlpha < 1 && !mCaching) { - // TODO: should be able to store the size of a DL at record time and not - // have to pass it into this call. In fact, this information might be in the - // location/size info that we store with the new native transform data. - int flags = SkCanvas::kHasAlphaLayer_SaveFlag; - if (mClipChildren) { - flags |= SkCanvas::kClipToLayer_SaveFlag; + if (!mHasOverlappingRendering) { + ALOGD("%s%s %.2f", indent, "SetAlpha", mAlpha); + } else { + int flags = SkCanvas::kHasAlphaLayer_SaveFlag; + if (mClipChildren) { + flags |= SkCanvas::kClipToLayer_SaveFlag; + } + ALOGD("%s%s %.2f, %.2f, %.2f, %.2f, %d, 0x%x", indent, "SaveLayerAlpha", + (float) 0, (float) 0, (float) mRight - mLeft, (float) mBottom - mTop, + mMultipliedAlpha, flags); } - ALOGD("%s%s %.2f, %.2f, %.2f, %.2f, %d, 0x%x", indent, "SaveLayerAlpha", - (float) 0, (float) 0, (float) mRight - mLeft, (float) mBottom - mTop, - mMultipliedAlpha, flags); } if (mClipChildren) { ALOGD("%s%s %.2f, %.2f, %.2f, %.2f", indent, "ClipRect", 0.0f, 0.0f, |