summaryrefslogtreecommitdiffstats
path: root/cc/layers/layer.h
diff options
context:
space:
mode:
authorvivek.vg@samsung.com <vivek.vg@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-10 05:48:48 +0000
committervivek.vg@samsung.com <vivek.vg@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-10 05:48:48 +0000
commitc55f3fc4f7d6e50b33489678eaf18c3c0be21114 (patch)
tree302209f76884a43a09ca4ea8d64f256a7c8b2279 /cc/layers/layer.h
parent5cc0de5a3ee6bfb79c843445ff6fbeb48896e77d (diff)
downloadchromium_src-c55f3fc4f7d6e50b33489678eaf18c3c0be21114.zip
chromium_src-c55f3fc4f7d6e50b33489678eaf18c3c0be21114.tar.gz
chromium_src-c55f3fc4f7d6e50b33489678eaf18c3c0be21114.tar.bz2
Use bit fields inside cc to reduce memory usage.
Using bitfields we get the memory usage as follows +-----+---------------------------+------------------------+---------+ |.No..|.Class/Structure/File......|.Size.of.object.(bytes).|.Memory..| |.....|...........................+------------------------+.Reduced.| |.....|...........................|...Before..|...After....|.........| +-----+---------------------------+-----------+------------+---------+ |..1..|.cc::Layer.................|......840..|.....824....|......16.| +-----+---------------------------+-----------+------------+---------+ |..2..|.cc::LayerImpl.............|......880..|.....864....|......16.| +-----+---------------------------+-----------+------------+---------+ |..3..|.cc::RenderSurfaceImpl.....|......408..|.....400....|.......8.| +-----+---------------------------+-----------+------------+---------+ Review URL: https://codereview.chromium.org/102733006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239682 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/layers/layer.h')
-rw-r--r--cc/layers/layer.h32
1 files changed, 16 insertions, 16 deletions
diff --git a/cc/layers/layer.h b/cc/layers/layer.h
index 59991e6..f0bca17 100644
--- a/cc/layers/layer.h
+++ b/cc/layers/layer.h
@@ -573,11 +573,22 @@ class CC_EXPORT Layer : public base::RefCounted<Layer>,
gfx::Vector2d scroll_offset_;
gfx::Vector2d max_scroll_offset_;
- bool scrollable_;
- bool should_scroll_on_main_thread_;
- bool have_wheel_event_handlers_;
- bool user_scrollable_horizontal_;
- bool user_scrollable_vertical_;
+ bool scrollable_ : 1;
+ bool should_scroll_on_main_thread_ : 1;
+ bool have_wheel_event_handlers_ : 1;
+ bool user_scrollable_horizontal_ : 1;
+ bool user_scrollable_vertical_ : 1;
+ bool is_root_for_isolated_group_ : 1;
+ bool is_container_for_fixed_position_layers_ : 1;
+ bool is_drawable_ : 1;
+ bool hide_layer_and_subtree_ : 1;
+ bool masks_to_bounds_ : 1;
+ bool contents_opaque_ : 1;
+ bool double_sided_ : 1;
+ bool preserves_3d_ : 1;
+ bool use_parent_backface_visibility_ : 1;
+ bool draw_checkerboard_for_missing_tiles_ : 1;
+ bool force_render_surface_ : 1;
Region non_fast_scrollable_region_;
Region touch_event_handler_region_;
gfx::PointF position_;
@@ -586,21 +597,10 @@ class CC_EXPORT Layer : public base::RefCounted<Layer>,
CompositingReasons compositing_reasons_;
float opacity_;
SkXfermode::Mode blend_mode_;
- bool is_root_for_isolated_group_;
FilterOperations filters_;
FilterOperations background_filters_;
float anchor_point_z_;
- bool is_container_for_fixed_position_layers_;
LayerPositionConstraint position_constraint_;
- bool is_drawable_;
- bool hide_layer_and_subtree_;
- bool masks_to_bounds_;
- bool contents_opaque_;
- bool double_sided_;
- bool preserves_3d_;
- bool use_parent_backface_visibility_;
- bool draw_checkerboard_for_missing_tiles_;
- bool force_render_surface_;
Layer* scroll_parent_;
scoped_ptr<std::set<Layer*> > scroll_children_;