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