OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "views/layer_helper.h" | 5 #include "views/layer_helper.h" |
6 | 6 |
7 #include "views/layer_property_setter.h" | 7 #include "views/layer_property_setter.h" |
8 #include "ui/gfx/compositor/layer.h" | 8 #include "ui/gfx/compositor/layer.h" |
9 #include "ui/gfx/transform.h" | 9 #include "ui/gfx/transform.h" |
10 | 10 |
11 namespace views { | 11 namespace views { |
12 | 12 |
13 namespace internal { | 13 namespace internal { |
14 | 14 |
15 LayerHelper::LayerHelper() | 15 LayerHelper::LayerHelper() |
16 : bitmap_needs_updating_(true), | 16 : fills_bounds_opaquely_(false), |
17 fills_bounds_opaquely_(false), | |
18 layer_updated_externally_(false), | 17 layer_updated_externally_(false), |
19 paint_to_layer_(false), | 18 paint_to_layer_(false), |
20 property_setter_explicitly_set_(false), | 19 property_setter_explicitly_set_(false), |
21 needs_paint_all_(true) { | 20 needs_paint_all_(true) { |
22 } | 21 } |
23 | 22 |
24 LayerHelper::~LayerHelper() { | 23 LayerHelper::~LayerHelper() { |
25 if (property_setter_.get() && layer_.get()) | 24 if (property_setter_.get() && layer_.get()) |
26 property_setter_->Uninstalled(layer_.get()); | 25 property_setter_->Uninstalled(layer_.get()); |
27 property_setter_.reset(); | 26 property_setter_.reset(); |
(...skipping 28 matching lines...) Expand all Loading... |
56 } | 55 } |
57 } | 56 } |
58 | 57 |
59 bool LayerHelper::ShouldPaintToLayer() const { | 58 bool LayerHelper::ShouldPaintToLayer() const { |
60 return paint_to_layer_ || (transform_.get() && transform_->HasChange()); | 59 return paint_to_layer_ || (transform_.get() && transform_->HasChange()); |
61 } | 60 } |
62 | 61 |
63 } // namespace internal | 62 } // namespace internal |
64 | 63 |
65 } // namespace views | 64 } // namespace views |
OLD | NEW |