Automated import from //branches/cupcake/...@142818,142818
This commit is contained in:
committed by
The Android Open Source Project
parent
b3b366a7a5
commit
d6ab043da8
@@ -1208,11 +1208,9 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
|
||||
final boolean clipToPadding = (flags & CLIP_TO_PADDING_MASK) == CLIP_TO_PADDING_MASK;
|
||||
if (clipToPadding) {
|
||||
saveCount = canvas.save();
|
||||
final int scrollX = mScrollX;
|
||||
final int scrollY = mScrollY;
|
||||
canvas.clipRect(scrollX + mPaddingLeft, scrollY + mPaddingTop,
|
||||
scrollX + mRight - mLeft - mPaddingRight,
|
||||
scrollY + mBottom - mTop - mPaddingBottom);
|
||||
canvas.clipRect(mScrollX + mPaddingLeft, mScrollY + mPaddingTop,
|
||||
mScrollX + mRight - mLeft - mPaddingRight,
|
||||
mScrollY + mBottom - mTop - mPaddingBottom);
|
||||
|
||||
}
|
||||
|
||||
@@ -1346,9 +1344,6 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
|
||||
final Animation a = child.getAnimation();
|
||||
boolean concatMatrix = false;
|
||||
|
||||
final int childWidth = cr - cl;
|
||||
final int childHeight = cb - ct;
|
||||
|
||||
if (a != null) {
|
||||
if (mInvalidateRegion == null) {
|
||||
mInvalidateRegion = new RectF();
|
||||
@@ -1357,8 +1352,8 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
|
||||
|
||||
final boolean initialized = a.isInitialized();
|
||||
if (!initialized) {
|
||||
a.initialize(childWidth, childHeight, getWidth(), getHeight());
|
||||
a.initializeInvalidateRegion(0, 0, childWidth, childHeight);
|
||||
a.initialize(cr - cl, cb - ct, getWidth(), getHeight());
|
||||
a.initializeInvalidateRegion(0, 0, cr - cl, cb - ct);
|
||||
child.onAnimationStart();
|
||||
}
|
||||
|
||||
@@ -1382,7 +1377,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
|
||||
invalidate(cl, ct, cr, cb);
|
||||
}
|
||||
} else {
|
||||
a.getInvalidateRegion(0, 0, childWidth, childHeight, region, transformToApply);
|
||||
a.getInvalidateRegion(0, 0, cr - cl, cb - ct, region, transformToApply);
|
||||
|
||||
// The child need to draw an animation, potentially offscreen, so
|
||||
// make sure we do not cancel invalidate requests
|
||||
@@ -1474,9 +1469,9 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
|
||||
|
||||
if ((flags & FLAG_CLIP_CHILDREN) == FLAG_CLIP_CHILDREN) {
|
||||
if (hasNoCache) {
|
||||
canvas.clipRect(sx, sy, sx + childWidth, sy + childHeight);
|
||||
canvas.clipRect(sx, sy, sx + (cr - cl), sy + (cb - ct));
|
||||
} else {
|
||||
canvas.clipRect(0, 0, childWidth, childHeight);
|
||||
canvas.clipRect(0, 0, cr - cl, cb - ct);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user