OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_GL_CA_RENDERER_LAYER_PARAMS_H_ | 5 #ifndef UI_GL_CA_RENDERER_LAYER_PARAMS_H_ |
6 #define UI_GL_CA_RENDERER_LAYER_PARAMS_H_ | 6 #define UI_GL_CA_RENDERER_LAYER_PARAMS_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "third_party/skia/include/core/SkColor.h" | 10 #include "third_party/skia/include/core/SkColor.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 gl::GLImage* image; | 42 gl::GLImage* image; |
43 const gfx::RectF contents_rect; | 43 const gfx::RectF contents_rect; |
44 const gfx::Rect rect; | 44 const gfx::Rect rect; |
45 unsigned background_color; | 45 unsigned background_color; |
46 unsigned edge_aa_mask; | 46 unsigned edge_aa_mask; |
47 float opacity; | 47 float opacity; |
48 unsigned filter; | 48 unsigned filter; |
49 | 49 |
50 // This is a subset of cc::FilterOperation::FilterType. | 50 // This is a subset of cc::FilterOperation::FilterType. |
51 enum class FilterEffectType : uint32_t { | 51 enum class FilterEffectType : uint32_t { |
52 GRAYSCALE, | 52 MIN, |
| 53 GRAYSCALE = MIN, |
53 SEPIA, | 54 SEPIA, |
54 SATURATE, | 55 SATURATE, |
55 HUE_ROTATE, | 56 HUE_ROTATE, |
56 INVERT, | 57 INVERT, |
57 BRIGHTNESS, | 58 BRIGHTNESS, |
58 CONTRAST, | 59 CONTRAST, |
59 OPACITY, | 60 OPACITY, |
60 BLUR, | 61 BLUR, |
61 DROP_SHADOW, | 62 DROP_SHADOW, |
| 63 MAX = DROP_SHADOW |
62 }; | 64 }; |
63 struct GL_EXPORT FilterEffect { | 65 struct GL_EXPORT FilterEffect { |
64 FilterEffectType type = FilterEffectType::GRAYSCALE; | 66 FilterEffectType type = FilterEffectType::GRAYSCALE; |
65 | 67 |
66 // For every filter other than DROP_SHADOW, only |amount| is populated. | 68 // For every filter other than DROP_SHADOW, only |amount| is populated. |
67 float amount = 0; | 69 float amount = 0; |
68 gfx::Point drop_shadow_offset; | 70 gfx::Point drop_shadow_offset; |
69 SkColor drop_shadow_color = 0; | 71 SkColor drop_shadow_color = 0; |
70 }; | 72 }; |
71 using FilterEffects = std::vector<FilterEffect>; | 73 using FilterEffects = std::vector<FilterEffect>; |
72 | 74 |
73 FilterEffects filter_effects; | 75 FilterEffects filter_effects; |
74 }; | 76 }; |
75 | 77 |
76 } // namespace ui | 78 } // namespace ui |
77 | 79 |
78 #endif // UI_GL_CA_RENDERER_LAYER_PARAMS_H_ | 80 #endif // UI_GL_CA_RENDERER_LAYER_PARAMS_H_ |
OLD | NEW |