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 | 7 |
8 #include "SkLumaColorFilter.h" | 8 #include "SkLumaColorFilter.h" |
9 | 9 |
10 #include "SkColorPriv.h" | 10 #include "SkColorPriv.h" |
11 #include "SkString.h" | 11 #include "SkString.h" |
12 | 12 |
13 #if SK_SUPPORT_GPU | 13 #if SK_SUPPORT_GPU |
14 #include "GrContext.h" | 14 #include "GrContext.h" |
15 #include "GrInvariantOutput.h" | 15 #include "GrInvariantOutput.h" |
16 #include "gl/GrGLProcessor.h" | 16 #include "gl/GrGLFragmentProcessor.h" |
17 #include "gl/builders/GrGLProgramBuilder.h" | 17 #include "gl/builders/GrGLProgramBuilder.h" |
18 #endif | 18 #endif |
19 | 19 |
20 void SkLumaColorFilter::filterSpan(const SkPMColor src[], int count, | 20 void SkLumaColorFilter::filterSpan(const SkPMColor src[], int count, |
21 SkPMColor dst[]) const { | 21 SkPMColor dst[]) const { |
22 for (int i = 0; i < count; ++i) { | 22 for (int i = 0; i < count; ++i) { |
23 SkPMColor c = src[i]; | 23 SkPMColor c = src[i]; |
24 | 24 |
25 /* | 25 /* |
26 * While LuminanceToAlpha is defined to operate on un-premultiplied | 26 * While LuminanceToAlpha is defined to operate on un-premultiplied |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 *array->append() = frag; | 128 *array->append() = frag; |
129 } else { | 129 } else { |
130 frag->unref(); | 130 frag->unref(); |
131 SkDEBUGCODE(frag = NULL;) | 131 SkDEBUGCODE(frag = NULL;) |
132 } | 132 } |
133 return true; | 133 return true; |
134 } | 134 } |
135 return false; | 135 return false; |
136 } | 136 } |
137 #endif | 137 #endif |
OLD | NEW |