am a0fb87a3: am 98c3461a: Merge "Do not paint shadow if outside of the clip area" into lmp-dev automerge: a912fed automerge: d66f2eb

automerge: 412e643

* commit '412e6439b2d372565f14cc1dce0ff25f106975af':
  Do not paint shadow if outside of the clip area
This commit is contained in:
Diego Perez
2015-02-17 23:38:48 +00:00
committed by android-build-merger

View File

@@ -71,8 +71,10 @@ public class ViewGroup_Delegate {
int x = 0;
if (outline.mRect != null) {
Shadow s = getRectShadow(parent, canvas, child, outline);
shadow = s.mShadow;
x = -s.mShadowWidth;
if (s != null) {
shadow = s.mShadow;
x = -s.mShadowWidth;
}
} else if (outline.mPath != null) {
shadow = getPathShadow(child, outline, canvas);
}
@@ -132,6 +134,9 @@ public class ViewGroup_Delegate {
private static BufferedImage getPathShadow(View child, Outline outline, Canvas canvas) {
Rect clipBounds = canvas.getClipBounds();
if (clipBounds.isEmpty()) {
return null;
}
BufferedImage image = new BufferedImage(clipBounds.width(), clipBounds.height(),
BufferedImage.TYPE_INT_ARGB);
Graphics2D graphics = image.createGraphics();