1// Copyright (c) 2013 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5#ifndef SKIA_EXT_PAINT_SIMPLIFIER_H 6#define SKIA_EXT_PAINT_SIMPLIFIER_H 7 8#include "base/values.h" 9#include "third_party/skia/include/core/SkDrawFilter.h" 10 11class SkPaint; 12 13namespace skia { 14 15/* 16 When installed on a SkCanvas, reduces the quality of all draws 17 to that canvas. This improves rasterization speed during flings. 18 We turn off blurs, filters, and antialiasing *except for* text. 19*/ 20class SK_API PaintSimplifier : public SkDrawFilter { 21 public: 22 PaintSimplifier(); 23 virtual ~PaintSimplifier(); 24 virtual bool filter(SkPaint*, Type) OVERRIDE; 25 26 private: 27 typedef SkDrawFilter INHERITED; 28}; 29 30} // namespace skia 31 32#endif // SKIA_EXT_PAINT_SIMPLIFIER_H 33 34