OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
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 "SkColorFilter.h" | 8 #include "SkColorFilter.h" |
9 | 9 |
10 #include "SkFlattenableBuffers.h" | 10 #include "SkFlattenableBuffers.h" |
11 #include "SkShader.h" | 11 #include "SkShader.h" |
12 #include "SkUnPreMultiply.h" | 12 #include "SkUnPreMultiply.h" |
13 #include "SkString.h" | 13 #include "SkString.h" |
14 | 14 |
15 SK_DEFINE_INST_COUNT(SkColorFilter) | |
16 | |
17 bool SkColorFilter::asColorMode(SkColor* color, SkXfermode::Mode* mode) const { | 15 bool SkColorFilter::asColorMode(SkColor* color, SkXfermode::Mode* mode) const { |
18 return false; | 16 return false; |
19 } | 17 } |
20 | 18 |
21 bool SkColorFilter::asColorMatrix(SkScalar matrix[20]) const { | 19 bool SkColorFilter::asColorMatrix(SkScalar matrix[20]) const { |
22 return false; | 20 return false; |
23 } | 21 } |
24 | 22 |
25 bool SkColorFilter::asComponentTable(SkBitmap*) const { | 23 bool SkColorFilter::asComponentTable(SkBitmap*) const { |
26 return false; | 24 return false; |
(...skipping 10 matching lines...) Expand all Loading... |
37 | 35 |
38 SkColor SkColorFilter::filterColor(SkColor c) const { | 36 SkColor SkColorFilter::filterColor(SkColor c) const { |
39 SkPMColor dst, src = SkPreMultiplyColor(c); | 37 SkPMColor dst, src = SkPreMultiplyColor(c); |
40 this->filterSpan(&src, 1, &dst); | 38 this->filterSpan(&src, 1, &dst); |
41 return SkUnPreMultiply::PMColorToColor(dst); | 39 return SkUnPreMultiply::PMColorToColor(dst); |
42 } | 40 } |
43 | 41 |
44 GrEffectRef* SkColorFilter::asNewEffect(GrContext*) const { | 42 GrEffectRef* SkColorFilter::asNewEffect(GrContext*) const { |
45 return NULL; | 43 return NULL; |
46 } | 44 } |
OLD | NEW |