summaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-24 09:38:57 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-24 09:38:57 +0000
commit7af0d794c5cbdc4ed1395db1508ee48e10002400 (patch)
tree6dfbe36086e9564029992b08cb01e73d156bc147 /cc
parentede0b77dcde3b49c869139ad7e4ca872dc11ffef (diff)
downloadchromium_src-7af0d794c5cbdc4ed1395db1508ee48e10002400.zip
chromium_src-7af0d794c5cbdc4ed1395db1508ee48e10002400.tar.gz
chromium_src-7af0d794c5cbdc4ed1395db1508ee48e10002400.tar.bz2
cc:: Chromify DrawProperties
Style-only change. Fix chromium style in draw_properties.h R=jamesr Review URL: https://chromiumcodereview.appspot.com/12963010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190238 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
-rw-r--r--cc/layers/draw_properties.h153
1 files changed, 75 insertions, 78 deletions
diff --git a/cc/layers/draw_properties.h b/cc/layers/draw_properties.h
index 23db23c..aba8c27 100644
--- a/cc/layers/draw_properties.h
+++ b/cc/layers/draw_properties.h
@@ -13,85 +13,82 @@ namespace cc {
// Container for properties that layers need to compute before they can be
// drawn.
-template<typename LayerType, typename RenderSurfaceType>
+template <typename LayerType, typename RenderSurfaceType>
struct CC_EXPORT DrawProperties {
- DrawProperties()
- : opacity(0)
- , opacity_is_animating(false)
- , screen_space_opacity_is_animating(false)
- , target_space_transform_is_animating(false)
- , screen_space_transform_is_animating(false)
- , can_use_lcd_text(false)
- , is_clipped(false)
- , render_target(0)
- , contents_scale_x(1)
- , contents_scale_y(1)
- , num_descendants_that_draw_content(0)
- , descendants_can_clip_selves(false)
- {
- }
-
- // Transforms objects from content space to target surface space, where
- // this layer would be drawn.
- gfx::Transform target_space_transform;
-
- // Transforms objects from content space to screen space (viewport space).
- gfx::Transform screen_space_transform;
-
- // DrawProperties::opacity may be different than LayerType::opacity,
- // particularly in the case when a renderSurface re-parents the layer's
- // opacity, or when opacity is compounded by the hierarchy.
- float opacity;
-
- // XXXIsAnimating flags are used to indicate whether the drawProperties
- // are actually meaningful on the main thread. When the properties are
- // animating, the main thread may not have the same values that are used
- // to draw.
- bool opacity_is_animating;
- bool screen_space_opacity_is_animating;
- bool target_space_transform_is_animating;
- bool screen_space_transform_is_animating;
-
- // True if the layer can use LCD text.
- bool can_use_lcd_text;
-
- // True if the layer needs to be clipped by clipRect.
- bool is_clipped;
-
- // The layer whose coordinate space this layer draws into. This can be
- // either the same layer (m_drawProperties.render_target == this) or an
- // ancestor of this layer.
- LayerType* render_target;
-
- // The surface that this layer and its subtree would contribute to.
- scoped_ptr<RenderSurfaceType> render_surface;
-
- // This rect is in the layer's content space.
- gfx::Rect visible_content_rect;
-
- // In target surface space, the rect that encloses the clipped, drawable
- // content of the layer.
- gfx::Rect drawable_content_rect;
-
- // In target surface space, the original rect that clipped this
- // layer. This value is used to avoid unnecessarily changing GL scissor
- // state.
- gfx::Rect clip_rect;
-
- // The scale used to move between layer space and content space, and bounds
- // of the space. One is always a function of the other, but which one
- // depends on the layer type. For picture layers, this is an ideal scale,
- // and not always the one used.
- float contents_scale_x;
- float contents_scale_y;
- gfx::Size content_bounds;
-
- // Does not include this layer itself, only its children and descendants.
- int num_descendants_that_draw_content;
-
- // If true, every descendant in the sub-tree can clip itself without the
- // need to use hardware sissoring or a new render target.
- bool descendants_can_clip_selves;
+ DrawProperties()
+ : opacity(0.f),
+ opacity_is_animating(false),
+ screen_space_opacity_is_animating(false),
+ target_space_transform_is_animating(false),
+ screen_space_transform_is_animating(false),
+ can_use_lcd_text(false),
+ is_clipped(false),
+ render_target(NULL),
+ contents_scale_x(1.f),
+ contents_scale_y(1.f),
+ num_descendants_that_draw_content(0),
+ descendants_can_clip_selves(false) {}
+
+ // Transforms objects from content space to target surface space, where
+ // this layer would be drawn.
+ gfx::Transform target_space_transform;
+
+ // Transforms objects from content space to screen space (viewport space).
+ gfx::Transform screen_space_transform;
+
+ // DrawProperties::opacity may be different than LayerType::opacity,
+ // particularly in the case when a renderSurface re-parents the layer's
+ // opacity, or when opacity is compounded by the hierarchy.
+ float opacity;
+
+ // xxx_is_animating flags are used to indicate whether the DrawProperties
+ // are actually meaningful on the main thread. When the properties are
+ // animating, the main thread may not have the same values that are used
+ // to draw.
+ bool opacity_is_animating;
+ bool screen_space_opacity_is_animating;
+ bool target_space_transform_is_animating;
+ bool screen_space_transform_is_animating;
+
+ // True if the layer can use LCD text.
+ bool can_use_lcd_text;
+
+ // True if the layer needs to be clipped by clipRect.
+ bool is_clipped;
+
+ // The layer whose coordinate space this layer draws into. This can be
+ // either the same layer (draw_properties_.render_target == this) or an
+ // ancestor of this layer.
+ LayerType* render_target;
+
+ // The surface that this layer and its subtree would contribute to.
+ scoped_ptr<RenderSurfaceType> render_surface;
+
+ // This rect is in the layer's content space.
+ gfx::Rect visible_content_rect;
+
+ // In target surface space, the rect that encloses the clipped, drawable
+ // content of the layer.
+ gfx::Rect drawable_content_rect;
+
+ // In target surface space, the original rect that clipped this layer. This
+ // value is used to avoid unnecessarily changing GL scissor state.
+ gfx::Rect clip_rect;
+
+ // The scale used to move between layer space and content space, and bounds
+ // of the space. One is always a function of the other, but which one
+ // depends on the layer type. For picture layers, this is an ideal scale,
+ // and not always the one used.
+ float contents_scale_x;
+ float contents_scale_y;
+ gfx::Size content_bounds;
+
+ // Does not include this layer itself, only its children and descendants.
+ int num_descendants_that_draw_content;
+
+ // If true, every descendant in the sub-tree can clip itself without the
+ // need to use hardware sissoring or a new render target.
+ bool descendants_can_clip_selves;
};
} // namespace cc