Merge "Merge "Fix a NPE with outlineProvider="none"" am: 46a4fbb2e4 am: 65d65ec14b am: a3460f2bb1" into oc-dev-plus-aosp
This commit is contained in:
committed by
Android (Google) Code Review
commit
939ba35913
@@ -50,12 +50,14 @@ public class ViewGroup_Delegate {
|
||||
// the outline obtained is correct.
|
||||
child.setBackgroundBounds();
|
||||
ViewOutlineProvider outlineProvider = child.getOutlineProvider();
|
||||
Outline outline = child.mAttachInfo.mTmpOutline;
|
||||
outlineProvider.getOutline(child, outline);
|
||||
if (outline.mPath != null || (outline.mRect != null && !outline.mRect.isEmpty())) {
|
||||
int restoreTo = transformCanvas(thisVG, canvas, child);
|
||||
drawShadow(thisVG, canvas, child, outline);
|
||||
canvas.restoreToCount(restoreTo);
|
||||
if (outlineProvider != null) {
|
||||
Outline outline = child.mAttachInfo.mTmpOutline;
|
||||
outlineProvider.getOutline(child, outline);
|
||||
if (outline.mPath != null || (outline.mRect != null && !outline.mRect.isEmpty())) {
|
||||
int restoreTo = transformCanvas(thisVG, canvas, child);
|
||||
drawShadow(thisVG, canvas, child, outline);
|
||||
canvas.restoreToCount(restoreTo);
|
||||
}
|
||||
}
|
||||
}
|
||||
return thisVG.drawChild_Original(canvas, child, drawingTime);
|
||||
|
||||
Reference in New Issue
Block a user