зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1186278 - Regression: Some doorhangers have round-corner-looking artifacts; r=sebastian
--HG-- extra : commitid : FqOBLlpZdcm extra : rebase_source : 92b65649abd52598e74777afbef09727db6fca4c
This commit is contained in:
Родитель
bf3b67755b
Коммит
f46358bcc3
|
@ -54,6 +54,16 @@ public class RoundedCornerLayout extends LinearLayout {
|
|||
setWillNotDraw(false);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onLayout(final boolean changed, final int l, final int t, final int r, final int b) {
|
||||
super.onLayout(changed, l, t, r, b);
|
||||
if (changed) {
|
||||
maskBitmap = createMask(r, b);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void draw(Canvas canvas) {
|
||||
Bitmap offscreenBitmap = Bitmap.createBitmap(canvas.getWidth(), canvas.getHeight(), Bitmap.Config.ARGB_8888);
|
||||
|
@ -61,10 +71,6 @@ public class RoundedCornerLayout extends LinearLayout {
|
|||
|
||||
super.draw(offscreenCanvas);
|
||||
|
||||
if (maskBitmap == null) {
|
||||
maskBitmap = createMask(canvas.getWidth(), canvas.getHeight());
|
||||
}
|
||||
|
||||
offscreenCanvas.drawBitmap(maskBitmap, 0f, 0f, maskPaint);
|
||||
canvas.drawBitmap(offscreenBitmap, 0f, 0f, paint);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче