| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 CC_LAYERS_DRAW_PROPERTIES_H_ | 5 #ifndef CC_LAYERS_DRAW_PROPERTIES_H_ |
| 6 #define CC_LAYERS_DRAW_PROPERTIES_H_ | 6 #define CC_LAYERS_DRAW_PROPERTIES_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "cc/trees/occlusion.h" |
| 9 #include "third_party/skia/include/core/SkXfermode.h" | 10 #include "third_party/skia/include/core/SkXfermode.h" |
| 10 #include "ui/gfx/geometry/rect.h" | 11 #include "ui/gfx/geometry/rect.h" |
| 11 #include "ui/gfx/transform.h" | 12 #include "ui/gfx/transform.h" |
| 12 | 13 |
| 13 namespace cc { | 14 namespace cc { |
| 14 | 15 |
| 15 // Container for properties that layers need to compute before they can be | 16 // Container for properties that layers need to compute before they can be |
| 16 // drawn. | 17 // drawn. |
| 17 template <typename LayerType> | 18 template <typename LayerType> |
| 18 struct CC_EXPORT DrawProperties { | 19 struct CC_EXPORT DrawProperties { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 43 page_scale_factor(0.f), | 44 page_scale_factor(0.f), |
| 44 device_scale_factor(0.f) {} | 45 device_scale_factor(0.f) {} |
| 45 | 46 |
| 46 // Transforms objects from content space to target surface space, where | 47 // Transforms objects from content space to target surface space, where |
| 47 // this layer would be drawn. | 48 // this layer would be drawn. |
| 48 gfx::Transform target_space_transform; | 49 gfx::Transform target_space_transform; |
| 49 | 50 |
| 50 // Transforms objects from content space to screen space (viewport space). | 51 // Transforms objects from content space to screen space (viewport space). |
| 51 gfx::Transform screen_space_transform; | 52 gfx::Transform screen_space_transform; |
| 52 | 53 |
| 54 // Known occlusion above the layer mapped to the content space of the layer. |
| 55 Occlusion occlusion_in_content_space; |
| 56 |
| 53 // DrawProperties::opacity may be different than LayerType::opacity, | 57 // DrawProperties::opacity may be different than LayerType::opacity, |
| 54 // particularly in the case when a RenderSurface re-parents the layer's | 58 // particularly in the case when a RenderSurface re-parents the layer's |
| 55 // opacity, or when opacity is compounded by the hierarchy. | 59 // opacity, or when opacity is compounded by the hierarchy. |
| 56 float opacity; | 60 float opacity; |
| 57 | 61 |
| 58 // DrawProperties::blend_mode may be different than LayerType::blend_mode, | 62 // DrawProperties::blend_mode may be different than LayerType::blend_mode, |
| 59 // when a RenderSurface re-parents the layer's blend_mode. | 63 // when a RenderSurface re-parents the layer's blend_mode. |
| 60 SkXfermode::Mode blend_mode; | 64 SkXfermode::Mode blend_mode; |
| 61 | 65 |
| 62 // xxx_is_animating flags are used to indicate whether the DrawProperties | 66 // xxx_is_animating flags are used to indicate whether the DrawProperties |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 // have page scale applied and others not, this may differ between layers. | 152 // have page scale applied and others not, this may differ between layers. |
| 149 float page_scale_factor; | 153 float page_scale_factor; |
| 150 | 154 |
| 151 // The device scale factor that is applied to the layer. | 155 // The device scale factor that is applied to the layer. |
| 152 float device_scale_factor; | 156 float device_scale_factor; |
| 153 }; | 157 }; |
| 154 | 158 |
| 155 } // namespace cc | 159 } // namespace cc |
| 156 | 160 |
| 157 #endif // CC_LAYERS_DRAW_PROPERTIES_H_ | 161 #endif // CC_LAYERS_DRAW_PROPERTIES_H_ |
| OLD | NEW |