OLD | NEW |
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 #include "cc/layers/picture_layer.h" | 5 #include "cc/layers/picture_layer.h" |
6 | 6 |
7 #include "cc/debug/devtools_instrumentation.h" | 7 #include "cc/debug/devtools_instrumentation.h" |
8 #include "cc/layers/picture_layer_impl.h" | 8 #include "cc/layers/picture_layer_impl.h" |
9 #include "cc/trees/layer_tree_impl.h" | 9 #include "cc/trees/layer_tree_impl.h" |
10 #include "ui/gfx/rect_conversions.h" | 10 #include "ui/gfx/rect_conversions.h" |
11 | 11 |
12 namespace cc { | 12 namespace cc { |
13 | 13 |
14 scoped_refptr<PictureLayer> PictureLayer::Create(ContentLayerClient* client) { | 14 scoped_refptr<PictureLayer> PictureLayer::Create(ContentLayerClient* client) { |
15 return make_scoped_refptr(new PictureLayer(client)); | 15 return make_scoped_refptr(new PictureLayer(client)); |
16 } | 16 } |
17 | 17 |
18 PictureLayer::PictureLayer(ContentLayerClient* client) : | 18 PictureLayer::PictureLayer(ContentLayerClient* client) |
19 client_(client), | 19 : client_(client), |
20 pile_(make_scoped_refptr(new PicturePile())), | 20 pile_(make_scoped_refptr(new PicturePile())), |
21 instrumentation_object_tracker_(id()), | 21 instrumentation_object_tracker_(id()), |
22 is_mask_(false) { | 22 is_mask_(false) { |
23 } | 23 } |
24 | 24 |
25 PictureLayer::~PictureLayer() { | 25 PictureLayer::~PictureLayer() { |
26 } | 26 } |
27 | 27 |
28 bool PictureLayer::DrawsContent() const { | 28 bool PictureLayer::DrawsContent() const { |
29 return Layer::DrawsContent() && client_; | 29 return Layer::DrawsContent() && client_; |
30 } | 30 } |
31 | 31 |
32 scoped_ptr<LayerImpl> PictureLayer::CreateLayerImpl(LayerTreeImpl* tree_impl) { | 32 scoped_ptr<LayerImpl> PictureLayer::CreateLayerImpl(LayerTreeImpl* tree_impl) { |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 pile_invalidation_, | 88 pile_invalidation_, |
89 visible_layer_rect, | 89 visible_layer_rect, |
90 stats); | 90 stats); |
91 } | 91 } |
92 | 92 |
93 void PictureLayer::SetIsMask(bool is_mask) { | 93 void PictureLayer::SetIsMask(bool is_mask) { |
94 is_mask_ = is_mask; | 94 is_mask_ = is_mask; |
95 } | 95 } |
96 | 96 |
97 } // namespace cc | 97 } // namespace cc |
OLD | NEW |