| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 #include "SampleCode.h" | 7 #include "SampleCode.h" |
| 8 #include "Sk1DPathEffect.h" | 8 #include "Sk1DPathEffect.h" |
| 9 #include "Sk2DPathEffect.h" | 9 #include "Sk2DPathEffect.h" |
| 10 #include "SkAlphaThresholdFilter.h" | 10 #include "SkAlphaThresholdFilter.h" |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 rand_color_table(tableR); | 374 rand_color_table(tableR); |
| 375 rand_color_table(tableG); | 375 rand_color_table(tableG); |
| 376 rand_color_table(tableB); | 376 rand_color_table(tableB); |
| 377 colorFilter = SkTableColorFilter::CreateARGB(tableA, tableR, tableG,
tableB); | 377 colorFilter = SkTableColorFilter::CreateARGB(tableA, tableR, tableG,
tableB); |
| 378 break; | 378 break; |
| 379 } | 379 } |
| 380 case 3: | 380 case 3: |
| 381 colorFilter = SkColorFilter::CreateModeFilter(make_color(), make_xfe
rmode()); | 381 colorFilter = SkColorFilter::CreateModeFilter(make_color(), make_xfe
rmode()); |
| 382 break; | 382 break; |
| 383 case 4: | 383 case 4: |
| 384 colorFilter = SkColorFilter::CreateLightingFilter(make_color(), make
_color()); | 384 colorFilter = SkColorMatrixFilter::CreateLightingFilter(make_color()
, make_color()); |
| 385 break; | 385 break; |
| 386 case 5: | 386 case 5: |
| 387 default: | 387 default: |
| 388 colorFilter = nullptr; | 388 colorFilter = nullptr; |
| 389 break; | 389 break; |
| 390 } | 390 } |
| 391 return colorFilter; | 391 return colorFilter; |
| 392 } | 392 } |
| 393 | 393 |
| 394 static SkPath make_path() { | 394 static SkPath make_path() { |
| (...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 816 } | 816 } |
| 817 | 817 |
| 818 private: | 818 private: |
| 819 typedef SkView INHERITED; | 819 typedef SkView INHERITED; |
| 820 }; | 820 }; |
| 821 | 821 |
| 822 ////////////////////////////////////////////////////////////////////////////// | 822 ////////////////////////////////////////////////////////////////////////////// |
| 823 | 823 |
| 824 static SkView* MyFactory() { return new ImageFilterFuzzView; } | 824 static SkView* MyFactory() { return new ImageFilterFuzzView; } |
| 825 static SkViewRegister reg(MyFactory); | 825 static SkViewRegister reg(MyFactory); |
| OLD | NEW |