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 "SkColorFilter.h" | 10 #include "SkColorFilter.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 } | 84 } |
85 | 85 |
86 private: | 86 private: |
87 typedef SkImageFilter INHERITED; | 87 typedef SkImageFilter INHERITED; |
88 }; | 88 }; |
89 | 89 |
90 static IdentityImageFilter::Registrar gReg1; | 90 static IdentityImageFilter::Registrar gReg1; |
91 | 91 |
92 SkFlattenable* IdentityImageFilter::CreateProc(SkReadBuffer& buffer) { | 92 SkFlattenable* IdentityImageFilter::CreateProc(SkReadBuffer& buffer) { |
93 SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1); | 93 SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1); |
94 return IdentityImageFilter::Create(common.getInput(0)); | 94 return IdentityImageFilter::Create(common.getInput(0).get()); |
95 } | 95 } |
96 | 96 |
97 #ifndef SK_IGNORE_TO_STRING | 97 #ifndef SK_IGNORE_TO_STRING |
98 void IdentityImageFilter::toString(SkString* str) const { | 98 void IdentityImageFilter::toString(SkString* str) const { |
99 str->appendf("IdentityImageFilter: ("); | 99 str->appendf("IdentityImageFilter: ("); |
100 str->append(")"); | 100 str->append(")"); |
101 } | 101 } |
102 #endif | 102 #endif |
103 | 103 |
104 /////////////////////////////////////////////////////////////////////////////// | 104 /////////////////////////////////////////////////////////////////////////////// |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 | 315 |
316 class ImageFiltersText_CF : public ImageFiltersTextBaseGM { | 316 class ImageFiltersText_CF : public ImageFiltersTextBaseGM { |
317 public: | 317 public: |
318 ImageFiltersText_CF() : ImageFiltersTextBaseGM("color") {} | 318 ImageFiltersText_CF() : ImageFiltersTextBaseGM("color") {} |
319 | 319 |
320 void installFilter(SkPaint* paint) override { | 320 void installFilter(SkPaint* paint) override { |
321 paint->setColorFilter(SkColorFilter::MakeModeFilter(SK_ColorBLUE, SkXfer
mode::kSrcIn_Mode)); | 321 paint->setColorFilter(SkColorFilter::MakeModeFilter(SK_ColorBLUE, SkXfer
mode::kSrcIn_Mode)); |
322 } | 322 } |
323 }; | 323 }; |
324 DEF_GM( return new ImageFiltersText_CF; ) | 324 DEF_GM( return new ImageFiltersText_CF; ) |
OLD | NEW |