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

Side by Side Diff: gm/fontcache.cpp

Issue 1245123006: make fontcache textblob gm portable (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 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 | gm/textblob.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 "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkGraphics.h" 10 #include "SkGraphics.h"
(...skipping 22 matching lines...) Expand all
33 protected: 33 protected:
34 SkString onShortName() override { 34 SkString onShortName() override {
35 return SkString("fontcache"); 35 return SkString("fontcache");
36 } 36 }
37 37
38 SkISize onISize() override { 38 SkISize onISize() override {
39 return SkISize::Make(1280, 640); 39 return SkISize::Make(1280, 640);
40 } 40 }
41 41
42 void onOnceBeforeDraw() override { 42 void onOnceBeforeDraw() override {
43 fTypefaces[0] = sk_tool_utils::create_portable_typeface("serif", SkTypef ace::kItalic); 43 fTypefaces[0] = sk_tool_utils::create_portable_typeface_always("serif", SkTypeface::kItalic);
44 fTypefaces[1] = sk_tool_utils::create_portable_typeface("sans-serif", Sk Typeface::kItalic); 44 fTypefaces[1] = sk_tool_utils::create_portable_typeface_always("sans-ser if", SkTypeface::kItalic);
45 } 45 }
46 46
47 void onDraw(SkCanvas* canvas) override { 47 void onDraw(SkCanvas* canvas) override {
48 SkPaint paint; 48 SkPaint paint;
49 paint.setAntiAlias(true); 49 paint.setAntiAlias(true);
50 paint.setLCDRenderText(true); 50 paint.setLCDRenderText(true);
51 paint.setSubpixelText(true); 51 paint.setSubpixelText(true);
52 paint.setTypeface(fTypefaces[0]); 52 paint.setTypeface(fTypefaces[0]);
53 paint.setTextSize(192); 53 paint.setTextSize(192);
54 54
(...skipping 22 matching lines...) Expand all
77 77
78 private: 78 private:
79 SkTypeface* fTypefaces[2]; 79 SkTypeface* fTypefaces[2];
80 typedef GM INHERITED; 80 typedef GM INHERITED;
81 }; 81 };
82 82
83 83
84 ////////////////////////////////////////////////////////////////////////////// 84 //////////////////////////////////////////////////////////////////////////////
85 85
86 DEF_GM( return SkNEW(FontCacheGM); ) 86 DEF_GM( return SkNEW(FontCacheGM); )
OLDNEW
« no previous file with comments | « no previous file | gm/textblob.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698