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

Side by Side Diff: gm/aaxfermodes.cpp

Issue 1169173006: turn on antialiased text (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | no next file » | 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 2015 Google Inc. 3 * Copyright 2015 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 "SkArithmeticMode.h" 9 #include "SkArithmeticMode.h"
10 #include "SkShader.h" 10 #include "SkShader.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 } 60 }
61 61
62 SkISize onISize() override { 62 SkISize onISize() override {
63 return SkISize::Make(2 * kMargin + 2 * kXfermodeTypeSpacing - 63 return SkISize::Make(2 * kMargin + 2 * kXfermodeTypeSpacing -
64 (kXfermodeTypeSpacing - (kLabelSpacing + 2 * kPaint Spacing)), 64 (kXfermodeTypeSpacing - (kLabelSpacing + 2 * kPaint Spacing)),
65 2 * kMargin + kTitleSpacing + kSubtitleSpacing + 65 2 * kMargin + kTitleSpacing + kSubtitleSpacing +
66 (1 + SkXfermode::kLastCoeffMode) * kShapeSpacing); 66 (1 + SkXfermode::kLastCoeffMode) * kShapeSpacing);
67 } 67 }
68 68
69 void onOnceBeforeDraw() override { 69 void onOnceBeforeDraw() override {
70 #if 0
71 fLabelPaint.setAntiAlias(true); 70 fLabelPaint.setAntiAlias(true);
72 #endif
73 sk_tool_utils::set_portable_typeface_always(&fLabelPaint); 71 sk_tool_utils::set_portable_typeface_always(&fLabelPaint);
74 fLabelPaint.setTextSize(5 * kShapeSize/8); 72 fLabelPaint.setTextSize(5 * kShapeSize/8);
75 fLabelPaint.setSubpixelText(true); 73 fLabelPaint.setSubpixelText(true);
76 74
77 static const SkScalar radius = -1.4f * kShapeSize/2; 75 static const SkScalar radius = -1.4f * kShapeSize/2;
78 SkPoint pts[4] = { 76 SkPoint pts[4] = {
79 {-radius, 0}, 77 {-radius, 0},
80 {0, -1.33f * radius}, 78 {0, -1.33f * radius},
81 {radius, 0}, 79 {radius, 0},
82 {0, 1.33f * radius} 80 {0, 1.33f * radius}
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 261
264 typedef GM INHERITED; 262 typedef GM INHERITED;
265 }; 263 };
266 264
267 ////////////////////////////////////////////////////////////////////////////// 265 //////////////////////////////////////////////////////////////////////////////
268 266
269 static GM* MyFactory(void*) { return new AAXfermodesGM; } 267 static GM* MyFactory(void*) { return new AAXfermodesGM; }
270 static GMRegistry reg(MyFactory); 268 static GMRegistry reg(MyFactory);
271 269
272 } 270 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698