OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_DC_RENDERER_LAYER_PARAMS_H_ | 5 #ifndef UI_GL_DC_RENDERER_LAYER_PARAMS_H_ |
6 #define UI_GL_DC_RENDERER_LAYER_PARAMS_H_ | 6 #define UI_GL_DC_RENDERER_LAYER_PARAMS_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "third_party/skia/include/core/SkColor.h" | 11 #include "third_party/skia/include/core/SkColor.h" |
12 #include "ui/gfx/geometry/point.h" | 12 #include "ui/gfx/geometry/point.h" |
13 #include "ui/gfx/geometry/rect.h" | 13 #include "ui/gfx/geometry/rect.h" |
14 #include "ui/gfx/geometry/rect_f.h" | 14 #include "ui/gfx/geometry/rect_f.h" |
15 #include "ui/gfx/transform.h" | 15 #include "ui/gfx/transform.h" |
16 #include "ui/gl/gl_export.h" | 16 #include "ui/gl/gl_export.h" |
17 | 17 |
18 namespace gl { | 18 namespace gl { |
19 class GLImage; | 19 class GLImage; |
20 } | 20 } |
21 | 21 |
22 namespace ui { | 22 namespace ui { |
23 | 23 |
24 struct GL_EXPORT DCRendererLayerParams { | 24 struct GL_EXPORT DCRendererLayerParams { |
25 DCRendererLayerParams(bool is_clipped, | 25 DCRendererLayerParams(bool is_clipped, |
26 const gfx::Rect clip_rect, | 26 const gfx::Rect clip_rect, |
27 int z_order, | 27 int z_order, |
28 const gfx::Transform& transform, | 28 const gfx::Transform& transform, |
29 gl::GLImage* image, | 29 std::vector<scoped_refptr<gl::GLImage>> image, |
30 const gfx::RectF& contents_rect, | 30 const gfx::RectF& contents_rect, |
31 const gfx::Rect& rect, | 31 const gfx::Rect& rect, |
32 unsigned background_color, | 32 unsigned background_color, |
33 unsigned edge_aa_mask, | 33 unsigned edge_aa_mask, |
34 float opacity, | 34 float opacity, |
35 unsigned filter); | 35 unsigned filter); |
36 DCRendererLayerParams(const DCRendererLayerParams& other); | 36 DCRendererLayerParams(const DCRendererLayerParams& other); |
37 ~DCRendererLayerParams(); | 37 ~DCRendererLayerParams(); |
38 | 38 |
39 bool is_clipped; | 39 bool is_clipped; |
40 const gfx::Rect clip_rect; | 40 const gfx::Rect clip_rect; |
41 int z_order; | 41 int z_order; |
42 const gfx::Transform transform; | 42 const gfx::Transform transform; |
43 scoped_refptr<gl::GLImage> image; | 43 std::vector<scoped_refptr<gl::GLImage>> image; |
44 const gfx::RectF contents_rect; | 44 const gfx::RectF contents_rect; |
45 const gfx::Rect rect; | 45 const gfx::Rect rect; |
46 unsigned background_color; | 46 unsigned background_color; |
47 unsigned edge_aa_mask; | 47 unsigned edge_aa_mask; |
48 float opacity; | 48 float opacity; |
49 unsigned filter; | 49 unsigned filter; |
50 | 50 |
51 // This is a subset of cc::FilterOperation::FilterType. | 51 // This is a subset of cc::FilterOperation::FilterType. |
52 enum class FilterEffectType : uint32_t { | 52 enum class FilterEffectType : uint32_t { |
53 GRAYSDCLE, | 53 GRAYSDCLE, |
(...skipping 16 matching lines...) Expand all Loading... |
70 SkColor drop_shadow_color = 0; | 70 SkColor drop_shadow_color = 0; |
71 }; | 71 }; |
72 using FilterEffects = std::vector<FilterEffect>; | 72 using FilterEffects = std::vector<FilterEffect>; |
73 | 73 |
74 FilterEffects filter_effects; | 74 FilterEffects filter_effects; |
75 }; | 75 }; |
76 | 76 |
77 } // namespace ui | 77 } // namespace ui |
78 | 78 |
79 #endif // UI_GL_DC_RENDERER_LAYER_PARAMS_H_ | 79 #endif // UI_GL_DC_RENDERER_LAYER_PARAMS_H_ |
OLD | NEW |