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

Side by Side Diff: gm/strokes.cpp

Issue 1262703002: make tests portable by using 565 compatible colors (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 | « gm/stringart.cpp ('k') | gm/tablecolorfilter.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 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 8
9 9
10 10
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 return SkISize::Make(1500, 1500); 198 return SkISize::Make(1500, 1500);
199 } 199 }
200 200
201 void onDraw(SkCanvas* canvas) override { 201 void onDraw(SkCanvas* canvas) override {
202 SkPaint origPaint; 202 SkPaint origPaint;
203 origPaint.setAntiAlias(true); 203 origPaint.setAntiAlias(true);
204 origPaint.setStyle(SkPaint::kStroke_Style); 204 origPaint.setStyle(SkPaint::kStroke_Style);
205 SkPaint fillPaint(origPaint); 205 SkPaint fillPaint(origPaint);
206 fillPaint.setColor(SK_ColorRED); 206 fillPaint.setColor(SK_ColorRED);
207 SkPaint strokePaint(origPaint); 207 SkPaint strokePaint(origPaint);
208 strokePaint.setColor(0xFF4444FF); 208 strokePaint.setColor(sk_tool_utils::color_to_565(0xFF4444FF));
209 209
210 void (*procs[])(SkPath*, const SkRect&, SkString*) = { 210 void (*procs[])(SkPath*, const SkRect&, SkString*) = {
211 make0, make1, make2, make3, make4, make5 211 make0, make1, make2, make3, make4, make5
212 }; 212 };
213 213
214 canvas->translate(SkIntToScalar(20), SkIntToScalar(80)); 214 canvas->translate(SkIntToScalar(20), SkIntToScalar(80));
215 215
216 SkRect bounds = SkRect::MakeWH(SkIntToScalar(50), SkIntToScalar(50)); 216 SkRect bounds = SkRect::MakeWH(SkIntToScalar(50), SkIntToScalar(50));
217 SkScalar dx = bounds.width() * 4/3; 217 SkScalar dx = bounds.width() * 4/3;
218 SkScalar dy = bounds.height() * 5; 218 SkScalar dy = bounds.height() * 5;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 273
274 static skiagm::GM* F0(void*) { return new StrokesGM; } 274 static skiagm::GM* F0(void*) { return new StrokesGM; }
275 static skiagm::GM* F1(void*) { return new Strokes2GM; } 275 static skiagm::GM* F1(void*) { return new Strokes2GM; }
276 static skiagm::GM* F2(void*) { return new Strokes3GM; } 276 static skiagm::GM* F2(void*) { return new Strokes3GM; }
277 static skiagm::GM* F3(void*) { return new Strokes4GM; } 277 static skiagm::GM* F3(void*) { return new Strokes4GM; }
278 278
279 static skiagm::GMRegistry R0(F0); 279 static skiagm::GMRegistry R0(F0);
280 static skiagm::GMRegistry R1(F1); 280 static skiagm::GMRegistry R1(F1);
281 static skiagm::GMRegistry R2(F2); 281 static skiagm::GMRegistry R2(F2);
282 static skiagm::GMRegistry R3(F3); 282 static skiagm::GMRegistry R3(F3);
OLDNEW
« no previous file with comments | « gm/stringart.cpp ('k') | gm/tablecolorfilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698