| OLD | NEW |
| 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 "SkPath.h" | 10 #include "SkPath.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 y += paint.getTextSize() * 2; | 88 y += paint.getTextSize() * 2; |
| 89 } | 89 } |
| 90 x += SkIntToScalar(1024) / SK_ARRAY_COUNT(fg); | 90 x += SkIntToScalar(1024) / SK_ARRAY_COUNT(fg); |
| 91 } | 91 } |
| 92 } | 92 } |
| 93 | 93 |
| 94 private: | 94 private: |
| 95 typedef skiagm::GM INHERITED; | 95 typedef skiagm::GM INHERITED; |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 DEF_GM( return new GammaTextGM; ) | 98 // TEMP disable to see if nothing else flakes <reed> |
| 99 //DEF_GM( return new GammaTextGM; ) |
| 99 | 100 |
| 100 ////////////////////////////////////////////////////////////////////////////// | 101 ////////////////////////////////////////////////////////////////////////////// |
| 101 | 102 |
| 102 static SkShader* make_gradient(SkColor c) { | 103 static SkShader* make_gradient(SkColor c) { |
| 103 const SkPoint pts[] = { { 0, 0 }, { 240, 0 } }; | 104 const SkPoint pts[] = { { 0, 0 }, { 240, 0 } }; |
| 104 SkColor colors[2]; | 105 SkColor colors[2]; |
| 105 colors[0] = c; | 106 colors[0] = c; |
| 106 colors[1] = SkColorSetA(c, 0); | 107 colors[1] = SkColorSetA(c, 0); |
| 107 return SkGradientShader::CreateLinear(pts, colors, NULL, 2, SkShader::kClamp
_TileMode); | 108 return SkGradientShader::CreateLinear(pts, colors, NULL, 2, SkShader::kClamp
_TileMode); |
| 108 } | 109 } |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 canvas->translate(0, 80); | 172 canvas->translate(0, 80); |
| 172 } | 173 } |
| 173 } | 174 } |
| 174 | 175 |
| 175 private: | 176 private: |
| 176 typedef skiagm::GM INHERITED; | 177 typedef skiagm::GM INHERITED; |
| 177 }; | 178 }; |
| 178 | 179 |
| 179 DEF_GM( return new GammaShaderTextGM; ) | 180 DEF_GM( return new GammaShaderTextGM; ) |
| 180 | 181 |
| OLD | NEW |