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

Side by Side Diff: gm/shadertext2.cpp

Issue 1009183002: swith over from SkPaint::FilterLevel to 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/resizeimagefilter.cpp ('k') | gm/shadertext3.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 #include "gm.h" 7 #include "gm.h"
8 #include "SkCanvas.h" 8 #include "SkCanvas.h"
9 #include "SkGradientShader.h" 9 #include "SkGradientShader.h"
10 10
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 static SkBitmap bmp; 86 static SkBitmap bmp;
87 if (bmp.isNull()) { 87 if (bmp.isNull()) {
88 makebm(&bmp, kPointSize / 2, kPointSize / 2); 88 makebm(&bmp, kPointSize / 2, kPointSize / 2);
89 } 89 }
90 90
91 SkPaint fillPaint; 91 SkPaint fillPaint;
92 fillPaint.setAntiAlias(true); 92 fillPaint.setAntiAlias(true);
93 sk_tool_utils::set_portable_typeface(&fillPaint); 93 sk_tool_utils::set_portable_typeface(&fillPaint);
94 fillPaint.setTextSize(SkIntToScalar(kPointSize)); 94 fillPaint.setTextSize(SkIntToScalar(kPointSize));
95 fillPaint.setFilterLevel(SkPaint::kLow_FilterLevel); 95 fillPaint.setFilterQuality(kLow_SkFilterQuality);
96 96
97 SkPaint outlinePaint; 97 SkPaint outlinePaint;
98 outlinePaint.setAntiAlias(true); 98 outlinePaint.setAntiAlias(true);
99 sk_tool_utils::set_portable_typeface(&outlinePaint); 99 sk_tool_utils::set_portable_typeface(&outlinePaint);
100 outlinePaint.setTextSize(SkIntToScalar(kPointSize)); 100 outlinePaint.setTextSize(SkIntToScalar(kPointSize));
101 outlinePaint.setStyle(SkPaint::kStroke_Style); 101 outlinePaint.setStyle(SkPaint::kStroke_Style);
102 outlinePaint.setStrokeWidth(0.f); 102 outlinePaint.setStrokeWidth(0.f);
103 103
104 SkScalar w = fillPaint.measureText(kText, kTextLen); 104 SkScalar w = fillPaint.measureText(kText, kTextLen);
105 static SkScalar kPadY = 0.5f * kPointSize; 105 static SkScalar kPadY = 0.5f * kPointSize;
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 201
202 private: 202 private:
203 typedef GM INHERITED; 203 typedef GM INHERITED;
204 }; 204 };
205 205
206 /////////////////////////////////////////////////////////////////////////////// 206 ///////////////////////////////////////////////////////////////////////////////
207 207
208 static GM* MyFactory(void*) { return new ShaderText2GM; } 208 static GM* MyFactory(void*) { return new ShaderText2GM; }
209 static GMRegistry reg(MyFactory); 209 static GMRegistry reg(MyFactory);
210 } 210 }
OLDNEW
« no previous file with comments | « gm/resizeimagefilter.cpp ('k') | gm/shadertext3.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698