Set default outline alpha to 1.0f

bug:16795461
Change-Id: I7ccecee84b47a2bbf91fc11ad3005160f913ba77
This commit is contained in:
Chris Craik
2014-08-04 13:42:18 -07:00
parent b942035837
commit 6efd17588b
2 changed files with 6 additions and 4 deletions

View File

@@ -10830,13 +10830,14 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
// Unattached views ignore this signal, and outline is recomputed in onAttachedToWindow()
if (mAttachInfo == null) return;
final Outline outline = mAttachInfo.mTmpOutline;
outline.setEmpty();
if (mOutlineProvider == null) {
// no provider, remove outline
mRenderNode.setOutline(null);
} else {
final Outline outline = mAttachInfo.mTmpOutline;
outline.setEmpty();
outline.setAlpha(1.0f);
mOutlineProvider.getOutline(this, outline);
mRenderNode.setOutline(outline);
}

View File

@@ -37,7 +37,6 @@ public abstract class ViewOutlineProvider {
if (background != null) {
background.getOutline(outline);
} else {
outline.setRect(0, 0, view.getWidth(), view.getHeight());
outline.setAlpha(0.0f);
}
@@ -51,6 +50,8 @@ public abstract class ViewOutlineProvider {
* View's size changes, or if {@link View#invalidateOutline()} is called
* explicitly.
*
* The input outline is empty and has an alpha of <code>1.0f</code>.
*
* @param view The view building the outline.
* @param outline The empty outline to be populated.
*/