| 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 // TEMP disable to see if nothing else flakes <reed> | 98 DEF_GM( return new GammaTextGM; ) |
| 99 //DEF_GM( return new GammaTextGM; ) | |
| 100 | 99 |
| 101 ////////////////////////////////////////////////////////////////////////////// | 100 ////////////////////////////////////////////////////////////////////////////// |
| 102 | 101 |
| 103 static SkShader* make_gradient(SkColor c) { | 102 static SkShader* make_gradient(SkColor c) { |
| 104 const SkPoint pts[] = { { 0, 0 }, { 240, 0 } }; | 103 const SkPoint pts[] = { { 0, 0 }, { 240, 0 } }; |
| 105 SkColor colors[2]; | 104 SkColor colors[2]; |
| 106 colors[0] = c; | 105 colors[0] = c; |
| 107 colors[1] = SkColorSetA(c, 0); | 106 colors[1] = SkColorSetA(c, 0); |
| 108 return SkGradientShader::CreateLinear(pts, colors, NULL, 2, SkShader::kClamp
_TileMode); | 107 return SkGradientShader::CreateLinear(pts, colors, NULL, 2, SkShader::kClamp
_TileMode); |
| 109 } | 108 } |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 canvas->translate(0, 80); | 171 canvas->translate(0, 80); |
| 173 } | 172 } |
| 174 } | 173 } |
| 175 | 174 |
| 176 private: | 175 private: |
| 177 typedef skiagm::GM INHERITED; | 176 typedef skiagm::GM INHERITED; |
| 178 }; | 177 }; |
| 179 | 178 |
| 180 DEF_GM( return new GammaShaderTextGM; ) | 179 DEF_GM( return new GammaShaderTextGM; ) |
| 181 | 180 |
| OLD | NEW |