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

Side by Side Diff: gm/aaxfermodes.cpp

Issue 1163283002: update portable fonts (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update font creation code 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
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 } 54 }
55 55
56 SkISize onISize() override { 56 SkISize onISize() override {
57 return SkISize::Make(2 * kMargin + 2 * kXfermodeTypeSpacing - 57 return SkISize::Make(2 * kMargin + 2 * kXfermodeTypeSpacing -
58 (kXfermodeTypeSpacing - (kLabelSpacing + 2 * kPaint Spacing)), 58 (kXfermodeTypeSpacing - (kLabelSpacing + 2 * kPaint Spacing)),
59 2 * kMargin + kTitleSpacing + kSubtitleSpacing + 59 2 * kMargin + kTitleSpacing + kSubtitleSpacing +
60 (1 + SkXfermode::kLastCoeffMode) * kShapeSpacing); 60 (1 + SkXfermode::kLastCoeffMode) * kShapeSpacing);
61 } 61 }
62 62
63 void onOnceBeforeDraw() override { 63 void onOnceBeforeDraw() override {
64 #if 0
64 fLabelPaint.setAntiAlias(true); 65 fLabelPaint.setAntiAlias(true);
65 sk_tool_utils::set_portable_typeface(&fLabelPaint); 66 #endif
67 sk_tool_utils::set_portable_typeface_always(&fLabelPaint);
66 fLabelPaint.setTextSize(5 * kShapeSize/8); 68 fLabelPaint.setTextSize(5 * kShapeSize/8);
67 fLabelPaint.setSubpixelText(true); 69 fLabelPaint.setSubpixelText(true);
68 70
69 static const SkScalar radius = -1.4f * kShapeSize/2; 71 static const SkScalar radius = -1.4f * kShapeSize/2;
70 SkPoint pts[4] = { 72 SkPoint pts[4] = {
71 {-radius, 0}, 73 {-radius, 0},
72 {0, -1.33f * radius}, 74 {0, -1.33f * radius},
73 {radius, 0}, 75 {radius, 0},
74 {0, 1.33f * radius} 76 {0, 1.33f * radius}
75 }; 77 };
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 229
228 typedef GM INHERITED; 230 typedef GM INHERITED;
229 }; 231 };
230 232
231 ////////////////////////////////////////////////////////////////////////////// 233 //////////////////////////////////////////////////////////////////////////////
232 234
233 static GM* MyFactory(void*) { return new AAXfermodesGM; } 235 static GM* MyFactory(void*) { return new AAXfermodesGM; }
234 static GMRegistry reg(MyFactory); 236 static GMRegistry reg(MyFactory);
235 237
236 } 238 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698