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

Side by Side Diff: gm/samplerstress.cpp

Issue 1261093002: gm fix missed portable gm text in samplerstress (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 * 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 "SkShader.h" 10 #include "SkShader.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 canvas->restore(); 121 canvas->restore();
122 122
123 // Now draw stroked versions of the "M" and the round rect so we can 123 // Now draw stroked versions of the "M" and the round rect so we can
124 // see what is going on 124 // see what is going on
125 SkPaint paint2; 125 SkPaint paint2;
126 paint2.setColor(SK_ColorBLACK); 126 paint2.setColor(SK_ColorBLACK);
127 paint2.setAntiAlias(true); 127 paint2.setAntiAlias(true);
128 paint2.setTextSize(72); 128 paint2.setTextSize(72);
129 paint2.setStyle(SkPaint::kStroke_Style); 129 paint2.setStyle(SkPaint::kStroke_Style);
130 paint2.setStrokeWidth(1); 130 paint2.setStrokeWidth(1);
131 sk_tool_utils::set_portable_typeface(&paint2);
131 canvas->drawText("M", 1, 132 canvas->drawText("M", 1,
132 SkIntToScalar(100), SkIntToScalar(100), 133 SkIntToScalar(100), SkIntToScalar(100),
133 paint2); 134 paint2);
134 135
135 paint2.setColor(sk_tool_utils::color_to_565(SK_ColorGRAY)); 136 paint2.setColor(sk_tool_utils::color_to_565(SK_ColorGRAY));
136 137
137 canvas->drawPath(path, paint2); 138 canvas->drawPath(path, paint2);
138 } 139 }
139 140
140 private: 141 private:
141 SkBitmap fTexture; 142 SkBitmap fTexture;
142 bool fTextureCreated; 143 bool fTextureCreated;
143 SkAutoTUnref<SkShader> fShader; 144 SkAutoTUnref<SkShader> fShader;
144 SkAutoTUnref<SkMaskFilter> fMaskFilter; 145 SkAutoTUnref<SkMaskFilter> fMaskFilter;
145 146
146 typedef GM INHERITED; 147 typedef GM INHERITED;
147 }; 148 };
148 149
149 ////////////////////////////////////////////////////////////////////////////// 150 //////////////////////////////////////////////////////////////////////////////
150 151
151 static GM* MyFactory(void*) { return new SamplerStressGM; } 152 static GM* MyFactory(void*) { return new SamplerStressGM; }
152 static GMRegistry reg(MyFactory); 153 static GMRegistry reg(MyFactory);
153 154
154 } 155 }
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