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

Side by Side Diff: gm/clippedbitmapshaders.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/blurquickreject.cpp ('k') | gm/downsamplebitmap.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 2013 Google Inc. 2 * Copyright 2013 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 "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 s.reset(); 82 s.reset();
83 s.setScale(8, 8); 83 s.setScale(8, 8);
84 s.postTranslate(SLIDE_SIZE / 2, SLIDE_SIZE / 2); 84 s.postTranslate(SLIDE_SIZE / 2, SLIDE_SIZE / 2);
85 SkShader* shader = SkShader::CreateBitmapShader( 85 SkShader* shader = SkShader::CreateBitmapShader(
86 bmp, fMode, fMode, &s); 86 bmp, fMode, fMode, &s);
87 87
88 SkPaint paint; 88 SkPaint paint;
89 paint.setShader(shader)->unref(); 89 paint.setShader(shader)->unref();
90 90
91 if (fHQ) { 91 if (fHQ) {
92 paint.setFilterLevel(SkPaint::kHigh_FilterLevel); 92 paint.setFilterQuality(kHigh_SkFilterQuality);
93 } 93 }
94 94
95 SkScalar margin = (SLIDE_SIZE / 3 - RECT_SIZE) / 2; 95 SkScalar margin = (SLIDE_SIZE / 3 - RECT_SIZE) / 2;
96 for (int i = 0; i < 3; i++) { 96 for (int i = 0; i < 3; i++) {
97 SkScalar yOrigin = SLIDE_SIZE / 3 * i + margin; 97 SkScalar yOrigin = SLIDE_SIZE / 3 * i + margin;
98 for (int j = 0; j < 3; j++) { 98 for (int j = 0; j < 3; j++) {
99 SkScalar xOrigin = SLIDE_SIZE / 3 * j + margin; 99 SkScalar xOrigin = SLIDE_SIZE / 3 * j + margin;
100 if (i == 1 && j == 1) { 100 if (i == 1 && j == 1) {
101 continue; // skip center element 101 continue; // skip center element
102 } 102 }
(...skipping 16 matching lines...) Expand all
119 DEF_GM( return new ClippedBitmapShadersGM(SkShader::kRepeat_TileMode); ) 119 DEF_GM( return new ClippedBitmapShadersGM(SkShader::kRepeat_TileMode); )
120 DEF_GM( return new ClippedBitmapShadersGM(SkShader::kMirror_TileMode); ) 120 DEF_GM( return new ClippedBitmapShadersGM(SkShader::kMirror_TileMode); )
121 DEF_GM( return new ClippedBitmapShadersGM(SkShader::kClamp_TileMode); ) 121 DEF_GM( return new ClippedBitmapShadersGM(SkShader::kClamp_TileMode); )
122 122
123 DEF_GM( return new ClippedBitmapShadersGM(SkShader::kRepeat_TileMode, true); ) 123 DEF_GM( return new ClippedBitmapShadersGM(SkShader::kRepeat_TileMode, true); )
124 DEF_GM( return new ClippedBitmapShadersGM(SkShader::kMirror_TileMode, true); ) 124 DEF_GM( return new ClippedBitmapShadersGM(SkShader::kMirror_TileMode, true); )
125 DEF_GM( return new ClippedBitmapShadersGM(SkShader::kClamp_TileMode, true); ) 125 DEF_GM( return new ClippedBitmapShadersGM(SkShader::kClamp_TileMode, true); )
126 126
127 127
128 } 128 }
OLDNEW
« no previous file with comments | « gm/blurquickreject.cpp ('k') | gm/downsamplebitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698