Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: sky/sdk/lib/painting/shadows.dart

Issue 1241443002: Reduce the quality of the blur in the material shadows (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 import 'dart:sky' as sky; 5 import 'dart:sky' as sky;
6 6
7 /// Helper class to build a Paint DrawLooper that adds shadows to the Paint's 7 /// Helper class to build a Paint DrawLooper that adds shadows to the Paint's
8 /// operation. 8 /// operation.
9 class ShadowDrawLooperBuilder { 9 class ShadowDrawLooperBuilder {
10 var builder_ = new sky.LayerDrawLooperBuilder(); 10 var builder_ = new sky.LayerDrawLooperBuilder();
11 11
12 void addShadow(sky.Offset offset, sky.Color color, double blur) { 12 void addShadow(sky.Offset offset, sky.Color color, double blur) {
13 builder_.addLayerOnTop( 13 builder_.addLayerOnTop(
14 new sky.DrawLooperLayerInfo() 14 new sky.DrawLooperLayerInfo()
15 ..setPaintBits(sky.PaintBits.all) 15 ..setPaintBits(sky.PaintBits.all)
16 ..setOffset(offset) 16 ..setOffset(offset)
17 ..setColorMode(sky.TransferMode.src), 17 ..setColorMode(sky.TransferMode.src),
18 (sky.Paint layerPaint) { 18 (sky.Paint layerPaint) {
19 layerPaint.color = color; 19 layerPaint.color = color;
20 layerPaint.setMaskFilter( 20 layerPaint.setMaskFilter(
21 new sky.MaskFilter.blur(sky.BlurStyle.normal, 21 new sky.MaskFilter.blur(sky.BlurStyle.normal, blur));
22 blur,
23 highQuality: true));
24 }); 22 });
25 } 23 }
26 24
27 sky.DrawLooper build() { 25 sky.DrawLooper build() {
28 builder_.addLayerOnTop(new sky.DrawLooperLayerInfo(), (_) {}); 26 builder_.addLayerOnTop(new sky.DrawLooperLayerInfo(), (_) {});
29 return builder_.build(); 27 return builder_.build();
30 } 28 }
31 } 29 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698