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

Side by Side Diff: gm/hairmodes.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/gradients.cpp ('k') | gm/imagefilterscropexpand.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 2011 Google Inc. 2 * Copyright 2011 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 "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 canvas->drawLine(W/2, H/2, W/2 + x, H/2 + y, paint); 55 canvas->drawLine(W/2, H/2, W/2 + x, H/2 + y, paint);
56 } 56 }
57 57
58 return H; 58 return H;
59 } 59 }
60 60
61 static SkShader* make_bg_shader() { 61 static SkShader* make_bg_shader() {
62 SkBitmap bm; 62 SkBitmap bm;
63 bm.allocN32Pixels(2, 2); 63 bm.allocN32Pixels(2, 2);
64 *bm.getAddr32(0, 0) = *bm.getAddr32(1, 1) = 0xFFFFFFFF; 64 *bm.getAddr32(0, 0) = *bm.getAddr32(1, 1) = 0xFFFFFFFF;
65 *bm.getAddr32(1, 0) = *bm.getAddr32(0, 1) = SkPackARGB32(0xFF, 0xCC, 0xCC, 0 xCC); 65 *bm.getAddr32(1, 0) = *bm.getAddr32(0, 1) = SkPackARGB32(0xFF, 0xCE, 0xCF, 0 xCE);
66 66
67 SkMatrix m; 67 SkMatrix m;
68 m.setScale(SkIntToScalar(6), SkIntToScalar(6)); 68 m.setScale(SkIntToScalar(6), SkIntToScalar(6));
69 return SkShader::CreateBitmapShader(bm, 69 return SkShader::CreateBitmapShader(bm,
70 SkShader::kRepeat_TileMode, 70 SkShader::kRepeat_TileMode,
71 SkShader::kRepeat_TileMode, 71 SkShader::kRepeat_TileMode,
72 &m); 72 &m);
73 } 73 }
74 74
75 namespace skiagm { 75 namespace skiagm {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 private: 124 private:
125 typedef GM INHERITED; 125 typedef GM INHERITED;
126 }; 126 };
127 127
128 //////////////////////////////////////////////////////////////////////////// // 128 //////////////////////////////////////////////////////////////////////////// //
129 129
130 static GM* MyFactory(void*) { return new HairModesGM; } 130 static GM* MyFactory(void*) { return new HairModesGM; }
131 static GMRegistry reg(MyFactory); 131 static GMRegistry reg(MyFactory);
132 132
133 } 133 }
OLDNEW
« no previous file with comments | « gm/gradients.cpp ('k') | gm/imagefilterscropexpand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698