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 "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "cc/layers/content_layer_client.h" | 8 #include "cc/layers/content_layer_client.h" |
9 #include "cc/layers/picture_layer_impl.h" | 9 #include "cc/layers/picture_layer_impl.h" |
10 #include "cc/resources/display_list_recording_source.h" | 10 #include "cc/resources/display_list_recording_source.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 PictureLayer::PictureLayer(ContentLayerClient* client, | 31 PictureLayer::PictureLayer(ContentLayerClient* client, |
32 scoped_ptr<RecordingSource> source) | 32 scoped_ptr<RecordingSource> source) |
33 : PictureLayer(client) { | 33 : PictureLayer(client) { |
34 recording_source_ = source.Pass(); | 34 recording_source_ = source.Pass(); |
35 } | 35 } |
36 | 36 |
37 PictureLayer::~PictureLayer() { | 37 PictureLayer::~PictureLayer() { |
38 } | 38 } |
39 | 39 |
40 scoped_ptr<LayerImpl> PictureLayer::CreateLayerImpl(LayerTreeImpl* tree_impl) { | 40 scoped_ptr<LayerImpl> PictureLayer::CreateLayerImpl(LayerTreeImpl* tree_impl) { |
41 return PictureLayerImpl::Create(tree_impl, id(), is_mask_); | 41 return PictureLayerImpl::Create(tree_impl, id(), is_mask_, |
| 42 new LayerImpl::SyncedScrollOffset); |
42 } | 43 } |
43 | 44 |
44 void PictureLayer::PushPropertiesTo(LayerImpl* base_layer) { | 45 void PictureLayer::PushPropertiesTo(LayerImpl* base_layer) { |
45 Layer::PushPropertiesTo(base_layer); | 46 Layer::PushPropertiesTo(base_layer); |
46 PictureLayerImpl* layer_impl = static_cast<PictureLayerImpl*>(base_layer); | 47 PictureLayerImpl* layer_impl = static_cast<PictureLayerImpl*>(base_layer); |
47 // TODO(danakj): Make is_mask_ a constructor parameter for PictureLayer. | 48 // TODO(danakj): Make is_mask_ a constructor parameter for PictureLayer. |
48 DCHECK_EQ(layer_impl->is_mask(), is_mask_); | 49 DCHECK_EQ(layer_impl->is_mask(), is_mask_); |
49 | 50 |
50 int source_frame_number = layer_tree_host()->source_frame_number(); | 51 int source_frame_number = layer_tree_host()->source_frame_number(); |
51 gfx::Size impl_bounds = layer_impl->bounds(); | 52 gfx::Size impl_bounds = layer_impl->bounds(); |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 | 218 |
218 bool PictureLayer::HasDrawableContent() const { | 219 bool PictureLayer::HasDrawableContent() const { |
219 return client_ && Layer::HasDrawableContent(); | 220 return client_ && Layer::HasDrawableContent(); |
220 } | 221 } |
221 | 222 |
222 void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) { | 223 void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) { |
223 benchmark->RunOnLayer(this); | 224 benchmark->RunOnLayer(this); |
224 } | 225 } |
225 | 226 |
226 } // namespace cc | 227 } // namespace cc |
OLD | NEW |