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

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

Issue 444463004: Fix ExternalViewportRectForPrioritizingTiles flakiness on windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: begin frame time at 1 millisecond Created 6 years, 4 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 | « no previous file | no next file » | 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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 296
297 EXPECT_EQ(pending_layer_->tilings()->num_tilings(), 297 EXPECT_EQ(pending_layer_->tilings()->num_tilings(),
298 active_layer_->tilings()->num_tilings()); 298 active_layer_->tilings()->num_tilings());
299 299
300 const PictureLayerTilingSet* tilings = pending_layer_->tilings(); 300 const PictureLayerTilingSet* tilings = pending_layer_->tilings();
301 EXPECT_GT(tilings->num_tilings(), 0u); 301 EXPECT_GT(tilings->num_tilings(), 0u);
302 for (size_t i = 0; i < tilings->num_tilings(); ++i) 302 for (size_t i = 0; i < tilings->num_tilings(); ++i)
303 VerifyAllTilesExistAndHavePile(tilings->tiling_at(i), active_pile.get()); 303 VerifyAllTilesExistAndHavePile(tilings->tiling_at(i), active_pile.get());
304 } 304 }
305 305
306 TEST_F(PictureLayerImplTest, 306 TEST_F(PictureLayerImplTest, ExternalViewportRectForPrioritizingTiles) {
307 DISABLED_ExternalViewportRectForPrioritizingTiles) {
308 base::TimeTicks time_ticks; 307 base::TimeTicks time_ticks;
308 time_ticks += base::TimeDelta::FromMilliseconds(1);
309 host_impl_.SetCurrentFrameTimeTicks(time_ticks); 309 host_impl_.SetCurrentFrameTimeTicks(time_ticks);
310 gfx::Size tile_size(100, 100); 310 gfx::Size tile_size(100, 100);
311 gfx::Size layer_bounds(400, 400); 311 gfx::Size layer_bounds(400, 400);
312 312
313 scoped_refptr<FakePicturePileImpl> pending_pile = 313 scoped_refptr<FakePicturePileImpl> pending_pile =
314 FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds); 314 FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds);
315 scoped_refptr<FakePicturePileImpl> active_pile = 315 scoped_refptr<FakePicturePileImpl> active_pile =
316 FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds); 316 FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds);
317 317
318 SetupTrees(pending_pile, active_pile); 318 SetupTrees(pending_pile, active_pile);
319 319
320 Region invalidation; 320 Region invalidation;
321 AddDefaultTilingsWithInvalidation(invalidation); 321 AddDefaultTilingsWithInvalidation(invalidation);
322 SetupDrawPropertiesAndUpdateTiles(active_layer_, 1.f, 1.f, 1.f, 1.f, false); 322 SetupDrawPropertiesAndUpdateTiles(active_layer_, 1.f, 1.f, 1.f, 1.f, false);
323 323
324 time_ticks += base::TimeDelta::FromMilliseconds(200);
325 host_impl_.SetCurrentFrameTimeTicks(time_ticks);
326
324 // Update tiles with viewport for tile priority as (0, 0, 100, 100) and the 327 // Update tiles with viewport for tile priority as (0, 0, 100, 100) and the
325 // identify transform for tile priority. 328 // identify transform for tile priority.
326 bool resourceless_software_draw = false; 329 bool resourceless_software_draw = false;
327 gfx::Rect viewport = gfx::Rect(layer_bounds), 330 gfx::Rect viewport = gfx::Rect(layer_bounds),
328 viewport_rect_for_tile_priority = gfx::Rect(0, 0, 100, 100); 331 viewport_rect_for_tile_priority = gfx::Rect(0, 0, 100, 100);
329 gfx::Transform transform, transform_for_tile_priority; 332 gfx::Transform transform, transform_for_tile_priority;
330 333
331 host_impl_.SetExternalDrawConstraints(transform, 334 host_impl_.SetExternalDrawConstraints(transform,
332 viewport, 335 viewport,
333 viewport, 336 viewport,
(...skipping 3368 matching lines...) Expand 10 before | Expand all | Expand 10 after
3702 3705
3703 host_impl_.tile_manager()->InitializeTilesWithResourcesForTesting(all_tiles); 3706 host_impl_.tile_manager()->InitializeTilesWithResourcesForTesting(all_tiles);
3704 3707
3705 VerifyEvictionConsidersOcclusion(pending_layer_, 3708 VerifyEvictionConsidersOcclusion(pending_layer_,
3706 total_expected_occluded_tile_count); 3709 total_expected_occluded_tile_count);
3707 VerifyEvictionConsidersOcclusion(active_layer_, 3710 VerifyEvictionConsidersOcclusion(active_layer_,
3708 total_expected_occluded_tile_count); 3711 total_expected_occluded_tile_count);
3709 } 3712 }
3710 } // namespace 3713 } // namespace
3711 } // namespace cc 3714 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698