| 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 | 8 |
| 9 /* Tests text rendering with LCD and subpixel rendering turned on and off. | 9 /* Tests text rendering with LCD and subpixel rendering turned on and off. |
| 10 */ | 10 */ |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 return surface; | 151 return surface; |
| 152 } | 152 } |
| 153 | 153 |
| 154 protected: | 154 protected: |
| 155 SkString onShortName() SK_OVERRIDE { | 155 SkString onShortName() SK_OVERRIDE { |
| 156 return SkString("lcdtextprops"); | 156 return SkString("lcdtextprops"); |
| 157 } | 157 } |
| 158 | 158 |
| 159 SkISize onISize() SK_OVERRIDE { return SkISize::Make(230, 230); } | 159 SkISize onISize() SK_OVERRIDE { return SkISize::Make(230, 230); } |
| 160 | 160 |
| 161 uint32_t onGetFlags() const SK_OVERRIDE { | |
| 162 return kSkip565_Flag; | |
| 163 } | |
| 164 | |
| 165 void onOnceBeforeDraw() SK_OVERRIDE { | 161 void onOnceBeforeDraw() SK_OVERRIDE { |
| 166 fInfo = SkImageInfo::MakeN32Premul(100, 100); | 162 fInfo = SkImageInfo::MakeN32Premul(100, 100); |
| 167 SkPictureRecorder recorder; | 163 SkPictureRecorder recorder; |
| 168 DrawText(recorder.beginRecording(SkIntToScalar(fInfo.width()), | 164 DrawText(recorder.beginRecording(SkIntToScalar(fInfo.width()), |
| 169 SkIntToScalar(fInfo.height()))); | 165 SkIntToScalar(fInfo.height()))); |
| 170 SkAutoTUnref<SkPicture> pic(recorder.endRecording()); | 166 SkAutoTUnref<SkPicture> pic(recorder.endRecording()); |
| 171 SkAutoTUnref<SkImageFilter> filter(SkPictureImageFilter::Create(pic.get(
))); | 167 SkAutoTUnref<SkImageFilter> filter(SkPictureImageFilter::Create(pic.get(
))); |
| 172 fFilterPaint.setImageFilter(filter.get()); | 168 fFilterPaint.setImageFilter(filter.get()); |
| 173 } | 169 } |
| 174 | 170 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 201 | 197 |
| 202 typedef skiagm::GM INHERITED; | 198 typedef skiagm::GM INHERITED; |
| 203 }; | 199 }; |
| 204 | 200 |
| 205 /////////////////////////////////////////////////////////////////////////////// | 201 /////////////////////////////////////////////////////////////////////////////// |
| 206 | 202 |
| 207 DEF_GM( return new LcdTextGM; ) | 203 DEF_GM( return new LcdTextGM; ) |
| 208 DEF_GM( return new LcdTextSizeGM; ) | 204 DEF_GM( return new LcdTextSizeGM; ) |
| 209 // Temporarily disabled (dftext interference) | 205 // Temporarily disabled (dftext interference) |
| 210 // DEF_GM( return new LcdTextProps; ) | 206 // DEF_GM( return new LcdTextProps; ) |
| OLD | NEW |