Merge "Fix ViewGroupOverlay's handling of invalidating viewgroups"
This commit is contained in:
@@ -4426,8 +4426,10 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
|
||||
/**
|
||||
* Quick invalidation method that simply transforms the dirty rect into the parent's
|
||||
* coordinate system, pruning the invalidation if the parent has already been invalidated.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
private ViewParent invalidateChildInParentFast(int left, int top, final Rect dirty) {
|
||||
protected ViewParent invalidateChildInParentFast(int left, int top, final Rect dirty) {
|
||||
if ((mPrivateFlags & PFLAG_DRAWN) == PFLAG_DRAWN ||
|
||||
(mPrivateFlags & PFLAG_DRAWING_CACHE_VALID) == PFLAG_DRAWING_CACHE_VALID) {
|
||||
dirty.offset(left - mScrollX, top - mScrollY);
|
||||
|
||||
@@ -300,6 +300,17 @@ public class ViewOverlay {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
@Override
|
||||
protected ViewParent invalidateChildInParentFast(int left, int top, Rect dirty) {
|
||||
if (mHostView instanceof ViewGroup) {
|
||||
return ((ViewGroup) mHostView).invalidateChildInParentFast(left, top, dirty);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ViewParent invalidateChildInParent(int[] location, Rect dirty) {
|
||||
if (mHostView != null) {
|
||||
|
||||
Reference in New Issue
Block a user