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/test/fake_picture_layer.h" | 5 #include "cc/test/fake_picture_layer.h" |
6 | 6 |
7 #include "cc/test/fake_picture_layer_impl.h" | 7 #include "cc/test/fake_picture_layer_impl.h" |
8 | 8 |
9 namespace cc { | 9 namespace cc { |
10 | 10 |
11 FakePictureLayer::FakePictureLayer(ContentLayerClient* client) | 11 FakePictureLayer::FakePictureLayer(ContentLayerClient* client) |
12 : PictureLayer(client), | 12 : PictureLayer(client), |
13 update_count_(0), | 13 update_count_(0), |
14 push_properties_count_(0), | 14 push_properties_count_(0), |
15 output_surface_created_count_(0), | 15 output_surface_created_count_(0), |
16 always_update_resources_(false), | 16 always_update_resources_(false), |
17 disable_lcd_text_(false) { | 17 disable_lcd_text_(false) { |
18 SetBounds(gfx::Size(1, 1)); | 18 SetBounds(gfx::Size(1, 1)); |
19 SetIsDrawable(true); | 19 SetIsDrawable(true); |
20 } | 20 } |
21 | 21 |
22 FakePictureLayer::FakePictureLayer(ContentLayerClient* client, | 22 FakePictureLayer::FakePictureLayer(ContentLayerClient* client, |
23 scoped_ptr<RecordingSource> source) | 23 scoped_ptr<RecordingSource> source) |
24 : PictureLayer(client, source.Pass()), | 24 : PictureLayer(client, source.Pass()), |
25 update_count_(0), | 25 update_count_(0), |
26 push_properties_count_(0), | 26 push_properties_count_(0), |
27 output_surface_created_count_(0), | 27 output_surface_created_count_(0), |
28 always_update_resources_(false) { | 28 always_update_resources_(false), |
| 29 disable_lcd_text_(false) { |
29 SetBounds(gfx::Size(1, 1)); | 30 SetBounds(gfx::Size(1, 1)); |
30 SetIsDrawable(true); | 31 SetIsDrawable(true); |
31 } | 32 } |
32 | 33 |
33 FakePictureLayer::~FakePictureLayer() {} | 34 FakePictureLayer::~FakePictureLayer() {} |
34 | 35 |
35 scoped_ptr<LayerImpl> FakePictureLayer::CreateLayerImpl( | 36 scoped_ptr<LayerImpl> FakePictureLayer::CreateLayerImpl( |
36 LayerTreeImpl* tree_impl) { | 37 LayerTreeImpl* tree_impl) { |
37 return FakePictureLayerImpl::Create(tree_impl, layer_id_); | 38 return FakePictureLayerImpl::Create(tree_impl, layer_id_); |
38 } | 39 } |
(...skipping 11 matching lines...) Expand all Loading... |
50 PictureLayer::PushPropertiesTo(layer); | 51 PictureLayer::PushPropertiesTo(layer); |
51 push_properties_count_++; | 52 push_properties_count_++; |
52 } | 53 } |
53 | 54 |
54 void FakePictureLayer::OnOutputSurfaceCreated() { | 55 void FakePictureLayer::OnOutputSurfaceCreated() { |
55 PictureLayer::OnOutputSurfaceCreated(); | 56 PictureLayer::OnOutputSurfaceCreated(); |
56 output_surface_created_count_++; | 57 output_surface_created_count_++; |
57 } | 58 } |
58 | 59 |
59 } // namespace cc | 60 } // namespace cc |
OLD | NEW |