OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 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 SkRasterPipeline_DEFINED | 8 #ifndef SkRasterPipeline_DEFINED |
9 #define SkRasterPipeline_DEFINED | 9 #define SkRasterPipeline_DEFINED |
10 | 10 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 | 53 |
54 // TODO: There may be a better place to stuff tail, e.g. in the bottom alignment
bits of | 54 // TODO: There may be a better place to stuff tail, e.g. in the bottom alignment
bits of |
55 // the Stage*. This mostly matters on 64-bit Windows where every register is pr
ecious. | 55 // the Stage*. This mostly matters on 64-bit Windows where every register is pr
ecious. |
56 | 56 |
57 #define SK_RASTER_PIPELINE_STAGES(M) \ | 57 #define SK_RASTER_PIPELINE_STAGES(M) \ |
58 M(move_src_dst) M(clamp_0) M(clamp_a) M(unpremul) M(premul) \ | 58 M(move_src_dst) M(clamp_0) M(clamp_a) M(unpremul) M(premul) \ |
59 M(constant_color) M(store_f32) \ | 59 M(constant_color) M(store_f32) \ |
60 M(load_s_565) M(load_d_565) M(store_565) \ | 60 M(load_s_565) M(load_d_565) M(store_565) \ |
61 M(load_s_srgb) M(load_d_srgb) M(store_srgb) \ | 61 M(load_s_srgb) M(load_d_srgb) M(store_srgb) \ |
62 M(load_s_f16) M(load_d_f16) M(store_f16) \ | 62 M(load_s_f16) M(load_d_f16) M(store_f16) \ |
| 63 M(load_s_8888) M(store_8888) \ |
63 M(scale_u8) M(scale_constant_float) \ | 64 M(scale_u8) M(scale_constant_float) \ |
64 M(lerp_u8) M(lerp_565) M(lerp_constant_float) \ | 65 M(lerp_u8) M(lerp_565) M(lerp_constant_float) \ |
65 M(dst) \ | 66 M(dst) \ |
66 M(dstatop) M(dstin) M(dstout) M(dstover) \ | 67 M(dstatop) M(dstin) M(dstout) M(dstover) \ |
67 M(srcatop) M(srcin) M(srcout) M(srcover) \ | 68 M(srcatop) M(srcin) M(srcout) M(srcover) \ |
68 M(clear) M(modulate) M(multiply) M(plus_) M(screen) M(xor_) \ | 69 M(clear) M(modulate) M(multiply) M(plus_) M(screen) M(xor_) \ |
69 M(colorburn) M(colordodge) M(darken) M(difference) \ | 70 M(colorburn) M(colordodge) M(darken) M(difference) \ |
70 M(exclusion) M(hardlight) M(lighten) M(overlay) M(softlight) \ | 71 M(exclusion) M(hardlight) M(lighten) M(overlay) M(softlight) \ |
71 M(luminance_to_alpha) M(matrix_4x5) | 72 M(luminance_to_alpha) M(matrix_3x4) M(matrix_4x5) \ |
| 73 M(fn_1_r) M(fn_1_g) M(fn_1_b) \ |
| 74 M(color_lookup_table) M(lab_to_xyz) M(swap_rb) |
72 | 75 |
73 class SkRasterPipeline { | 76 class SkRasterPipeline { |
74 public: | 77 public: |
75 // No pipeline may be more than kMaxStages long. | 78 // No pipeline may be more than kMaxStages long. |
76 static const int kMaxStages = 32; | 79 static const int kMaxStages = 32; |
77 | 80 |
78 SkRasterPipeline(); | 81 SkRasterPipeline(); |
79 | 82 |
80 enum StockStage { | 83 enum StockStage { |
81 #define M(stage) stage, | 84 #define M(stage) stage, |
(...skipping 13 matching lines...) Expand all Loading... |
95 StockStage stage; | 98 StockStage stage; |
96 void* ctx; | 99 void* ctx; |
97 }; | 100 }; |
98 | 101 |
99 private: | 102 private: |
100 int fNum = 0; | 103 int fNum = 0; |
101 Stage fStages[kMaxStages]; | 104 Stage fStages[kMaxStages]; |
102 }; | 105 }; |
103 | 106 |
104 #endif//SkRasterPipeline_DEFINED | 107 #endif//SkRasterPipeline_DEFINED |
OLD | NEW |