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/tiles/picture_layer_tiling_set_unittest.cc

Issue 2629233002: cc: Remove separate x/y raster scales. (Closed)
Patch Set: Created 3 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/tiles/picture_layer_tiling_set.cc ('k') | cc/tiles/picture_layer_tiling_unittest.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 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/tiles/picture_layer_tiling_set.h" 5 #include "cc/tiles/picture_layer_tiling_set.h"
6 6
7 #include <map> 7 #include <map>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 270
271 Region remaining(content_rect); 271 Region remaining(content_rect);
272 PictureLayerTilingSet::CoverageIterator iter( 272 PictureLayerTilingSet::CoverageIterator iter(
273 set.get(), max_contents_scale, content_rect, ideal_contents_scale); 273 set.get(), max_contents_scale, content_rect, ideal_contents_scale);
274 for (; iter; ++iter) { 274 for (; iter; ++iter) {
275 gfx::Rect geometry_rect = iter.geometry_rect(); 275 gfx::Rect geometry_rect = iter.geometry_rect();
276 EXPECT_TRUE(content_rect.Contains(geometry_rect)); 276 EXPECT_TRUE(content_rect.Contains(geometry_rect));
277 ASSERT_TRUE(remaining.Contains(geometry_rect)); 277 ASSERT_TRUE(remaining.Contains(geometry_rect));
278 remaining.Subtract(geometry_rect); 278 remaining.Subtract(geometry_rect);
279 279
280 float scale = iter.CurrentTiling()->contents_scale_key(); 280 float scale = iter.CurrentTiling()->contents_scale();
281 EXPECT_EQ(expected_scale, scale); 281 EXPECT_EQ(expected_scale, scale);
282 282
283 if (num_tilings) 283 if (num_tilings)
284 EXPECT_TRUE(*iter); 284 EXPECT_TRUE(*iter);
285 else 285 else
286 EXPECT_FALSE(*iter); 286 EXPECT_FALSE(*iter);
287 } 287 }
288 EXPECT_TRUE(remaining.IsEmpty()); 288 EXPECT_TRUE(remaining.IsEmpty());
289 } 289 }
290 }; 290 };
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 // UpdateTilePriorities for pending set gets called during UDP in commit. 1033 // UpdateTilePriorities for pending set gets called during UDP in commit.
1034 EXPECT_TRUE(pending_set->UpdateTilePriorities(viewport, 1.f, time, 1034 EXPECT_TRUE(pending_set->UpdateTilePriorities(viewport, 1.f, time,
1035 Occlusion(), true)); 1035 Occlusion(), true));
1036 // No changes for active set until activation. 1036 // No changes for active set until activation.
1037 EXPECT_FALSE( 1037 EXPECT_FALSE(
1038 active_set->UpdateTilePriorities(viewport, 1.f, time, Occlusion(), true)); 1038 active_set->UpdateTilePriorities(viewport, 1.f, time, Occlusion(), true));
1039 } 1039 }
1040 1040
1041 } // namespace 1041 } // namespace
1042 } // namespace cc 1042 } // namespace cc
OLDNEW
« no previous file with comments | « cc/tiles/picture_layer_tiling_set.cc ('k') | cc/tiles/picture_layer_tiling_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698