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

Side by Side Diff: gm/tilemodes.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/tiledscaledbitmap.cpp ('k') | gm/tilemodes_scaled.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 "gm.h" 8 #include "gm.h"
9 #include "SkPath.h" 9 #include "SkPath.h"
10 #include "SkRegion.h" 10 #include "SkRegion.h"
(...skipping 20 matching lines...) Expand all
31 paint.setDither(true); 31 paint.setDither(true);
32 paint.setShader(SkGradientShader::CreateLinear(pts, colors, pos, 32 paint.setShader(SkGradientShader::CreateLinear(pts, colors, pos,
33 SK_ARRAY_COUNT(colors), SkShader::kClamp_TileMode))->unref(); 33 SK_ARRAY_COUNT(colors), SkShader::kClamp_TileMode))->unref();
34 canvas.drawPaint(paint); 34 canvas.drawPaint(paint);
35 } 35 }
36 36
37 static void setup(SkPaint* paint, const SkBitmap& bm, bool filter, 37 static void setup(SkPaint* paint, const SkBitmap& bm, bool filter,
38 SkShader::TileMode tmx, SkShader::TileMode tmy) { 38 SkShader::TileMode tmx, SkShader::TileMode tmy) {
39 SkShader* shader = SkShader::CreateBitmapShader(bm, tmx, tmy); 39 SkShader* shader = SkShader::CreateBitmapShader(bm, tmx, tmy);
40 paint->setShader(shader)->unref(); 40 paint->setShader(shader)->unref();
41 paint->setFilterLevel(filter ? SkPaint::kLow_FilterLevel : SkPaint::kNone_Fi lterLevel); 41 paint->setFilterQuality(filter ? kLow_SkFilterQuality : kNone_SkFilterQualit y);
42 } 42 }
43 43
44 static const SkColorType gColorTypes[] = { 44 static const SkColorType gColorTypes[] = {
45 kN32_SkColorType, 45 kN32_SkColorType,
46 kRGB_565_SkColorType, 46 kRGB_565_SkColorType,
47 }; 47 };
48 48
49 class TilingGM : public skiagm::GM { 49 class TilingGM : public skiagm::GM {
50 public: 50 public:
51 TilingGM(bool powerOfTwoSize) 51 TilingGM(bool powerOfTwoSize)
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 private: 257 private:
258 typedef skiagm::GM INHERITED; 258 typedef skiagm::GM INHERITED;
259 }; 259 };
260 260
261 ////////////////////////////////////////////////////////////////////////////// 261 //////////////////////////////////////////////////////////////////////////////
262 262
263 DEF_GM( return new TilingGM(true); ) 263 DEF_GM( return new TilingGM(true); )
264 DEF_GM( return new TilingGM(false); ) 264 DEF_GM( return new TilingGM(false); )
265 DEF_GM( return new Tiling2GM(make_bm, "bitmap"); ) 265 DEF_GM( return new Tiling2GM(make_bm, "bitmap"); )
266 DEF_GM( return new Tiling2GM(make_grad, "gradient"); ) 266 DEF_GM( return new Tiling2GM(make_grad, "gradient"); )
OLDNEW
« no previous file with comments | « gm/tiledscaledbitmap.cpp ('k') | gm/tilemodes_scaled.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698