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

Side by Side Diff: gm/dstreadshuffle.cpp

Issue 1259093004: fix dstreadshuffle text portable gm (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix dstreadshuffle text portable gm Created 5 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 | « no previous file | no next file » | 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 "SkRandom.h" 10 #include "SkRandom.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 fConcavePath.lineTo(points[(2 * i) % 5]); 80 fConcavePath.lineTo(points[(2 * i) % 5]);
81 } 81 }
82 fConcavePath.setFillType(SkPath::kEvenOdd_FillType); 82 fConcavePath.setFillType(SkPath::kEvenOdd_FillType);
83 SkASSERT(!fConcavePath.isConvex()); 83 SkASSERT(!fConcavePath.isConvex());
84 } 84 }
85 canvas->drawPath(fConcavePath, *paint); 85 canvas->drawPath(fConcavePath, *paint);
86 break; 86 break;
87 case kText_ShapeType: { 87 case kText_ShapeType: {
88 const char* text = "Hello!"; 88 const char* text = "Hello!";
89 paint->setTextSize(30); 89 paint->setTextSize(30);
90 sk_tool_utils::set_portable_typeface(paint);
90 canvas->drawText(text, strlen(text), 0, 0, *paint); 91 canvas->drawText(text, strlen(text), 0, 0, *paint);
91 } 92 }
92 default: 93 default:
93 break; 94 break;
94 } 95 }
95 } 96 }
96 97
97 static SkColor GetColor(SkRandom* random, int i, int nextColor) { 98 static SkColor GetColor(SkRandom* random, int i, int nextColor) {
98 static SkColor colors[] = { SK_ColorRED, 99 static SkColor colors[] = { SK_ColorRED,
99 sk_tool_utils::color_to_565(0xFFFF7F00), // Orange 100 sk_tool_utils::color_to_565(0xFFFF7F00), // Orange
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 static const int kHeight = 400; 187 static const int kHeight = 400;
187 typedef GM INHERITED; 188 typedef GM INHERITED;
188 }; 189 };
189 190
190 ////////////////////////////////////////////////////////////////////////////// 191 //////////////////////////////////////////////////////////////////////////////
191 192
192 static GM* MyFactory(void*) { return new DstReadShuffle; } 193 static GM* MyFactory(void*) { return new DstReadShuffle; }
193 static GMRegistry reg(MyFactory); 194 static GMRegistry reg(MyFactory);
194 195
195 } 196 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698