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

Side by Side Diff: skia/ext/paint_simplifier.cc

Issue 12207157: New class to simplify rasterization. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « skia/ext/paint_simplifier.h ('k') | skia/skia.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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 #include "skia/ext/paint_simplifier.h"
6 #include "third_party/skia/include/core/SkPaint.h"
7
8 namespace skia {
9
10 PaintSimplifier::PaintSimplifier()
11 : INHERITED() {
12
13 }
14
15 PaintSimplifier::~PaintSimplifier() {
16
17 }
18
19 bool PaintSimplifier::filter(SkPaint* paint, Type type) {
20
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);
25 }
26 paint->setSubpixelText(false);
27 paint->setLCDRenderText(false);
28
29 paint->setFilterBitmap(false);
30 paint->setMaskFilter(NULL);
31
32 // Uncomment this line to shade simplified tiles pink during debugging.
33 //paint->setColor(SkColorSetRGB(255, 127, 127));
34
35 return true;
36 }
37
38
39 } // namespace skia
40
41
OLDNEW
« no previous file with comments | « skia/ext/paint_simplifier.h ('k') | skia/skia.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698