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

Side by Side Diff: cc/layers/layer.cc

Issue 102733006: Use bit fields inside cc to reduce memory usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Modified after the review comments! Created 7 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
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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 #include "cc/layers/layer.h" 5 #include "cc/layers/layer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 26 matching lines...) Expand all
37 stacking_order_changed_(false), 37 stacking_order_changed_(false),
38 layer_id_(s_next_layer_id++), 38 layer_id_(s_next_layer_id++),
39 ignore_set_needs_commit_(false), 39 ignore_set_needs_commit_(false),
40 parent_(NULL), 40 parent_(NULL),
41 layer_tree_host_(NULL), 41 layer_tree_host_(NULL),
42 scrollable_(false), 42 scrollable_(false),
43 should_scroll_on_main_thread_(false), 43 should_scroll_on_main_thread_(false),
44 have_wheel_event_handlers_(false), 44 have_wheel_event_handlers_(false),
45 user_scrollable_horizontal_(true), 45 user_scrollable_horizontal_(true),
46 user_scrollable_vertical_(true), 46 user_scrollable_vertical_(true),
47 anchor_point_(0.5f, 0.5f),
48 background_color_(0),
49 compositing_reasons_(kCompositingReasonUnknown),
50 opacity_(1.f),
51 blend_mode_(SkXfermode::kSrcOver_Mode),
52 is_root_for_isolated_group_(false), 47 is_root_for_isolated_group_(false),
53 anchor_point_z_(0.f),
54 is_container_for_fixed_position_layers_(false), 48 is_container_for_fixed_position_layers_(false),
55 is_drawable_(false), 49 is_drawable_(false),
56 hide_layer_and_subtree_(false), 50 hide_layer_and_subtree_(false),
57 masks_to_bounds_(false), 51 masks_to_bounds_(false),
58 contents_opaque_(false), 52 contents_opaque_(false),
59 double_sided_(true), 53 double_sided_(true),
60 preserves_3d_(false), 54 preserves_3d_(false),
61 use_parent_backface_visibility_(false), 55 use_parent_backface_visibility_(false),
62 draw_checkerboard_for_missing_tiles_(false), 56 draw_checkerboard_for_missing_tiles_(false),
63 force_render_surface_(false), 57 force_render_surface_(false),
58 anchor_point_(0.5f, 0.5f),
59 background_color_(0),
60 compositing_reasons_(kCompositingReasonUnknown),
61 opacity_(1.f),
62 blend_mode_(SkXfermode::kSrcOver_Mode),
63 anchor_point_z_(0.f),
64 scroll_parent_(NULL), 64 scroll_parent_(NULL),
65 clip_parent_(NULL), 65 clip_parent_(NULL),
66 replica_layer_(NULL), 66 replica_layer_(NULL),
67 raster_scale_(0.f), 67 raster_scale_(0.f),
68 client_(NULL) { 68 client_(NULL) {
69 if (layer_id_ < 0) { 69 if (layer_id_ < 0) {
70 s_next_layer_id = 1; 70 s_next_layer_id = 1;
71 layer_id_ = s_next_layer_id++; 71 layer_id_ = s_next_layer_id++;
72 } 72 }
73 73
(...skipping 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after
1181 clip_parent_->RemoveClipChild(this); 1181 clip_parent_->RemoveClipChild(this);
1182 1182
1183 clip_parent_ = NULL; 1183 clip_parent_ = NULL;
1184 } 1184 }
1185 1185
1186 void Layer::RunMicroBenchmark(MicroBenchmark* benchmark) { 1186 void Layer::RunMicroBenchmark(MicroBenchmark* benchmark) {
1187 benchmark->RunOnLayer(this); 1187 benchmark->RunOnLayer(this);
1188 } 1188 }
1189 1189
1190 } // namespace cc 1190 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698