summaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authore.hakkinen <e.hakkinen@samsung.com>2015-05-05 02:36:40 -0700
committerCommit bot <commit-bot@chromium.org>2015-05-05 09:37:17 +0000
commit6da595dec4925081bda50253d57f3a4a7df157bd (patch)
tree2420f0b1dbea099ead8915ef82a26ffd9169b3e8 /cc
parent1e28a7e08bf7d714db4c7687a56f8327c7152819 (diff)
downloadchromium_src-6da595dec4925081bda50253d57f3a4a7df157bd.zip
chromium_src-6da595dec4925081bda50253d57f3a4a7df157bd.tar.gz
chromium_src-6da595dec4925081bda50253d57f3a4a7df157bd.tar.bz2
cc: Drop skip_shared_out_of_order_tiles field from TilingSetEvictionQueue.
As tiles are no longer shared between active and pending trees, there are not shared tiles which could appear out of order thus the skip_shared_out_of_order_tiles field has become useless. It can thus be dropped. Review URL: https://codereview.chromium.org/1102333002 Cr-Commit-Position: refs/heads/master@{#328302}
Diffstat (limited to 'cc')
-rw-r--r--cc/layers/picture_layer_impl_perftest.cc4
-rw-r--r--cc/layers/picture_layer_impl_unittest.cc25
-rw-r--r--cc/resources/eviction_tile_priority_queue.cc7
-rw-r--r--cc/resources/tiling_set_eviction_queue.cc50
-rw-r--r--cc/resources/tiling_set_eviction_queue.h17
5 files changed, 33 insertions, 70 deletions
diff --git a/cc/layers/picture_layer_impl_perftest.cc b/cc/layers/picture_layer_impl_perftest.cc
index 9ad6a24..4cb7050 100644
--- a/cc/layers/picture_layer_impl_perftest.cc
+++ b/cc/layers/picture_layer_impl_perftest.cc
@@ -126,7 +126,7 @@ class PictureLayerImplPerfTest : public testing::Test {
do {
int count = num_tiles;
scoped_ptr<TilingSetEvictionQueue> queue(new TilingSetEvictionQueue(
- pending_layer_->picture_layer_tiling_set(), false));
+ pending_layer_->picture_layer_tiling_set()));
while (count--) {
ASSERT_TRUE(!queue->IsEmpty()) << "count: " << count;
ASSERT_TRUE(queue->Top() != nullptr) << "count: " << count;
@@ -151,7 +151,7 @@ class PictureLayerImplPerfTest : public testing::Test {
timer_.Reset();
do {
scoped_ptr<TilingSetEvictionQueue> queue(new TilingSetEvictionQueue(
- pending_layer_->picture_layer_tiling_set(), false));
+ pending_layer_->picture_layer_tiling_set()));
timer_.NextLap();
} while (!timer_.HasTimeLimitExpired());
diff --git a/cc/layers/picture_layer_impl_unittest.cc b/cc/layers/picture_layer_impl_unittest.cc
index b39ef1e..f5702d3 100644
--- a/cc/layers/picture_layer_impl_unittest.cc
+++ b/cc/layers/picture_layer_impl_unittest.cc
@@ -3163,8 +3163,8 @@ TEST_F(PictureLayerImplTest, TilingSetEvictionQueue) {
EXPECT_GT(number_of_unmarked_tiles, 1u);
// Tiles don't have resources yet.
- scoped_ptr<TilingSetEvictionQueue> queue(new TilingSetEvictionQueue(
- pending_layer_->picture_layer_tiling_set(), false));
+ scoped_ptr<TilingSetEvictionQueue> queue(
+ new TilingSetEvictionQueue(pending_layer_->picture_layer_tiling_set()));
EXPECT_TRUE(queue->IsEmpty());
host_impl_.tile_manager()->InitializeTilesWithResourcesForTesting(all_tiles);
@@ -3176,8 +3176,8 @@ TEST_F(PictureLayerImplTest, TilingSetEvictionQueue) {
Tile* last_tile = nullptr;
size_t distance_decreasing = 0;
size_t distance_increasing = 0;
- queue.reset(new TilingSetEvictionQueue(
- pending_layer_->picture_layer_tiling_set(), false));
+ queue.reset(
+ new TilingSetEvictionQueue(pending_layer_->picture_layer_tiling_set()));
while (!queue->IsEmpty()) {
Tile* tile = queue->Top();
if (!last_tile)
@@ -3968,15 +3968,14 @@ class OcclusionTrackingPictureLayerImplTest : public PictureLayerImplTest {
: PictureLayerImplTest(OcclusionTrackingSettings()) {}
void VerifyEvictionConsidersOcclusion(FakePictureLayerImpl* layer,
- FakePictureLayerImpl* twin_layer,
WhichTree tree,
size_t expected_occluded_tile_count,
int source_line) {
size_t occluded_tile_count = 0u;
Tile* last_tile = nullptr;
- scoped_ptr<TilingSetEvictionQueue> queue(new TilingSetEvictionQueue(
- layer->picture_layer_tiling_set(), layer && twin_layer));
+ scoped_ptr<TilingSetEvictionQueue> queue(
+ new TilingSetEvictionQueue(layer->picture_layer_tiling_set()));
while (!queue->IsEmpty()) {
Tile* tile = queue->Top();
if (!last_tile)
@@ -4532,29 +4531,29 @@ TEST_F(OcclusionTrackingPictureLayerImplTest,
host_impl_.tile_manager()->InitializeTilesWithResourcesForTesting(all_tiles);
VerifyEvictionConsidersOcclusion(
- pending_layer_, active_layer_, PENDING_TREE,
+ pending_layer_, PENDING_TREE,
total_expected_occluded_tile_count_on_trees[PENDING_TREE], __LINE__);
VerifyEvictionConsidersOcclusion(
- active_layer_, pending_layer_, ACTIVE_TREE,
+ active_layer_, ACTIVE_TREE,
total_expected_occluded_tile_count_on_trees[ACTIVE_TREE], __LINE__);
// Repeat the tests without valid active tree priorities.
active_layer_->set_has_valid_tile_priorities(false);
VerifyEvictionConsidersOcclusion(
- pending_layer_, active_layer_, PENDING_TREE,
+ pending_layer_, PENDING_TREE,
total_expected_occluded_tile_count_on_trees[PENDING_TREE], __LINE__);
VerifyEvictionConsidersOcclusion(
- active_layer_, pending_layer_, ACTIVE_TREE,
+ active_layer_, ACTIVE_TREE,
total_expected_occluded_tile_count_on_trees[ACTIVE_TREE], __LINE__);
active_layer_->set_has_valid_tile_priorities(true);
// Repeat the tests without valid pending tree priorities.
pending_layer_->set_has_valid_tile_priorities(false);
VerifyEvictionConsidersOcclusion(
- active_layer_, pending_layer_, ACTIVE_TREE,
+ active_layer_, ACTIVE_TREE,
total_expected_occluded_tile_count_on_trees[ACTIVE_TREE], __LINE__);
VerifyEvictionConsidersOcclusion(
- pending_layer_, active_layer_, PENDING_TREE,
+ pending_layer_, PENDING_TREE,
total_expected_occluded_tile_count_on_trees[PENDING_TREE], __LINE__);
pending_layer_->set_has_valid_tile_priorities(true);
}
diff --git a/cc/resources/eviction_tile_priority_queue.cc b/cc/resources/eviction_tile_priority_queue.cc
index 96da962..7a4cb12 100644
--- a/cc/resources/eviction_tile_priority_queue.cc
+++ b/cc/resources/eviction_tile_priority_queue.cc
@@ -119,16 +119,13 @@ EvictionTilePriorityQueue::PairedTilingSetQueue::PairedTilingSetQueue() {
EvictionTilePriorityQueue::PairedTilingSetQueue::PairedTilingSetQueue(
const PictureLayerImpl::Pair& layer_pair) {
- bool skip_shared_out_of_order_tiles = layer_pair.active && layer_pair.pending;
if (layer_pair.active) {
active_queue = make_scoped_ptr(new TilingSetEvictionQueue(
- layer_pair.active->picture_layer_tiling_set(),
- skip_shared_out_of_order_tiles));
+ layer_pair.active->picture_layer_tiling_set()));
}
if (layer_pair.pending) {
pending_queue = make_scoped_ptr(new TilingSetEvictionQueue(
- layer_pair.pending->picture_layer_tiling_set(),
- skip_shared_out_of_order_tiles));
+ layer_pair.pending->picture_layer_tiling_set()));
}
}
diff --git a/cc/resources/tiling_set_eviction_queue.cc b/cc/resources/tiling_set_eviction_queue.cc
index af8a7b2..f078e90 100644
--- a/cc/resources/tiling_set_eviction_queue.cc
+++ b/cc/resources/tiling_set_eviction_queue.cc
@@ -9,18 +9,15 @@
namespace cc {
TilingSetEvictionQueue::TilingSetEvictionQueue(
- PictureLayerTilingSet* tiling_set,
- bool skip_shared_out_of_order_tiles)
+ PictureLayerTilingSet* tiling_set)
: tree_(tiling_set->tree()),
- skip_shared_out_of_order_tiles_(skip_shared_out_of_order_tiles),
phase_(EVENTUALLY_RECT),
current_tile_(nullptr) {
// Early out if the layer has no tilings.
if (!tiling_set->num_tilings())
return;
GenerateTilingOrder(tiling_set);
- eventually_iterator_ = EventuallyTilingIterator(
- &tilings_, tree_, skip_shared_out_of_order_tiles_);
+ eventually_iterator_ = EventuallyTilingIterator(&tilings_, tree_);
if (eventually_iterator_.done()) {
AdvancePhase();
return;
@@ -85,59 +82,51 @@ void TilingSetEvictionQueue::AdvancePhase() {
NOTREACHED();
break;
case SOON_BORDER_RECT:
- soon_iterator_ = SoonBorderTilingIterator(
- &tilings_, tree_, skip_shared_out_of_order_tiles_);
+ soon_iterator_ = SoonBorderTilingIterator(&tilings_, tree_);
if (!soon_iterator_.done())
current_tile_ = *soon_iterator_;
break;
case SKEWPORT_RECT:
- skewport_iterator_ = SkewportTilingIterator(
- &tilings_, tree_, skip_shared_out_of_order_tiles_);
+ skewport_iterator_ = SkewportTilingIterator(&tilings_, tree_);
if (!skewport_iterator_.done())
current_tile_ = *skewport_iterator_;
break;
case PENDING_VISIBLE_RECT:
pending_visible_iterator_ = PendingVisibleTilingIterator(
- &tilings_, tree_, skip_shared_out_of_order_tiles_,
- false /* return required for activation tiles */);
+ &tilings_, tree_, false /* return required for activation tiles */);
if (!pending_visible_iterator_.done())
current_tile_ = *pending_visible_iterator_;
break;
case PENDING_VISIBLE_RECT_REQUIRED_FOR_ACTIVATION:
pending_visible_iterator_ = PendingVisibleTilingIterator(
- &tilings_, tree_, skip_shared_out_of_order_tiles_,
- true /* return required for activation tiles */);
+ &tilings_, tree_, true /* return required for activation tiles */);
if (!pending_visible_iterator_.done())
current_tile_ = *pending_visible_iterator_;
break;
case VISIBLE_RECT_OCCLUDED:
visible_iterator_ = VisibleTilingIterator(
- &tilings_, tree_, skip_shared_out_of_order_tiles_,
- true /* return occluded tiles */,
+ &tilings_, tree_, true /* return occluded tiles */,
false /* return required for activation tiles */);
if (!visible_iterator_.done())
current_tile_ = *visible_iterator_;
break;
case VISIBLE_RECT_UNOCCLUDED:
visible_iterator_ = VisibleTilingIterator(
- &tilings_, tree_, skip_shared_out_of_order_tiles_,
- false /* return occluded tiles */,
+ &tilings_, tree_, false /* return occluded tiles */,
false /* return required for activation tiles */);
if (!visible_iterator_.done())
current_tile_ = *visible_iterator_;
break;
case VISIBLE_RECT_REQUIRED_FOR_ACTIVATION_OCCLUDED:
visible_iterator_ = VisibleTilingIterator(
- &tilings_, tree_, skip_shared_out_of_order_tiles_,
- true /* return occluded tiles */,
+ &tilings_, tree_, true /* return occluded tiles */,
true /* return required for activation tiles */);
if (!visible_iterator_.done())
current_tile_ = *visible_iterator_;
break;
case VISIBLE_RECT_REQUIRED_FOR_ACTIVATION_UNOCCLUDED:
visible_iterator_ = VisibleTilingIterator(
- &tilings_, tree_, skip_shared_out_of_order_tiles_,
- false /* return occluded tiles */,
+ &tilings_, tree_, false /* return occluded tiles */,
true /* return required for activation tiles */);
if (!visible_iterator_.done())
current_tile_ = *visible_iterator_;
@@ -203,19 +192,16 @@ TilingSetEvictionQueue::EvictionRectIterator::EvictionRectIterator()
: tile_(nullptr),
tilings_(nullptr),
tree_(ACTIVE_TREE),
- skip_shared_out_of_order_tiles_(false),
tiling_index_(0) {
}
TilingSetEvictionQueue::EvictionRectIterator::EvictionRectIterator(
std::vector<PictureLayerTiling*>* tilings,
WhichTree tree,
- bool skip_shared_out_of_order_tiles,
bool skip_pending_visible_rect)
: tile_(nullptr),
tilings_(tilings),
tree_(tree),
- skip_shared_out_of_order_tiles_(skip_shared_out_of_order_tiles),
skip_pending_visible_rect_(skip_pending_visible_rect),
tiling_index_(0) {
}
@@ -255,11 +241,9 @@ bool TilingSetEvictionQueue::EvictionRectIterator::GetFirstTileAndCheckIfValid(
// EventuallyTilingIterator
TilingSetEvictionQueue::EventuallyTilingIterator::EventuallyTilingIterator(
std::vector<PictureLayerTiling*>* tilings,
- WhichTree tree,
- bool skip_shared_out_of_order_tiles)
+ WhichTree tree)
: EvictionRectIterator(tilings,
tree,
- skip_shared_out_of_order_tiles,
true /* skip_pending_visible_rect */) {
// Find the first tiling with a tile.
while (tiling_index_ < tilings_->size()) {
@@ -309,11 +293,9 @@ TilingSetEvictionQueue::EventuallyTilingIterator&
// SoonBorderTilingIterator
TilingSetEvictionQueue::SoonBorderTilingIterator::SoonBorderTilingIterator(
std::vector<PictureLayerTiling*>* tilings,
- WhichTree tree,
- bool skip_shared_out_of_order_tiles)
+ WhichTree tree)
: EvictionRectIterator(tilings,
tree,
- skip_shared_out_of_order_tiles,
true /* skip_pending_visible_rect */) {
// Find the first tiling with a tile.
while (tiling_index_ < tilings_->size()) {
@@ -363,11 +345,9 @@ TilingSetEvictionQueue::SoonBorderTilingIterator&
// SkewportTilingIterator
TilingSetEvictionQueue::SkewportTilingIterator::SkewportTilingIterator(
std::vector<PictureLayerTiling*>* tilings,
- WhichTree tree,
- bool skip_shared_out_of_order_tiles)
+ WhichTree tree)
: EvictionRectIterator(tilings,
tree,
- skip_shared_out_of_order_tiles,
true /* skip_pending_visible_rect */) {
// Find the first tiling with a tile.
while (tiling_index_ < tilings_->size()) {
@@ -418,11 +398,9 @@ TilingSetEvictionQueue::SkewportTilingIterator&
TilingSetEvictionQueue::PendingVisibleTilingIterator::
PendingVisibleTilingIterator(std::vector<PictureLayerTiling*>* tilings,
WhichTree tree,
- bool skip_shared_out_of_order_tiles,
bool return_required_for_activation_tiles)
: EvictionRectIterator(tilings,
tree,
- skip_shared_out_of_order_tiles,
false /* skip_pending_visible_rect */),
return_required_for_activation_tiles_(
return_required_for_activation_tiles) {
@@ -485,12 +463,10 @@ bool TilingSetEvictionQueue::PendingVisibleTilingIterator::
TilingSetEvictionQueue::VisibleTilingIterator::VisibleTilingIterator(
std::vector<PictureLayerTiling*>* tilings,
WhichTree tree,
- bool skip_shared_out_of_order_tiles,
bool return_occluded_tiles,
bool return_required_for_activation_tiles)
: EvictionRectIterator(tilings,
tree,
- skip_shared_out_of_order_tiles,
false /* skip_pending_visible_rect */),
return_occluded_tiles_(return_occluded_tiles),
return_required_for_activation_tiles_(
diff --git a/cc/resources/tiling_set_eviction_queue.h b/cc/resources/tiling_set_eviction_queue.h
index c89f2aa..41386fa 100644
--- a/cc/resources/tiling_set_eviction_queue.h
+++ b/cc/resources/tiling_set_eviction_queue.h
@@ -64,8 +64,7 @@ namespace cc {
// with low priority on one tree, but high combined priority.
class CC_EXPORT TilingSetEvictionQueue {
public:
- TilingSetEvictionQueue(PictureLayerTilingSet* tiling_set,
- bool skip_shared_out_of_order_tiles);
+ explicit TilingSetEvictionQueue(PictureLayerTilingSet* tiling_set);
~TilingSetEvictionQueue();
Tile* Top();
@@ -94,7 +93,6 @@ class CC_EXPORT TilingSetEvictionQueue {
EvictionRectIterator();
EvictionRectIterator(std::vector<PictureLayerTiling*>* tilings,
WhichTree tree,
- bool skip_shared_out_of_order_tiles,
bool skip_pending_visible_rect);
bool done() const { return !tile_; }
@@ -111,7 +109,6 @@ class CC_EXPORT TilingSetEvictionQueue {
Tile* tile_;
std::vector<PictureLayerTiling*>* tilings_;
WhichTree tree_;
- bool skip_shared_out_of_order_tiles_;
bool skip_pending_visible_rect_;
size_t tiling_index_;
};
@@ -121,7 +118,6 @@ class CC_EXPORT TilingSetEvictionQueue {
PendingVisibleTilingIterator() = default;
PendingVisibleTilingIterator(std::vector<PictureLayerTiling*>* tilings,
WhichTree tree,
- bool skip_shared_out_of_order_tiles,
bool return_required_for_activation_tiles);
PendingVisibleTilingIterator& operator++();
@@ -138,7 +134,6 @@ class CC_EXPORT TilingSetEvictionQueue {
VisibleTilingIterator() = default;
VisibleTilingIterator(std::vector<PictureLayerTiling*>* tilings,
WhichTree tree,
- bool skip_shared_out_of_order_tiles,
bool return_occluded_tiles,
bool return_required_for_activation_tiles);
@@ -156,8 +151,7 @@ class CC_EXPORT TilingSetEvictionQueue {
public:
SkewportTilingIterator() = default;
SkewportTilingIterator(std::vector<PictureLayerTiling*>* tilings,
- WhichTree tree,
- bool skip_shared_out_of_order_tiles);
+ WhichTree tree);
SkewportTilingIterator& operator++();
@@ -169,8 +163,7 @@ class CC_EXPORT TilingSetEvictionQueue {
public:
SoonBorderTilingIterator() = default;
SoonBorderTilingIterator(std::vector<PictureLayerTiling*>* tilings,
- WhichTree tree,
- bool skip_shared_out_of_order_tiles);
+ WhichTree tree);
SoonBorderTilingIterator& operator++();
@@ -182,8 +175,7 @@ class CC_EXPORT TilingSetEvictionQueue {
public:
EventuallyTilingIterator() = default;
EventuallyTilingIterator(std::vector<PictureLayerTiling*>* tilings,
- WhichTree tree,
- bool skip_shared_out_of_order_tiles);
+ WhichTree tree);
EventuallyTilingIterator& operator++();
@@ -194,7 +186,6 @@ class CC_EXPORT TilingSetEvictionQueue {
void AdvancePhase();
WhichTree tree_;
- bool skip_shared_out_of_order_tiles_;
Phase phase_;
Tile* current_tile_;
std::vector<PictureLayerTiling*> tilings_;