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

Unified Diff: skia/ext/paint_simplifier.cc

Issue 305623008: skia: Use medium filter quality in PaintSimplifier. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reduce filter level instead of always forcing it to medium Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« 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