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

Side by Side Diff: samplecode/SampleFilter.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 | « samplecode/SampleCamera.cpp ('k') | samplecode/SampleFilter2.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "SampleCode.h" 8 #include "SampleCode.h"
9 #include "SkView.h" 9 #include "SkView.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 29 matching lines...) Expand all
40 } 40 }
41 41
42 static SkScalar draw_bm(SkCanvas* canvas, const SkBitmap& bm, 42 static SkScalar draw_bm(SkCanvas* canvas, const SkBitmap& bm,
43 SkScalar x, SkScalar y, SkPaint* paint) { 43 SkScalar x, SkScalar y, SkPaint* paint) {
44 canvas->drawBitmap(bm, x, y, paint); 44 canvas->drawBitmap(bm, x, y, paint);
45 return SkIntToScalar(bm.width()) * 5/4; 45 return SkIntToScalar(bm.width()) * 5/4;
46 } 46 }
47 47
48 static SkScalar draw_set(SkCanvas* c, const SkBitmap& bm, SkScalar x, SkPaint* p ) { 48 static SkScalar draw_set(SkCanvas* c, const SkBitmap& bm, SkScalar x, SkPaint* p ) {
49 x += draw_bm(c, bm, x, 0, p); 49 x += draw_bm(c, bm, x, 0, p);
50 p->setFilterLevel(SkPaint::kLow_FilterLevel); 50 p->setFilterQuality(kLow_SkFilterQuality);
51 x += draw_bm(c, bm, x, 0, p); 51 x += draw_bm(c, bm, x, 0, p);
52 p->setDither(true); 52 p->setDither(true);
53 return x + draw_bm(c, bm, x, 0, p); 53 return x + draw_bm(c, bm, x, 0, p);
54 } 54 }
55 55
56 static SkScalar draw_row(SkCanvas* canvas, const SkBitmap& bm) { 56 static SkScalar draw_row(SkCanvas* canvas, const SkBitmap& bm) {
57 SkAutoCanvasRestore acr(canvas, true); 57 SkAutoCanvasRestore acr(canvas, true);
58 58
59 SkPaint paint; 59 SkPaint paint;
60 SkScalar x = 0; 60 SkScalar x = 0;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 } 113 }
114 114
115 private: 115 private:
116 typedef SampleView INHERITED; 116 typedef SampleView INHERITED;
117 }; 117 };
118 118
119 ////////////////////////////////////////////////////////////////////////////// 119 //////////////////////////////////////////////////////////////////////////////
120 120
121 static SkView* MyFactory() { return new FilterView; } 121 static SkView* MyFactory() { return new FilterView; }
122 static SkViewRegister reg(MyFactory); 122 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/SampleCamera.cpp ('k') | samplecode/SampleFilter2.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698