<commit_before>// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'dart:sky' as sky;

/// Helper class to build a Paint DrawLooper that adds shadows to the Paint's
/// operation.
class ShadowDrawLooperBuilder {
  var builder_ = new sky.LayerDrawLooperBuilder();

  void addShadow(sky.Offset offset, sky.Color color, double blur) {
    builder_.addLayerOnTop(
          new sky.DrawLooperLayerInfo()
            ..setPaintBits(sky.PaintBits.all)
            ..setOffset(offset)
            ..setColorMode(sky.TransferMode.src),
          (sky.Paint layerPaint) {
        layerPaint.color = color;
        layerPaint.setMaskFilter(
          new sky.MaskFilter.blur(sky.BlurStyle.normal,
                                  blur,
                                  highQuality: true));
      });
  }

  sky.DrawLooper build() {
    builder_.addLayerOnTop(new sky.DrawLooperLayerInfo(), (_) {});
    return builder_.build();
  }
}<commit_msg>Reduce the quality of the blur in the material shadows<commit_after>// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import 'dart:sky' as sky;

/// Helper class to build a Paint DrawLooper that adds shadows to the Paint's
/// operation.
class ShadowDrawLooperBuilder {
  var builder_ = new sky.LayerDrawLooperBuilder();

  void addShadow(sky.Offset offset, sky.Color color, double blur) {
    builder_.addLayerOnTop(
          new sky.DrawLooperLayerInfo()
            ..setPaintBits(sky.PaintBits.all)
            ..setOffset(offset)
            ..setColorMode(sky.TransferMode.src),
          (sky.Paint layerPaint) {
        layerPaint.color = color;
        layerPaint.setMaskFilter(
          new sky.MaskFilter.blur(sky.BlurStyle.normal, blur));
      });
  }

  sky.DrawLooper build() {
    builder_.addLayerOnTop(new sky.DrawLooperLayerInfo(), (_) {});
    return builder_.build();
  }
}
{'fraction_non_alphanumeric': 0.10144927536231885, 'fraction_numerical': 0.003864734299516908, 'mean_word_length': 2.558419243986254, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '502426', 'n_tokens_mistral': 605, 'n_tokens_neox': 578, 'n_words': 169}