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

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

Issue 800613009: Convert scroll offsets to use SyncedProperty. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months 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
OLDNEW
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
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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 219
219 bool PictureLayer::HasDrawableContent() const { 220 bool PictureLayer::HasDrawableContent() const {
220 return client_ && Layer::HasDrawableContent(); 221 return client_ && Layer::HasDrawableContent();
221 } 222 }
222 223
223 void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) { 224 void PictureLayer::RunMicroBenchmark(MicroBenchmark* benchmark) {
224 benchmark->RunOnLayer(this); 225 benchmark->RunOnLayer(this);
225 } 226 }
226 227
227 } // namespace cc 228 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698