Fix build
I removed these functions by mistake in my previous patch.
This commit is contained in:
parent
10fe17a994
commit
1883d06aef
@ -181,6 +181,13 @@ class PaintingContext {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Paint _getPaintForAlpha(int alpha) {
|
||||||
|
return new Paint()
|
||||||
|
..color = new Color.fromARGB(alpha, 0, 0, 0)
|
||||||
|
..setTransferMode(sky.TransferMode.srcOver)
|
||||||
|
..isAntiAlias = false;
|
||||||
|
}
|
||||||
|
|
||||||
void paintChildWithOpacity(RenderObject child,
|
void paintChildWithOpacity(RenderObject child,
|
||||||
Point childPosition,
|
Point childPosition,
|
||||||
Rect bounds,
|
Rect bounds,
|
||||||
@ -188,7 +195,7 @@ class PaintingContext {
|
|||||||
assert(debugCanPaintChild(child));
|
assert(debugCanPaintChild(child));
|
||||||
final Offset childOffset = childPosition.toOffset();
|
final Offset childOffset = childPosition.toOffset();
|
||||||
if (!child.needsCompositing) {
|
if (!child.needsCompositing) {
|
||||||
canvas.saveLayer(bounds, OpacityLayer.paintForAlpha(alpha));
|
canvas.saveLayer(bounds, _getPaintForAlpha(alpha));
|
||||||
canvas.translate(childOffset.dx, childOffset.dy);
|
canvas.translate(childOffset.dx, childOffset.dy);
|
||||||
insertChild(child, Offset.zero);
|
insertChild(child, Offset.zero);
|
||||||
canvas.restore();
|
canvas.restore();
|
||||||
@ -202,6 +209,12 @@ class PaintingContext {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Paint _getPaintForColorFilter(Color color, sky.TransferMode transferMode) {
|
||||||
|
return new Paint()
|
||||||
|
..setColorFilter(new sky.ColorFilter.mode(color, transferMode))
|
||||||
|
..isAntiAlias = false;
|
||||||
|
}
|
||||||
|
|
||||||
void paintChildWithColorFilter(RenderObject child,
|
void paintChildWithColorFilter(RenderObject child,
|
||||||
Point childPosition,
|
Point childPosition,
|
||||||
Rect bounds,
|
Rect bounds,
|
||||||
@ -210,7 +223,7 @@ class PaintingContext {
|
|||||||
assert(debugCanPaintChild(child));
|
assert(debugCanPaintChild(child));
|
||||||
final Offset childOffset = childPosition.toOffset();
|
final Offset childOffset = childPosition.toOffset();
|
||||||
if (!child.needsCompositing) {
|
if (!child.needsCompositing) {
|
||||||
canvas.saveLayer(bounds, ColorFilterLayer.paintForColorFilter(color, transferMode));
|
canvas.saveLayer(bounds, _getPaintForColorFilter(color, transferMode));
|
||||||
canvas.translate(childOffset.dx, childOffset.dy);
|
canvas.translate(childOffset.dx, childOffset.dy);
|
||||||
insertChild(child, Offset.zero);
|
insertChild(child, Offset.zero);
|
||||||
canvas.restore();
|
canvas.restore();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user