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.
5 #include "skia/ext/paint_simplifier.h"
6 #include "third_party/skia/include/core/SkPaint.h"
10 PaintSimplifier::PaintSimplifier()
15 PaintSimplifier::~PaintSimplifier() {
19 bool PaintSimplifier::filter(SkPaint
* paint
, Type type
) {
21 // Preserve a modicum of text quality; black & white text is
22 // just too blocky, even during a fling.
23 if (type
!= kText_Type
) {
24 paint
->setAntiAlias(false);
26 paint
->setSubpixelText(false);
27 paint
->setLCDRenderText(false);
29 paint
->setFilterBitmap(false);
30 paint
->setMaskFilter(NULL
);
32 // Uncomment this line to shade simplified tiles pink during debugging.
33 //paint->setColor(SkColorSetRGB(255, 127, 127));