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

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

Issue 577753002: cc: Don't clip tile priority visible rect to content bounds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 6 years, 3 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/resources/picture_layer_tiling.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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 EXPECT_TRUE(success); 398 EXPECT_TRUE(success);
399 399
400 viewport_rect_for_tile_priority_in_view_space = 400 viewport_rect_for_tile_priority_in_view_space =
401 gfx::ToEnclosingRect(MathUtil::ProjectClippedRect( 401 gfx::ToEnclosingRect(MathUtil::ProjectClippedRect(
402 screen_to_view, viewport_rect_for_tile_priority)); 402 screen_to_view, viewport_rect_for_tile_priority));
403 403
404 // Verify the viewport rect for tile priority is used in PictureLayerImpl. 404 // Verify the viewport rect for tile priority is used in PictureLayerImpl.
405 EXPECT_EQ(active_layer_->viewport_rect_for_tile_priority(), 405 EXPECT_EQ(active_layer_->viewport_rect_for_tile_priority(),
406 viewport_rect_for_tile_priority_in_view_space); 406 viewport_rect_for_tile_priority_in_view_space);
407 407
408 // Interset viewport_rect_for_tile_priority_in_view_space with the layer
danakj 2014/09/18 23:19:36 It would be really easy to add back that intersect
vmpstr 2014/09/18 23:58:46 Done.
409 // bounds and the result should be used in PictureLayerTiling.
410 viewport_rect_for_tile_priority_in_view_space.Intersect(
411 gfx::Rect(layer_bounds));
412 tilings = active_layer_->tilings(); 408 tilings = active_layer_->tilings();
413 for (size_t i = 0; i < tilings->num_tilings(); i++) { 409 for (size_t i = 0; i < tilings->num_tilings(); i++) {
414 PictureLayerTiling* tiling = tilings->tiling_at(i); 410 PictureLayerTiling* tiling = tilings->tiling_at(i);
415 EXPECT_EQ( 411 EXPECT_EQ(
416 tiling->GetCurrentVisibleRectForTesting(), 412 tiling->GetCurrentVisibleRectForTesting(),
417 gfx::ScaleToEnclosingRect(viewport_rect_for_tile_priority_in_view_space, 413 gfx::ScaleToEnclosingRect(viewport_rect_for_tile_priority_in_view_space,
418 tiling->contents_scale())); 414 tiling->contents_scale()));
419 } 415 }
420 } 416 }
421 417
(...skipping 3795 matching lines...) Expand 10 before | Expand all | Expand 10 after
4217 ActivateTree(); 4213 ActivateTree();
4218 EXPECT_TRUE(active_layer_->GetRecycledTwinLayer()); 4214 EXPECT_TRUE(active_layer_->GetRecycledTwinLayer());
4219 EXPECT_EQ(old_pending_layer_, active_layer_->GetRecycledTwinLayer()); 4215 EXPECT_EQ(old_pending_layer_, active_layer_->GetRecycledTwinLayer());
4220 4216
4221 host_impl_.ResetRecycleTreeForTesting(); 4217 host_impl_.ResetRecycleTreeForTesting();
4222 EXPECT_FALSE(active_layer_->GetRecycledTwinLayer()); 4218 EXPECT_FALSE(active_layer_->GetRecycledTwinLayer());
4223 } 4219 }
4224 4220
4225 } // namespace 4221 } // namespace
4226 } // namespace cc 4222 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | cc/resources/picture_layer_tiling.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698