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

Side by Side Diff: gm/xfermodeimagefilter.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/verttext2.cpp ('k') | gm/xfermodes.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 "SkArithmeticMode.h" 9 #include "SkArithmeticMode.h"
10 #include "SkOffsetImageFilter.h" 10 #include "SkOffsetImageFilter.h"
(...skipping 16 matching lines...) Expand all
27 virtual SkString onShortName() SK_OVERRIDE { 27 virtual SkString onShortName() SK_OVERRIDE {
28 return SkString("xfermodeimagefilter"); 28 return SkString("xfermodeimagefilter");
29 } 29 }
30 30
31 void make_bitmap() { 31 void make_bitmap() {
32 fBitmap.allocN32Pixels(80, 80); 32 fBitmap.allocN32Pixels(80, 80);
33 SkCanvas canvas(fBitmap); 33 SkCanvas canvas(fBitmap);
34 canvas.clear(0x00000000); 34 canvas.clear(0x00000000);
35 SkPaint paint; 35 SkPaint paint;
36 paint.setAntiAlias(true); 36 paint.setAntiAlias(true);
37 sk_tool_utils::set_portable_typeface(&paint);
37 paint.setColor(0xD000D000); 38 paint.setColor(0xD000D000);
38 paint.setTextSize(SkIntToScalar(96)); 39 paint.setTextSize(SkIntToScalar(96));
39 const char* str = "e"; 40 const char* str = "e";
40 canvas.drawText(str, strlen(str), SkIntToScalar(15), SkIntToScalar(65), paint); 41 canvas.drawText(str, strlen(str), SkIntToScalar(15), SkIntToScalar(65), paint);
41 } 42 }
42 43
43 void make_checkerboard() { 44 void make_checkerboard() {
44 fCheckerboard.allocN32Pixels(80, 80); 45 fCheckerboard.allocN32Pixels(80, 80);
45 SkCanvas canvas(fCheckerboard); 46 SkCanvas canvas(fCheckerboard);
46 canvas.clear(0x00000000); 47 canvas.clear(0x00000000);
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 private: 218 private:
218 SkBitmap fBitmap, fCheckerboard; 219 SkBitmap fBitmap, fCheckerboard;
219 typedef GM INHERITED; 220 typedef GM INHERITED;
220 }; 221 };
221 222
222 ////////////////////////////////////////////////////////////////////////////// 223 //////////////////////////////////////////////////////////////////////////////
223 224
224 DEF_GM( return new XfermodeImageFilterGM; ); 225 DEF_GM( return new XfermodeImageFilterGM; );
225 226
226 } 227 }
OLDNEW
« no previous file with comments | « gm/verttext2.cpp ('k') | gm/xfermodes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698