Commit f8b4af94 authored by Matt Perry's avatar Matt Perry

Expose and use constants for DrawLooperLayerInfo.setPaintBits to dart.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1175403002.
parent 5d676f85
...@@ -51,7 +51,7 @@ void main() { ...@@ -51,7 +51,7 @@ void main() {
new DrawLooperLayerInfo() new DrawLooperLayerInfo()
..setOffset(const Point(150.0, 0.0)) ..setOffset(const Point(150.0, 0.0))
..setColorMode(TransferMode.srcMode) ..setColorMode(TransferMode.srcMode)
..setPaintBits(-1), ..setPaintBits(PaintBits.all),
(Paint layerPaint) { (Paint layerPaint) {
layerPaint.color = const Color.fromARGB(128, 255, 255, 0); layerPaint.color = const Color.fromARGB(128, 255, 255, 0);
layerPaint.setColorFilter( layerPaint.setColorFilter(
...@@ -64,13 +64,16 @@ void main() { ...@@ -64,13 +64,16 @@ void main() {
new DrawLooperLayerInfo() new DrawLooperLayerInfo()
..setOffset(const Point(75.0, 75.0)) ..setOffset(const Point(75.0, 75.0))
..setColorMode(TransferMode.srcMode) ..setColorMode(TransferMode.srcMode)
..setPaintBits(-1), ..setPaintBits(PaintBits.shader),
(Paint layerPaint) { (Paint layerPaint) {
Gradient redYellow = new Gradient.radial( Gradient redYellow = new Gradient.radial(
new Point(0.0, 0.0), radius/3.0, new Point(0.0, 0.0), radius/3.0,
[const Color(0xFFFFFF00), const Color(0xFFFF0000)], [const Color(0xFFFFFF00), const Color(0xFFFF0000)],
null, TileMode.mirror); null, TileMode.mirror);
layerPaint.setShader(redYellow); 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( ..addLayerOnTop(
new DrawLooperLayerInfo()..setOffset(const Point(225.0, 75.0)), new DrawLooperLayerInfo()..setOffset(const Point(225.0, 75.0)),
......
...@@ -15,7 +15,7 @@ void beginFrame(double timeStamp) { ...@@ -15,7 +15,7 @@ void beginFrame(double timeStamp) {
// Shadow layer. // Shadow layer.
..addLayerOnTop( ..addLayerOnTop(
new DrawLooperLayerInfo() new DrawLooperLayerInfo()
..setPaintBits(-1) ..setPaintBits(PaintBits.all)
..setOffset(const Point(5.0, 5.0)) ..setOffset(const Point(5.0, 5.0))
..setColorMode(TransferMode.srcInMode), ..setColorMode(TransferMode.srcInMode),
(Paint layerPaint) { (Paint layerPaint) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment