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

Side by Side Diff: samplecode/SampleTiling.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/SampleTextureDomain.cpp ('k') | samplecode/SampleVertices.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 26 matching lines...) Expand all
37 paint.setDither(true); 37 paint.setDither(true);
38 paint.setShader(SkGradientShader::CreateLinear(pts, colors, pos, 38 paint.setShader(SkGradientShader::CreateLinear(pts, colors, pos,
39 SK_ARRAY_COUNT(colors), SkShader::kClamp_TileMode))->unref(); 39 SK_ARRAY_COUNT(colors), SkShader::kClamp_TileMode))->unref();
40 canvas.drawPaint(paint); 40 canvas.drawPaint(paint);
41 } 41 }
42 42
43 static void setup(SkPaint* paint, const SkBitmap& bm, bool filter, 43 static void setup(SkPaint* paint, const SkBitmap& bm, bool filter,
44 SkShader::TileMode tmx, SkShader::TileMode tmy) { 44 SkShader::TileMode tmx, SkShader::TileMode tmy) {
45 SkShader* shader = SkShader::CreateBitmapShader(bm, tmx, tmy); 45 SkShader* shader = SkShader::CreateBitmapShader(bm, tmx, tmy);
46 paint->setShader(shader)->unref(); 46 paint->setShader(shader)->unref();
47 paint->setFilterLevel(filter ? SkPaint::kLow_FilterLevel : SkPaint::kNone_Fi lterLevel); 47 paint->setFilterQuality(filter ? kLow_SkFilterQuality : kNone_SkFilterQualit y);
48 } 48 }
49 49
50 static const SkColorType gColorTypes[] = { 50 static const SkColorType gColorTypes[] = {
51 kN32_SkColorType, 51 kN32_SkColorType,
52 kRGB_565_SkColorType, 52 kRGB_565_SkColorType,
53 }; 53 };
54 static const int gWidth = 32; 54 static const int gWidth = 32;
55 static const int gHeight = 32; 55 static const int gHeight = 32;
56 56
57 class TilingView : public SampleView { 57 class TilingView : public SampleView {
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 } 162 }
163 163
164 private: 164 private:
165 typedef SampleView INHERITED; 165 typedef SampleView INHERITED;
166 }; 166 };
167 167
168 ////////////////////////////////////////////////////////////////////////////// 168 //////////////////////////////////////////////////////////////////////////////
169 169
170 static SkView* MyFactory() { return new TilingView; } 170 static SkView* MyFactory() { return new TilingView; }
171 static SkViewRegister reg(MyFactory); 171 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/SampleTextureDomain.cpp ('k') | samplecode/SampleVertices.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698