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