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

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

Issue 334953003: cc: Early out sooner in UpdateTilePriorities when !CanHaveTilings(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: canhavetilings: fixcctests Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl.cc » ('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_image_layer_impl.h" 5 #include "cc/layers/picture_image_layer_impl.h"
6 6
7 #include "cc/layers/append_quads_data.h" 7 #include "cc/layers/append_quads_data.h"
8 #include "cc/resources/tile_priority.h" 8 #include "cc/resources/tile_priority.h"
9 #include "cc/test/fake_impl_proxy.h" 9 #include "cc/test/fake_impl_proxy.h"
10 #include "cc/test/fake_layer_tree_host_impl.h" 10 #include "cc/test/fake_layer_tree_host_impl.h"
(...skipping 14 matching lines...) Expand all
25 : PictureImageLayerImpl(tree_impl, id) { 25 : PictureImageLayerImpl(tree_impl, id) {
26 } 26 }
27 using PictureLayerImpl::UpdateIdealScales; 27 using PictureLayerImpl::UpdateIdealScales;
28 using PictureLayerImpl::MaximumTilingContentsScale; 28 using PictureLayerImpl::MaximumTilingContentsScale;
29 using PictureLayerImpl::ManageTilings; 29 using PictureLayerImpl::ManageTilings;
30 using PictureLayerImpl::DoPostCommitInitializationIfNeeded; 30 using PictureLayerImpl::DoPostCommitInitializationIfNeeded;
31 31
32 void ScaleAndManageTilings(bool animating_transform_to_screen, 32 void ScaleAndManageTilings(bool animating_transform_to_screen,
33 float maximum_animation_contents_scale) { 33 float maximum_animation_contents_scale) {
34 DoPostCommitInitializationIfNeeded(); 34 DoPostCommitInitializationIfNeeded();
35 UpdateIdealScales();
36 if (CanHaveTilings()) { 35 if (CanHaveTilings()) {
36 UpdateIdealScales();
37 ManageTilings(animating_transform_to_screen, 37 ManageTilings(animating_transform_to_screen,
38 maximum_animation_contents_scale); 38 maximum_animation_contents_scale);
39 } 39 }
40 } 40 }
41 PictureLayerTilingSet* tilings() { return tilings_.get(); } 41 PictureLayerTilingSet* tilings() { return tilings_.get(); }
42 42
43 friend class PictureImageLayerImplTest; 43 friend class PictureImageLayerImplTest;
44 }; 44 };
45 45
46 class PictureImageLayerImplTest : public testing::Test { 46 class PictureImageLayerImplTest : public testing::Test {
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 active_layer->DidDraw(NULL); 164 active_layer->DidDraw(NULL);
165 165
166 EXPECT_EQ(DrawQuad::TILED_CONTENT, quad_culler.quad_list()[0]->material); 166 EXPECT_EQ(DrawQuad::TILED_CONTENT, quad_culler.quad_list()[0]->material);
167 167
168 // Tiles are ready at correct scale, so should not set had_incomplete_tile. 168 // Tiles are ready at correct scale, so should not set had_incomplete_tile.
169 EXPECT_FALSE(data.had_incomplete_tile); 169 EXPECT_FALSE(data.had_incomplete_tile);
170 } 170 }
171 171
172 } // namespace 172 } // namespace
173 } // namespace cc 173 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698