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

Side by Side Diff: gm/textbloblooper.cpp

Issue 1257773002: rename portable_typeface_always to portable_typeface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove unncessary change to path test 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 | « gm/surface.cpp ('k') | gm/textblobshader.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 9
10 #include "Sk2DPathEffect.h" 10 #include "Sk2DPathEffect.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 void onOnceBeforeDraw() override { 141 void onOnceBeforeDraw() override {
142 SkTextBlobBuilder builder; 142 SkTextBlobBuilder builder;
143 143
144 // LCD 144 // LCD
145 SkPaint paint; 145 SkPaint paint;
146 paint.setTextSize(32); 146 paint.setTextSize(32);
147 const char* text = "The quick brown fox jumps over the lazy dog"; 147 const char* text = "The quick brown fox jumps over the lazy dog";
148 paint.setSubpixelText(true); 148 paint.setSubpixelText(true);
149 paint.setLCDRenderText(true); 149 paint.setLCDRenderText(true);
150 paint.setAntiAlias(true); 150 paint.setAntiAlias(true);
151 sk_tool_utils::set_portable_typeface(&paint);
151 add_to_text_blob(&builder, text, paint, 0, 0); 152 add_to_text_blob(&builder, text, paint, 0, 0);
152 fBlob.reset(builder.build()); 153 fBlob.reset(builder.build());
153 154
154 // create a looper which sandwhiches an effect in two normal draws 155 // create a looper which sandwhiches an effect in two normal draws
155 LooperSettings looperSandwhich[] = { 156 LooperSettings looperSandwhich[] = {
156 { SkXfermode::kSrc_Mode, SK_ColorMAGENTA, SkPaint::kFill_Style, 0, 0, 0, false }, 157 { SkXfermode::kSrc_Mode, SK_ColorMAGENTA, SkPaint::kFill_Style, 0, 0, 0, false },
157 { SkXfermode::kSrcOver_Mode, 0x88000000, SkPaint::kFill_Style, 0, 10. f, 0, true }, 158 { SkXfermode::kSrcOver_Mode, 0x88000000, SkPaint::kFill_Style, 0, 10. f, 0, true },
158 { SkXfermode::kSrcOver_Mode, 0x50FF00FF, SkPaint::kFill_Style, 0, 20. f, 0, false }, 159 { SkXfermode::kSrcOver_Mode, 0x50FF00FF, SkPaint::kFill_Style, 0, 20. f, 0, false },
159 }; 160 };
160 161
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 SkAutoTUnref<const SkTextBlob> fBlob; 250 SkAutoTUnref<const SkTextBlob> fBlob;
250 SkTArray<SkAutoTUnref<SkLayerDrawLooper>, true> fLoopers; 251 SkTArray<SkAutoTUnref<SkLayerDrawLooper>, true> fLoopers;
251 252
252 typedef GM INHERITED; 253 typedef GM INHERITED;
253 }; 254 };
254 255
255 ////////////////////////////////////////////////////////////////////////////// 256 //////////////////////////////////////////////////////////////////////////////
256 257
257 DEF_GM( return SkNEW(TextBlobLooperGM); ) 258 DEF_GM( return SkNEW(TextBlobLooperGM); )
258 } 259 }
OLDNEW
« no previous file with comments | « gm/surface.cpp ('k') | gm/textblobshader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698