OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 #ifndef GrColorProcessor_DEFINED | 8 #ifndef GrColorProcessor_DEFINED |
9 #define GrColorProcessor_DEFINED | 9 #define GrColorProcessor_DEFINED |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 enum InputMode { | 22 enum InputMode { |
23 kIgnore_InputMode, | 23 kIgnore_InputMode, |
24 kModulateRGBA_InputMode, | 24 kModulateRGBA_InputMode, |
25 kModulateA_InputMode, | 25 kModulateA_InputMode, |
26 | 26 |
27 kLastInputMode = kModulateA_InputMode | 27 kLastInputMode = kModulateA_InputMode |
28 }; | 28 }; |
29 static const int kInputModeCnt = kLastInputMode + 1; | 29 static const int kInputModeCnt = kLastInputMode + 1; |
30 | 30 |
31 static GrFragmentProcessor* Create(GrColor color, InputMode mode) { | 31 static GrFragmentProcessor* Create(GrColor color, InputMode mode) { |
32 return SkNEW_ARGS(GrConstColorProcessor, (color, mode)); | 32 return new GrConstColorProcessor(color, mode); |
33 } | 33 } |
34 | 34 |
35 ~GrConstColorProcessor() override {} | 35 ~GrConstColorProcessor() override {} |
36 | 36 |
37 const char* name() const override { return "Color"; } | 37 const char* name() const override { return "Color"; } |
38 | 38 |
39 GrColor color() const { return fColor; } | 39 GrColor color() const { return fColor; } |
40 | 40 |
41 InputMode inputMode() const { return fMode; } | 41 InputMode inputMode() const { return fMode; } |
42 | 42 |
(...skipping 12 matching lines...) Expand all Loading... |
55 | 55 |
56 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; | 56 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; |
57 | 57 |
58 GrColor fColor; | 58 GrColor fColor; |
59 InputMode fMode; | 59 InputMode fMode; |
60 | 60 |
61 typedef GrFragmentProcessor INHERITED; | 61 typedef GrFragmentProcessor INHERITED; |
62 }; | 62 }; |
63 | 63 |
64 #endif | 64 #endif |
OLD | NEW |