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

Side by Side Diff: gm/bitmapfilters.cpp

Issue 1014533004: SkPaint::FilterLevel -> SkFilterQuality (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « gm/bigmatrix.cpp ('k') | gm/bleed.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "gm.h" 8 #include "gm.h"
9 #include "sk_tool_utils.h" 9 #include "sk_tool_utils.h"
10 10
(...skipping 23 matching lines...) Expand all
34 34
35 static SkScalar draw_bm(SkCanvas* canvas, const SkBitmap& bm, 35 static SkScalar draw_bm(SkCanvas* canvas, const SkBitmap& bm,
36 SkScalar x, SkScalar y, SkPaint* paint) { 36 SkScalar x, SkScalar y, SkPaint* paint) {
37 canvas->drawBitmap(bm, x, y, paint); 37 canvas->drawBitmap(bm, x, y, paint);
38 return SkIntToScalar(bm.width()) * 5/4; 38 return SkIntToScalar(bm.width()) * 5/4;
39 } 39 }
40 40
41 static SkScalar draw_set(SkCanvas* c, const SkBitmap& bm, SkScalar x, 41 static SkScalar draw_set(SkCanvas* c, const SkBitmap& bm, SkScalar x,
42 SkPaint* p) { 42 SkPaint* p) {
43 x += draw_bm(c, bm, x, 0, p); 43 x += draw_bm(c, bm, x, 0, p);
44 p->setFilterLevel(SkPaint::kLow_FilterLevel); 44 p->setFilterQuality(kLow_SkFilterQuality);
45 x += draw_bm(c, bm, x, 0, p); 45 x += draw_bm(c, bm, x, 0, p);
46 p->setDither(true); 46 p->setDither(true);
47 return x + draw_bm(c, bm, x, 0, p); 47 return x + draw_bm(c, bm, x, 0, p);
48 } 48 }
49 49
50 static SkScalar draw_row(SkCanvas* canvas, const SkBitmap& bm) { 50 static SkScalar draw_row(SkCanvas* canvas, const SkBitmap& bm) {
51 SkAutoCanvasRestore acr(canvas, true); 51 SkAutoCanvasRestore acr(canvas, true);
52 52
53 SkPaint paint; 53 SkPaint paint;
54 SkScalar x = 0; 54 SkScalar x = 0;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 private: 117 private:
118 typedef GM INHERITED; 118 typedef GM INHERITED;
119 }; 119 };
120 120
121 ////////////////////////////////////////////////////////////////////////////// 121 //////////////////////////////////////////////////////////////////////////////
122 122
123 static GM* MyFactory(void*) { return new FilterGM; } 123 static GM* MyFactory(void*) { return new FilterGM; }
124 static GMRegistry reg(MyFactory); 124 static GMRegistry reg(MyFactory);
125 125
126 } 126 }
OLDNEW
« no previous file with comments | « gm/bigmatrix.cpp ('k') | gm/bleed.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698