Expose and use constants for DrawLooperLayerInfo.setPaintBits to dart.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1175403002.
This commit is contained in:
Matt Perry 2015-06-11 15:41:12 -04:00
parent 5d676f8549
commit f8b4af944c
2 changed files with 6 additions and 3 deletions

View file

@ -51,7 +51,7 @@ void main() {
new DrawLooperLayerInfo()
..setOffset(const Point(150.0, 0.0))
..setColorMode(TransferMode.srcMode)
..setPaintBits(-1),
..setPaintBits(PaintBits.all),
(Paint layerPaint) {
layerPaint.color = const Color.fromARGB(128, 255, 255, 0);
layerPaint.setColorFilter(
@ -64,13 +64,16 @@ void main() {
new DrawLooperLayerInfo()
..setOffset(const Point(75.0, 75.0))
..setColorMode(TransferMode.srcMode)
..setPaintBits(-1),
..setPaintBits(PaintBits.shader),
(Paint layerPaint) {
Gradient redYellow = new Gradient.radial(
new Point(0.0, 0.0), radius/3.0,
[const Color(0xFFFFFF00), const Color(0xFFFF0000)],
null, TileMode.mirror);
layerPaint.setShader(redYellow);
// Since we're don't set PaintBits.maskFilter, this has no effect.
layerPaint.setMaskFilter(
new MaskFilter.blur(BlurStyle.normal, 50.0, highQuality: true));
})
..addLayerOnTop(
new DrawLooperLayerInfo()..setOffset(const Point(225.0, 75.0)),

View file

@ -15,7 +15,7 @@ void beginFrame(double timeStamp) {
// Shadow layer.
..addLayerOnTop(
new DrawLooperLayerInfo()
..setPaintBits(-1)
..setPaintBits(PaintBits.all)
..setOffset(const Point(5.0, 5.0))
..setColorMode(TransferMode.srcInMode),
(Paint layerPaint) {