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

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

Issue 736753002: cc: Implement geometry-based tile eviction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years 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_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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 PictureLayerImpl::~PictureLayerImpl() { 92 PictureLayerImpl::~PictureLayerImpl() {
93 if (twin_layer_) 93 if (twin_layer_)
94 twin_layer_->twin_layer_ = nullptr; 94 twin_layer_->twin_layer_ = nullptr;
95 layer_tree_impl()->UnregisterPictureLayerImpl(this); 95 layer_tree_impl()->UnregisterPictureLayerImpl(this);
96 } 96 }
97 97
98 scoped_ptr<TilingSetEvictionQueue> PictureLayerImpl::CreateEvictionQueue( 98 scoped_ptr<TilingSetEvictionQueue> PictureLayerImpl::CreateEvictionQueue(
99 TreePriority tree_priority) { 99 TreePriority tree_priority) {
100 if (!tilings_) 100 if (!tilings_)
101 return make_scoped_ptr(new TilingSetEvictionQueue()); 101 return make_scoped_ptr(new TilingSetEvictionQueue());
102 return make_scoped_ptr( 102 bool skip_shared_out_of_order_tiles =
103 new TilingSetEvictionQueue(tilings_.get(), tree_priority)); 103 GetPendingOrActiveTwinLayer() != nullptr;
104 return make_scoped_ptr(new TilingSetEvictionQueue(
105 tilings_.get(), tree_priority, skip_shared_out_of_order_tiles));
104 } 106 }
105 107
106 scoped_ptr<TilingSetRasterQueue> PictureLayerImpl::CreateRasterQueue( 108 scoped_ptr<TilingSetRasterQueue> PictureLayerImpl::CreateRasterQueue(
107 bool prioritize_low_res) { 109 bool prioritize_low_res) {
108 if (!tilings_) 110 if (!tilings_)
109 return make_scoped_ptr(new TilingSetRasterQueue()); 111 return make_scoped_ptr(new TilingSetRasterQueue());
110 return make_scoped_ptr( 112 return make_scoped_ptr(
111 new TilingSetRasterQueue(tilings_.get(), prioritize_low_res)); 113 new TilingSetRasterQueue(tilings_.get(), prioritize_low_res));
112 } 114 }
113 115
(...skipping 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after
1313 1315
1314 bool PictureLayerImpl::AllTilesRequiredForDrawAreReadyToDraw() const { 1316 bool PictureLayerImpl::AllTilesRequiredForDrawAreReadyToDraw() const {
1315 if (!layer_tree_impl()->IsActiveTree()) 1317 if (!layer_tree_impl()->IsActiveTree())
1316 return true; 1318 return true;
1317 1319
1318 return AllTilesRequiredAreReadyToDraw( 1320 return AllTilesRequiredAreReadyToDraw(
1319 &PictureLayerTiling::IsTileRequiredForDrawIfVisible); 1321 &PictureLayerTiling::IsTileRequiredForDrawIfVisible);
1320 } 1322 }
1321 1323
1322 } // namespace cc 1324 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl_unittest.cc » ('j') | cc/resources/tiling_set_eviction_queue.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698