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

Side by Side Diff: gm/srcmode.cpp

Issue 407183003: add portable and canonical font support for DM (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add atexit; rename to create_... Created 6 years, 4 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/simpleaaclip.cpp ('k') | gm/strokefill.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 2012 Google Inc. 2 * Copyright 2012 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 "SkGradientShader.h" 10 #include "SkGradientShader.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 } 73 }
74 74
75 virtual SkISize onISize() { 75 virtual SkISize onISize() {
76 return SkISize::Make(640, 760); 76 return SkISize::Make(640, 760);
77 } 77 }
78 78
79 void drawContent(SkCanvas* canvas) { 79 void drawContent(SkCanvas* canvas) {
80 canvas->translate(SkIntToScalar(20), SkIntToScalar(20)); 80 canvas->translate(SkIntToScalar(20), SkIntToScalar(20));
81 81
82 SkPaint paint; 82 SkPaint paint;
83 sk_tool_utils::set_portable_typeface(&paint);
83 paint.setColor(0x80FF0000); 84 paint.setColor(0x80FF0000);
84 85
85 const Proc procs[] = { 86 const Proc procs[] = {
86 draw_hair, draw_thick, draw_rect, draw_oval, draw_text 87 draw_hair, draw_thick, draw_rect, draw_oval, draw_text
87 }; 88 };
88 89
89 const SkXfermode::Mode modes[] = { 90 const SkXfermode::Mode modes[] = {
90 SkXfermode::kSrcOver_Mode, SkXfermode::kSrc_Mode, SkXfermode::kClear _Mode 91 SkXfermode::kSrcOver_Mode, SkXfermode::kSrc_Mode, SkXfermode::kClear _Mode
91 }; 92 };
92 93
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 surf->draw(canvas, 0, 0, NULL); 141 surf->draw(canvas, 0, 0, NULL);
141 } 142 }
142 143
143 private: 144 private:
144 typedef skiagm::GM INHERITED; 145 typedef skiagm::GM INHERITED;
145 }; 146 };
146 147
147 /////////////////////////////////////////////////////////////////////////////// 148 ///////////////////////////////////////////////////////////////////////////////
148 149
149 DEF_GM(return new SrcModeGM;) 150 DEF_GM(return new SrcModeGM;)
OLDNEW
« no previous file with comments | « gm/simpleaaclip.cpp ('k') | gm/strokefill.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698