Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(606)

Side by Side Diff: cc/draw_properties.h

Issue 11419284: Move second internal recursion to a precomputation in layer_tree_host_common.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleaned up and rebased Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 , target_space_transform_is_animating(false) 21 , target_space_transform_is_animating(false)
22 , screen_space_transform_is_animating(false) 22 , screen_space_transform_is_animating(false)
23 , is_clipped(false) 23 , is_clipped(false)
24 , render_target(0) 24 , render_target(0)
25 , num_descendants_that_draw_content(0)
25 { 26 {
26 } 27 }
27 28
28 // Transforms objects from content space to target surface space, where 29 // Transforms objects from content space to target surface space, where
29 // this layer would be drawn. 30 // this layer would be drawn.
30 gfx::Transform target_space_transform; 31 gfx::Transform target_space_transform;
31 32
32 // Transforms objects from content space to screen space (viewport space). 33 // Transforms objects from content space to screen space (viewport space).
33 gfx::Transform screen_space_transform; 34 gfx::Transform screen_space_transform;
34 35
(...skipping 25 matching lines...) Expand all
60 gfx::Rect visible_content_rect; 61 gfx::Rect visible_content_rect;
61 62
62 // In target surface space, the rect that encloses the clipped, drawable 63 // In target surface space, the rect that encloses the clipped, drawable
63 // content of the layer. 64 // content of the layer.
64 gfx::Rect drawable_content_rect; 65 gfx::Rect drawable_content_rect;
65 66
66 // In target surface space, the original rect that clipped this 67 // In target surface space, the original rect that clipped this
67 // layer. This value is used to avoid unnecessarily changing GL scissor 68 // layer. This value is used to avoid unnecessarily changing GL scissor
68 // state. 69 // state.
69 gfx::Rect clip_rect; 70 gfx::Rect clip_rect;
71
72 // Does not include this layer itself, only its children and descendants.
73 int num_descendants_that_draw_content;
70 }; 74 };
71 75
72 } // namespace cc 76 } // namespace cc
73 77
74 #endif // CC_DRAW_PROPERTIES_H_ 78 #endif // CC_DRAW_PROPERTIES_H_
OLDNEW
« no previous file with comments | « cc/delegated_renderer_layer_impl.cc ('k') | cc/layer.h » ('j') | cc/layer_tree_host_common.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698