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_impl.h" | 5 #include "cc/layers/picture_layer_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 PictureLayerImpl::~PictureLayerImpl() { | 88 PictureLayerImpl::~PictureLayerImpl() { |
89 if (twin_layer_) | 89 if (twin_layer_) |
90 twin_layer_->twin_layer_ = nullptr; | 90 twin_layer_->twin_layer_ = nullptr; |
91 layer_tree_impl()->UnregisterPictureLayerImpl(this); | 91 layer_tree_impl()->UnregisterPictureLayerImpl(this); |
92 } | 92 } |
93 | 93 |
94 scoped_ptr<TilingSetEvictionQueue> PictureLayerImpl::CreateEvictionQueue( | 94 scoped_ptr<TilingSetEvictionQueue> PictureLayerImpl::CreateEvictionQueue( |
95 TreePriority tree_priority) { | 95 TreePriority tree_priority) { |
96 if (!tilings_) | 96 if (!tilings_) |
97 return make_scoped_ptr(new TilingSetEvictionQueue()); | 97 return make_scoped_ptr(new TilingSetEvictionQueue()); |
98 return make_scoped_ptr( | 98 bool skip_shared_out_of_order_tiles = |
99 new TilingSetEvictionQueue(tilings_.get(), tree_priority)); | 99 GetPendingOrActiveTwinLayer() != nullptr; |
| 100 return make_scoped_ptr(new TilingSetEvictionQueue( |
| 101 tilings_.get(), tree_priority, skip_shared_out_of_order_tiles)); |
100 } | 102 } |
101 | 103 |
102 scoped_ptr<TilingSetRasterQueue> PictureLayerImpl::CreateRasterQueue( | 104 scoped_ptr<TilingSetRasterQueue> PictureLayerImpl::CreateRasterQueue( |
103 bool prioritize_low_res) { | 105 bool prioritize_low_res) { |
104 if (!tilings_) | 106 if (!tilings_) |
105 return make_scoped_ptr(new TilingSetRasterQueue()); | 107 return make_scoped_ptr(new TilingSetRasterQueue()); |
106 return make_scoped_ptr( | 108 return make_scoped_ptr( |
107 new TilingSetRasterQueue(tilings_.get(), prioritize_low_res)); | 109 new TilingSetRasterQueue(tilings_.get(), prioritize_low_res)); |
108 } | 110 } |
109 | 111 |
(...skipping 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1355 | 1357 |
1356 bool PictureLayerImpl::AllTilesRequiredForDrawAreReadyToDraw() const { | 1358 bool PictureLayerImpl::AllTilesRequiredForDrawAreReadyToDraw() const { |
1357 if (!layer_tree_impl()->IsActiveTree()) | 1359 if (!layer_tree_impl()->IsActiveTree()) |
1358 return true; | 1360 return true; |
1359 | 1361 |
1360 return AllTilesRequiredAreReadyToDraw( | 1362 return AllTilesRequiredAreReadyToDraw( |
1361 &PictureLayerTiling::IsTileRequiredForDrawIfVisible); | 1363 &PictureLayerTiling::IsTileRequiredForDrawIfVisible); |
1362 } | 1364 } |
1363 | 1365 |
1364 } // namespace cc | 1366 } // namespace cc |
OLD | NEW |