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

Side by Side Diff: gm/xfermodes3.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/xfermodes2.cpp ('k') | gyp/tools.gyp » ('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 /* 2 /*
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 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 "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkGradientShader.h" 10 #include "SkGradientShader.h"
(...skipping 28 matching lines...) Expand all
39 SkPaint bgPaint; 39 SkPaint bgPaint;
40 bgPaint.setColor(0xFF70D0E0); 40 bgPaint.setColor(0xFF70D0E0);
41 canvas->drawPaint(bgPaint); 41 canvas->drawPaint(bgPaint);
42 } 42 }
43 43
44 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { 44 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE {
45 canvas->translate(SkIntToScalar(10), SkIntToScalar(20)); 45 canvas->translate(SkIntToScalar(10), SkIntToScalar(20));
46 46
47 SkPaint labelP; 47 SkPaint labelP;
48 labelP.setAntiAlias(true); 48 labelP.setAntiAlias(true);
49 sk_tool_utils::set_portable_typeface(&labelP);
49 50
50 static const SkColor kSolidColors[] = { 51 static const SkColor kSolidColors[] = {
51 SK_ColorTRANSPARENT, 52 SK_ColorTRANSPARENT,
52 SK_ColorBLUE, 53 SK_ColorBLUE,
53 0x80808000 54 0x80808000
54 }; 55 };
55 56
56 static const SkColor kBmpAlphas[] = { 57 static const SkColor kBmpAlphas[] = {
57 0xff, 58 0xff,
58 0x80, 59 0x80,
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 SkAutoTUnref<SkShader> fBmpShader; 237 SkAutoTUnref<SkShader> fBmpShader;
237 238
238 typedef GM INHERITED; 239 typedef GM INHERITED;
239 }; 240 };
240 241
241 ////////////////////////////////////////////////////////////////////////////// 242 //////////////////////////////////////////////////////////////////////////////
242 243
243 DEF_GM(return new Xfermodes3GM;) 244 DEF_GM(return new Xfermodes3GM;)
244 245
245 } 246 }
OLDNEW
« no previous file with comments | « gm/xfermodes2.cpp ('k') | gyp/tools.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698