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

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

Issue 839143002: Roll Chrome into Mojo. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Rebase 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
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | cc/layers/surface_layer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include <utility> 10 #include <utility>
(...skipping 1595 matching lines...) Expand 10 before | Expand all | Expand 10 after
1606 1606
1607 base::TimeTicks time_ticks; 1607 base::TimeTicks time_ticks;
1608 time_ticks += base::TimeDelta::FromMilliseconds(1); 1608 time_ticks += base::TimeDelta::FromMilliseconds(1);
1609 host_impl_.SetCurrentBeginFrameArgs( 1609 host_impl_.SetCurrentBeginFrameArgs(
1610 CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE, time_ticks)); 1610 CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE, time_ticks));
1611 pending_layer_->UpdateTiles(Occlusion(), resourceless_software_draw); 1611 pending_layer_->UpdateTiles(Occlusion(), resourceless_software_draw);
1612 1612
1613 int num_visible = 0; 1613 int num_visible = 0;
1614 int num_offscreen = 0; 1614 int num_offscreen = 0;
1615 1615
1616 for (PictureLayerTiling::TilingRasterTileIterator iter( 1616 scoped_ptr<TilingSetRasterQueue> queue =
1617 pending_layer_->HighResTiling()); 1617 pending_layer_->CreateRasterQueue(false);
1618 iter; ++iter) { 1618 for (; !queue->IsEmpty(); queue->Pop()) {
1619 const Tile* tile = *iter; 1619 const Tile* tile = queue->Top();
1620 DCHECK(tile); 1620 DCHECK(tile);
1621 if (tile->priority(PENDING_TREE).distance_to_visible == 0.f) { 1621 if (tile->priority(PENDING_TREE).distance_to_visible == 0.f) {
1622 EXPECT_TRUE(tile->required_for_activation()); 1622 EXPECT_TRUE(tile->required_for_activation());
1623 num_visible++; 1623 num_visible++;
1624 } else { 1624 } else {
1625 EXPECT_FALSE(tile->required_for_activation()); 1625 EXPECT_FALSE(tile->required_for_activation());
1626 num_offscreen++; 1626 num_offscreen++;
1627 } 1627 }
1628 } 1628 }
1629 1629
(...skipping 3102 matching lines...) Expand 10 before | Expand all | Expand 10 after
4732 result = layer->CalculateTileSize(gfx::Size(447, 400)); 4732 result = layer->CalculateTileSize(gfx::Size(447, 400));
4733 EXPECT_EQ(result.width(), 448); 4733 EXPECT_EQ(result.width(), 448);
4734 EXPECT_EQ(result.height(), 448); 4734 EXPECT_EQ(result.height(), 448);
4735 result = layer->CalculateTileSize(gfx::Size(500, 499)); 4735 result = layer->CalculateTileSize(gfx::Size(500, 499));
4736 EXPECT_EQ(result.width(), 512); 4736 EXPECT_EQ(result.width(), 512);
4737 EXPECT_EQ(result.height(), 500 + 2); 4737 EXPECT_EQ(result.height(), 500 + 2);
4738 } 4738 }
4739 4739
4740 } // namespace 4740 } // namespace
4741 } // namespace cc 4741 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | cc/layers/surface_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698