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 "SkBicubicImageFilter.h" | 8 #include "SkBicubicImageFilter.h" |
9 #include "SkBitmapDevice.h" | 9 #include "SkBitmapDevice.h" |
10 #include "SkBitmapSource.h" | 10 #include "SkBitmapSource.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 109 |
110 static SkDisplacementMapEffect::ChannelSelectorType make_channel_selector_type()
{ | 110 static SkDisplacementMapEffect::ChannelSelectorType make_channel_selector_type()
{ |
111 return static_cast<SkDisplacementMapEffect::ChannelSelectorType>(R(4)+1); | 111 return static_cast<SkDisplacementMapEffect::ChannelSelectorType>(R(4)+1); |
112 } | 112 } |
113 | 113 |
114 static bool valid_for_raster_canvas(const SkImageInfo& info) { | 114 static bool valid_for_raster_canvas(const SkImageInfo& info) { |
115 switch (info.colorType()) { | 115 switch (info.colorType()) { |
116 case kAlpha_8_SkColorType: | 116 case kAlpha_8_SkColorType: |
117 case kRGB_565_SkColorType: | 117 case kRGB_565_SkColorType: |
118 return true; | 118 return true; |
119 case kPMColor_SkColorType: | 119 case kN32_SkColorType: |
120 return kPremul_SkAlphaType == info.alphaType() || | 120 return kPremul_SkAlphaType == info.alphaType() || |
121 kOpaque_SkAlphaType == info.alphaType(); | 121 kOpaque_SkAlphaType == info.alphaType(); |
122 default: | 122 default: |
123 break; | 123 break; |
124 } | 124 } |
125 return false; | 125 return false; |
126 } | 126 } |
127 | 127 |
128 static SkColorType rand_colortype() { | 128 static SkColorType rand_colortype() { |
129 return (SkColorType)R(kLastEnum_SkColorType + 1); | 129 return (SkColorType)R(kLastEnum_SkColorType + 1); |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 } | 427 } |
428 | 428 |
429 private: | 429 private: |
430 typedef SkView INHERITED; | 430 typedef SkView INHERITED; |
431 }; | 431 }; |
432 | 432 |
433 ////////////////////////////////////////////////////////////////////////////// | 433 ////////////////////////////////////////////////////////////////////////////// |
434 | 434 |
435 static SkView* MyFactory() { return new ImageFilterFuzzView; } | 435 static SkView* MyFactory() { return new ImageFilterFuzzView; } |
436 static SkViewRegister reg(MyFactory); | 436 static SkViewRegister reg(MyFactory); |
OLD | NEW |