| Index: cc/trees/layer_tree_host_unittest.cc
|
| diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
|
| index da2d89147cd86724b004e66a0dff7c4769557656..50c7d9decd016778d2d77ab222ac0191662ca49d 100644
|
| --- a/cc/trees/layer_tree_host_unittest.cc
|
| +++ b/cc/trees/layer_tree_host_unittest.cc
|
| @@ -793,9 +793,9 @@ class LayerTreeHostTestAtomicCommit : public LayerTreeHostTest {
|
| switch (impl->active_tree()->source_frame_number()) {
|
| case 0:
|
| // Number of textures should be one for each layer
|
| - ASSERT_EQ(2, context->NumTextures());
|
| + ASSERT_EQ(2u, context->NumTextures());
|
| // Number of textures used for commit should be one for each layer.
|
| - EXPECT_EQ(2, context->NumUsedTextures());
|
| + EXPECT_EQ(2u, context->NumUsedTextures());
|
| // Verify that used texture is correct.
|
| EXPECT_TRUE(context->UsedTexture(context->TextureAt(0)));
|
| EXPECT_TRUE(context->UsedTexture(context->TextureAt(1)));
|
| @@ -806,10 +806,10 @@ class LayerTreeHostTestAtomicCommit : public LayerTreeHostTest {
|
| case 1:
|
| // Number of textures should be doubled as the first textures
|
| // are used by impl thread and cannot by used for update.
|
| - ASSERT_EQ(4, context->NumTextures());
|
| + ASSERT_EQ(4u, context->NumTextures());
|
| // Number of textures used for commit should still be
|
| // one for each layer.
|
| - EXPECT_EQ(2, context->NumUsedTextures());
|
| + EXPECT_EQ(2u, context->NumUsedTextures());
|
| // First textures should not have been used.
|
| EXPECT_FALSE(context->UsedTexture(context->TextureAt(0)));
|
| EXPECT_FALSE(context->UsedTexture(context->TextureAt(1)));
|
| @@ -834,7 +834,7 @@ class LayerTreeHostTestAtomicCommit : public LayerTreeHostTest {
|
| impl->output_surface()->context3d());
|
|
|
| // Number of textures used for draw should always be one for each layer.
|
| - EXPECT_EQ(2, context->NumUsedTextures());
|
| + EXPECT_EQ(2u, context->NumUsedTextures());
|
| context->ResetUsedTextures();
|
| }
|
|
|
| @@ -922,9 +922,9 @@ class LayerTreeHostTestAtomicCommitWithPartialUpdate
|
| switch (impl->active_tree()->source_frame_number()) {
|
| case 0:
|
| // Number of textures should be one for each layer.
|
| - ASSERT_EQ(4, context->NumTextures());
|
| + ASSERT_EQ(4u, context->NumTextures());
|
| // Number of textures used for commit should be one for each layer.
|
| - EXPECT_EQ(4, context->NumUsedTextures());
|
| + EXPECT_EQ(4u, context->NumUsedTextures());
|
| // Verify that used textures are correct.
|
| EXPECT_TRUE(context->UsedTexture(context->TextureAt(0)));
|
| EXPECT_TRUE(context->UsedTexture(context->TextureAt(1)));
|
| @@ -937,10 +937,10 @@ class LayerTreeHostTestAtomicCommitWithPartialUpdate
|
| case 1:
|
| // Number of textures should be two for each content layer and one
|
| // for each scrollbar, since they always do a partial update.
|
| - ASSERT_EQ(6, context->NumTextures());
|
| + ASSERT_EQ(6u, context->NumTextures());
|
| // Number of textures used for commit should be one for each content
|
| // layer, and one for the scrollbar layer that paints.
|
| - EXPECT_EQ(3, context->NumUsedTextures());
|
| + EXPECT_EQ(3u, context->NumUsedTextures());
|
|
|
| // First content textures should not have been used.
|
| EXPECT_FALSE(context->UsedTexture(context->TextureAt(0)));
|
| @@ -959,10 +959,10 @@ class LayerTreeHostTestAtomicCommitWithPartialUpdate
|
| case 2:
|
| // Number of textures should be two for each content layer and one
|
| // for each scrollbar, since they always do a partial update.
|
| - ASSERT_EQ(6, context->NumTextures());
|
| + ASSERT_EQ(6u, context->NumTextures());
|
| // Number of textures used for commit should be one for each content
|
| // layer, and one for the scrollbar layer that paints.
|
| - EXPECT_EQ(3, context->NumUsedTextures());
|
| + EXPECT_EQ(3u, context->NumUsedTextures());
|
|
|
| // The non-painting scrollbar's texture wasn't updated.
|
| EXPECT_FALSE(context->UsedTexture(context->TextureAt(2)));
|
| @@ -977,7 +977,7 @@ class LayerTreeHostTestAtomicCommitWithPartialUpdate
|
| break;
|
| case 3:
|
| // No textures should be used for commit.
|
| - EXPECT_EQ(0, context->NumUsedTextures());
|
| + EXPECT_EQ(0u, context->NumUsedTextures());
|
|
|
| context->ResetUsedTextures();
|
| PostSetNeedsCommitToMainThread();
|
| @@ -986,7 +986,7 @@ class LayerTreeHostTestAtomicCommitWithPartialUpdate
|
| // Number of textures used for commit should be two. One for the
|
| // content layer, and one for the painting scrollbar. The
|
| // non-painting scrollbar doesn't update its texture.
|
| - EXPECT_EQ(2, context->NumUsedTextures());
|
| + EXPECT_EQ(2u, context->NumUsedTextures());
|
|
|
| context->ResetUsedTextures();
|
| PostSetNeedsCommitToMainThread();
|
| @@ -1007,9 +1007,9 @@ class LayerTreeHostTestAtomicCommitWithPartialUpdate
|
| // Number of textures used for drawing should one per layer except for
|
| // frame 3 where the viewport only contains one layer.
|
| if (impl->active_tree()->source_frame_number() == 3)
|
| - EXPECT_EQ(1, context->NumUsedTextures());
|
| + EXPECT_EQ(1u, context->NumUsedTextures());
|
| else
|
| - EXPECT_EQ(4, context->NumUsedTextures());
|
| + EXPECT_EQ(4u, context->NumUsedTextures());
|
|
|
| context->ResetUsedTextures();
|
| }
|
| @@ -1832,7 +1832,7 @@ class LayerTreeHostTestShutdownWithOnlySomeResourcesEvicted
|
| virtual void DidSetVisibleOnImplTree(LayerTreeHostImpl* host_impl,
|
| bool visible) OVERRIDE {
|
| // One backing should remain unevicted.
|
| - EXPECT_EQ(100 * 100 * 4 * 1,
|
| + EXPECT_EQ(100u * 100u * 4u * 1u,
|
| layer_tree_host()->contents_texture_manager()->MemoryUseBytes());
|
| // Make sure that contents textures are marked as having been
|
| // purged.
|
| @@ -1847,7 +1847,7 @@ class LayerTreeHostTestShutdownWithOnlySomeResourcesEvicted
|
| case 1:
|
| // All three backings should have memory.
|
| EXPECT_EQ(
|
| - 100 * 100 * 4 * 3,
|
| + 100u * 100u * 4u * 3u,
|
| layer_tree_host()->contents_texture_manager()->MemoryUseBytes());
|
| // Set a new policy that will kick out 1 of the 3 resources.
|
| // Because a resource was evicted, a commit will be kicked off.
|
| @@ -1860,7 +1860,7 @@ class LayerTreeHostTestShutdownWithOnlySomeResourcesEvicted
|
| case 2:
|
| // Only two backings should have memory.
|
| EXPECT_EQ(
|
| - 100 * 100 * 4 * 2,
|
| + 100u * 100u * 4u * 2u,
|
| layer_tree_host()->contents_texture_manager()->MemoryUseBytes());
|
| // Become backgrounded, which will cause 1 more resource to be
|
| // evicted.
|
| @@ -1905,7 +1905,7 @@ class LayerTreeHostTestPinchZoomScrollbarCreation : public LayerTreeHostTest {
|
|
|
| virtual void DidCommit() OVERRIDE {
|
| // We always expect two pinch-zoom scrollbar layers.
|
| - ASSERT_EQ(2, root_layer_->children().size());
|
| + ASSERT_EQ(2u, root_layer_->children().size());
|
|
|
| // Pinch-zoom scrollbar layers always have invalid scrollLayerIds.
|
| ScrollbarLayer* layer1 = root_layer_->children()[0]->ToScrollbarLayer();
|
| @@ -2014,7 +2014,7 @@ class LayerTreeHostTestPinchZoomScrollbarNewRootLayer
|
| num_commits_++;
|
|
|
| // We always expect two pinch-zoom scrollbar layers.
|
| - ASSERT_EQ(2, root_layer_->children().size());
|
| + ASSERT_EQ(2u, root_layer_->children().size());
|
|
|
| // Pinch-zoom scrollbar layers always have invalid scrollLayerIds.
|
| ScrollbarLayer* layer1 = root_layer_->children()[0]->ToScrollbarLayer();
|
|
|