Chromium Code Reviews| 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_DRAW_PROPERTIES_H_ | 5 #ifndef CC_DRAW_PROPERTIES_H_ |
| 6 #define CC_DRAW_PROPERTIES_H_ | 6 #define CC_DRAW_PROPERTIES_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "ui/gfx/rect.h" | 9 #include "ui/gfx/rect.h" |
| 10 #include "ui/gfx/transform.h" | 10 #include "ui/gfx/transform.h" |
| 11 | 11 |
| 12 namespace cc { | 12 namespace cc { |
| 13 | 13 |
| 14 // Container for properties that layers need to compute before they can be | 14 // Container for properties that layers need to compute before they can be |
| 15 // drawn. | 15 // drawn. |
| 16 template<typename LayerType, typename RenderSurfaceType> | 16 template<typename LayerType, typename RenderSurfaceType> |
| 17 struct CC_EXPORT DrawProperties { | 17 struct CC_EXPORT DrawProperties { |
| 18 DrawProperties() | 18 DrawProperties() |
| 19 : opacity(0) | 19 : opacity(0) |
| 20 , opacity_is_animating(false) | 20 , opacity_is_animating(false) |
| 21 , screen_space_opacity_is_animating(false) | 21 , screen_space_opacity_is_animating(false) |
| 22 , target_space_transform_is_animating(false) | 22 , target_space_transform_is_animating(false) |
| 23 , screen_space_transform_is_animating(false) | 23 , screen_space_transform_is_animating(false) |
| 24 , can_use_lcd_text(false) | 24 , can_use_lcd_text(false) |
| 25 , is_clipped(false) | 25 , is_clipped(false) |
| 26 , render_target(0) | 26 , render_target(0) |
| 27 , num_descendants_that_draw_content(0) | 27 , num_descendants_that_draw_content(0) |
| 28 , can_clip_self(false) | |
| 28 { | 29 { |
| 29 } | 30 } |
| 30 | 31 |
| 31 // Transforms objects from content space to target surface space, where | 32 // Transforms objects from content space to target surface space, where |
| 32 // this layer would be drawn. | 33 // this layer would be drawn. |
| 33 gfx::Transform target_space_transform; | 34 gfx::Transform target_space_transform; |
| 34 | 35 |
| 35 // Transforms objects from content space to screen space (viewport space). | 36 // Transforms objects from content space to screen space (viewport space). |
| 36 gfx::Transform screen_space_transform; | 37 gfx::Transform screen_space_transform; |
| 37 | 38 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 70 // content of the layer. | 71 // content of the layer. |
| 71 gfx::Rect drawable_content_rect; | 72 gfx::Rect drawable_content_rect; |
| 72 | 73 |
| 73 // In target surface space, the original rect that clipped this | 74 // In target surface space, the original rect that clipped this |
| 74 // layer. This value is used to avoid unnecessarily changing GL scissor | 75 // layer. This value is used to avoid unnecessarily changing GL scissor |
| 75 // state. | 76 // state. |
| 76 gfx::Rect clip_rect; | 77 gfx::Rect clip_rect; |
| 77 | 78 |
| 78 // Does not include this layer itself, only its children and descendants. | 79 // Does not include this layer itself, only its children and descendants. |
| 79 int num_descendants_that_draw_content; | 80 int num_descendants_that_draw_content; |
| 81 int can_clip_self; | |
|
slavi
2012/12/15 02:39:00
bool?
danakj
2012/12/15 18:49:12
Would still like a descriptive comment here to say
| |
| 80 }; | 82 }; |
| 81 | 83 |
| 82 } // namespace cc | 84 } // namespace cc |
| 83 | 85 |
| 84 #endif // CC_DRAW_PROPERTIES_H_ | 86 #endif // CC_DRAW_PROPERTIES_H_ |
| OLD | NEW |