Index: skia/ext/paint_simplifier.cc |
diff --git a/skia/ext/paint_simplifier.cc b/skia/ext/paint_simplifier.cc |
index 8df91a888a42cd07eb8c650caa94c570c52b66a7..c86825788bd0af3a79ccc9a2a9b32ac038ba37ce 100644 |
--- a/skia/ext/paint_simplifier.cc |
+++ b/skia/ext/paint_simplifier.cc |
@@ -2,6 +2,8 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
+#include <limits> |
+ |
#include "skia/ext/paint_simplifier.h" |
#include "third_party/skia/include/core/SkPaint.h" |
@@ -26,6 +28,12 @@ bool PaintSimplifier::filter(SkPaint* paint, Type type) { |
paint->setSubpixelText(false); |
paint->setLCDRenderText(false); |
+ // Reduce filter level to medium or less. Note that reducing the filter to |
+ // less than medium can have a negative effect on performance as the filtered |
+ // image is not cached in this case. |
+ paint->setFilterLevel( |
+ std::min(paint->getFilterLevel(), SkPaint::kMedium_FilterLevel)); |
+ |
paint->setMaskFilter(NULL); |
// Uncomment this line to shade simplified tiles pink during debugging. |